News for hackers. Stuff that matters.
Re:Why isn't Java used for modern web application development? by mibbitier on Sunday June 10, 2012 @05:39AM (#4090629)
So basically, it's due to lazy programmers who moan if they have to type or think too hard.

Also very very much fashion lead by hipsters who must be using the newest coolest untested thing on the planet.

Re:Why isn't Java used for modern web application development? by latch on Sunday June 10, 2012 @05:51AM (#4090651)

    Laziness, Impatience and Hubris
There's no advantage to the need to over-architect. It's purely a bi-product of Java (or static languages in general). Because you can figure out how to properly write a Java program doesn't make you clever, sorry.

C/C++ programmers moaned about Java and garbage collectors the same way Java programmers are moaning about dynamic language.

Re:Why isn't Java used for modern web application development? by einhverfr on Sunday June 10, 2012 @10:31AM (#4091135)
Static languages have some advantages. It's not quite the same thing (Perl being dynamic and all) but I have gone towards Moose in Perl which gives some of the things I see as advantages of static languages (such as the ability to engineer in constraints declaratively, assuming those are enforced by the language. SQL is great this way.)

The real reason to use languages like C and C++ is performance. The reason for dynamic languages is rapid prototyping. Java is somewhere in the middle but not really ideal except for where you want to compile your software to run on an imaginary CPU which can be emulated everywhere :-)

Re:Why isn't Java used for modern web application development? by latch on Sunday June 10, 2012 @11:10AM (#4091240)
I'm not saying they don't have their advantages. I want to be clear about that. But for most web apps, the limitations probably outnumber the benefits. Especially since the stateless nature of most web apps allow for easy horizontal scaling, thus negating the performance advantage.

As for performance, it really is amazing how fast node.js is. It's like a slow static language rather than a fast dynamic language (by that I mean, the gap between it and Java is smaller than the gab between it and Python). I don't know why that is, but I hope every dynamic language has that potential and that someone manages to unlock it.

Re:Why isn't Java used for modern web application development? by einhverfr on Sunday June 10, 2012 @05:45AM (#4090642)
I think there is a more fundamental reason. Java, being a compiled language that has traditionally aimed at compile once, run anywhere, offers a significant overhead, but with a development speed of a compiled language. It may or may not be faster to write code in Java vs C++, but it's certainly way faster to write code in Perl, Python, or Ruby.

I have always felt that Java was ill-suited to web applications generally, and that the main advantage of using it for web apps was being able to make use of third party libraries written in it. In this regard it's kind of like "why would you write your web app using DCOM on Windows?" Well, maybe because you are recycling VB logic from desktop apps?

Re:Why isn't Java used for modern web application development? by irahul on Sunday June 10, 2012 @06:41AM (#4090733)
> So basically, it's due to lazy programmers who moan if they have to type or think too hard.

Typing is a problem. Thinking too hard? Where does the OP imply he is averse to thinking? Being turned off that "fucking XML files are controllers" is being averse to thinking?

> Also very very much fashion lead by hipsters who must be using the newest coolest untested thing on the planet.

And those untested things would be? Rails is untested? Or Django? Or Flask?

Re:Why isn't Java used for modern web application development? by mibbitier on Sunday June 10, 2012 @08:12AM (#4090838)
> "fucking XML files are controllers"

XML has absolutely nothing whatsoever to do with Java the language. Some frameworks might use XML. There might be some built in functions/objects that deal with XML. But that doesn't mean you have to use XML. I certainly haven't in the 12 years I've been using Java.

Re:Why isn't Java used for modern web application development? by irahul on Sunday June 10, 2012 @08:19AM (#4090852)
> XML has absolutely nothing whatsoever to do with Java the language.

Weren't we talking about what OP said, and how per you, it's being averse to thinking?

> Part of it is a framework issue. Struts is horrible...absolutely, stunningly horrible. Your controller is an XML file (seriously). Freemarker (the main templating language) makes ColdFusion look awesome.

