Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> "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.



> 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.


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.


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...


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?


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.


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.


>>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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: