4 ms·
Just to set up one of the Java frameworks you list is already a lot of work and a lot of wrangling of XML. Without frameworks, it is probably OK if you already
by Tichy 16y ago
Just to set up one of the Java frameworks you list is already a lot of work and a lot of wrangling of XML.
Without frameworks, it is probably OK if you already have a working web.xml. I used to just copy my working web.xml and modify it. Good luck if you want to create a working web.xml from scratch, though. The specification for a proper web.xml is a PDF with several 100 pages (last time I looked, a couple of years ago), and to parse it you basically need a scanner for XML specification files in your brain.
That is only for creating the working web.xml. Specifications for JSP and JSTL are several hundred pages on top of that.
- aagha 16y agoThis is one of the specific reasons the Stripes Framework (http://stripesframework.org/display/stripes/Home http://stripesframework.org/display/stripes/Home) was created. The idea behind it is that most Java frameworks require too much configuration and the start-up time (to get rolling with development) isn't short. Stripes looks to solve both of these problems while making it (actually) fun to do Java development. There's extremely little XML config setup. There's not a single person I know that's familiar with Struts (1 or 2) and/or Spring MVC (or any other Java framework for that matter) that's tried Stripes, learned it in a day or two, and not really liked it. Daoud also has a great book, "Stripes: ...and Java Web Development Is Fun Again" that's a great resource for starting out. In addition, the Stripes community is small enough that you can access the code contributors on a daily basis through IRC or the mail lists. With Stripes-Reload and Stripersist, you can get a CRUD app up and running in under a few minutes--I think that's on par with RoR, isn't it? IMHO, it's worth looking at.
- democracy 16y agoit still needs web.xml, doesn't it?
- jbail 16y agoYeah, but 99.9% of what you want to do with web.xml can be summarized in about 2-3 pages of documentations. It's NOT as complicated as you make it sound. The same goes for JSPs and JSTL. You could have a decent understanding of both technologies in an afternoon of reading.
- Tichy 16y agoNo, but the documentation is horrible. Somebody should create those 2-3 pages of documentation. Actually the web.xml spec got much worse somewhere in the increasing version numbers of Java Servlets. I rememeber just thinking "WTF" when I realized it was several 100 pages now. It definitely doesn't need to be that long, but I guess they wrote the documentation "enterprise style". It's just off-putting, who cares if the documentation could be simpler? They didn't make it simple, so I don't like it. Especially since the job of a Java developer is essentially digging through the mountain of specifications. In my companies library there is a book "Handbook Of Java Development" with 1300 pages in small print. I think somebody left it there as a cruel joke.
- roam 16y agoThanks for making me feel a bit better. The only way I can get a valid web.xml file is by getting started from a simple copy and then relying on my IDE to warn me when I'm about to make a mistake. Come to think of it: I don't know when I last started a Java web app from scratch. The first thing I do is copy the configuration from an existing project and strip out everything I don't need.
- mrj 16y agoUse netbeans! I haven't had to manually hack a web.xml or build.xml in years. I do lots of Java development without touching XML. Managing that stuff should be left the IDE, that's the sort of thing that XML was originally meant for, at least.
- ww520 16y agoSo they have very good and thorough documentation. Why is that a problem? In my experience, setting up web.xml is a matter of copying the prepackaged one and change a few lines to specify settings about your app.
- Tichy 16y agoIt is unnecessarily verbose, just as Java itself. It is a problem because it makes finding and digesting the required information difficult. Unfortunately there seems to be only a choice between insufficient documentation (RoR) or too much documentation. Anyway, if you are fine with Java, more power to you. The question was "why do few people here use Java" not "why nobody should use Java".