Now if some framework has achieved this level of retardation, I would rather not think about it. There are better things to think about. I would be absolutely fine being averse to thinking about it.

Re:Why isn't Java used for modern web application development? by latch on Sunday June 10, 2012 @09:11AM (#4090952)
The OP asked why Java isn't used for the web. One of the more popular Java web frameworks heavily relies on XML. It has nothing to do with Java, but it has everything to do with what the OP asked about.
Re:Why isn't Java used for modern web application development? by mibbitier on Sunday June 10, 2012 @09:35AM (#4090998)
Write your own framework. It's actually not rocket science. You can have a pretty good Java web server going in about 200 lines of code.

Just write a simple HTTP server in Java, and have it work as you want it to. Without XML...

Re:Why isn't Java used for modern web application development? by Silhouette on Sunday June 10, 2012 @10:49AM (#4091179)
You can have a pretty good Java web server going in about 200 lines of code.

No, you can't.

Your "simple HTTP server" proposal is roughly on a par with suggesting that a web developer should design his own security protocols. The idea is simple enough, but there is a lot of subtlety involved in covering all the edges cases properly, and a lot of very smart people have spent a lot of time building, testing and maintaining good tools for these jobs. Why would you reinvent the wheel, with a flat edge across part of it, a single spoke connecting to the axel, and in only one size that won't be the one that fits under the arch next week anyway?

Re:Why isn't Java used for modern web application development? by rabbitfang on Sunday June 10, 2012 @11:41AM (#4091328)
XML may have nothing to do with Java, but some Java frameworks (e.g. Spring) are obsessed with it. Many (most?) Java devs don't even like Spring. Who in their right mind would want to write code to call constructors in XML? no type checking, no refactoring support etc.
Re:Why isn't Java used for modern web application development? by rabbitfang on Sunday June 10, 2012 @12:03PM (#4091382)
I suspect the main reason Java became XML obsessed is because MS came out with C# and bragged about their XML and web services support. Ever since then Javaland has gone out of it's way to prove it was more XML and webservice centric. Net result is Java devs writing XML instead of code.
Re:Why isn't Java used for modern web application development? by kamaal on Monday June 11, 2012 @03:55AM (#4093606)
>>XML has absolutely nothing whatsoever to do with Java the language.

Idiomatic way of writing Java application requires usage of XML's in an extreme way.

Its almost like Java and XMLs exist for each other.

Re:Why isn't Java used for modern web application development? by derleth on Sunday June 10, 2012 @08:30AM (#4090869)
Actually, with Java, I type more than I think. A lot more.

Compare this to Haskell, where a single keyword might involve substantial thought, or APL, where one character more or less could represent a pretty fundamental restructuring of part of the program.

That Java makes you repeat yourself is not controversial. That being averse to this means you dislike thought is a somewhat bizarre position to hold.

Re:Why isn't Java used for modern web application development? by mibbitier on Sunday June 10, 2012 @09:34AM (#4090996)
> That Java makes you repeat yourself is not controversial. That being averse to this means you dislike thought is a somewhat bizarre position to hold.

The English language makes you repeat yourself. I don't see it as a bottleneck. I've never considered <speed of typing> a bottleneck to programming. possibly when programming some assembly routines. But if you're typing too much, you're probably repeating yourself too much, which means you're doing something wrong.

Re:Why isn't Java used for modern web application development? by IsTom on Sunday June 10, 2012 @10:11AM (#4091086)
Things that can be libraries in other languages end up being "design patterns" in Java. It's just not flexible enouth, both Ruby and Haskell are more flexible than it. Both in different ways.
Re:Why isn't Java used for modern web application development? by derleth on Sunday June 10, 2012 @12:18PM (#4091425)
In Java, I type too much every time I have to deal with the fact int and Integer are two different types. That's a design flaw in Java, not in anything I've ever written using Java. And that's just a trivial example off the top of my head.