views:

162

answers:

4

I'm currently confused about the many options concerning developing Web Applications with Java. I've worked on some Java programming using Servlet/JSPs only, in the past most of my work was on PHP.

I'm trying to select a good base for me to start. The options I've considered are the following:

Option 1. Pure JSP/Servlet programming with Hibernate for the Back-end.

Problems: Maintaing a web.xml for every servlet, strict types, needing to recompile and restart tomcat everytime a change is made, lots of code.

Option 2. Groovy on Grails

Problems: Still not a mature technology, might be difficult to debug, might turn out to be slow.

Option 3. Web Application development using the Spring Framework Problems: Seems like a chubby framework. Skeptic about it, I dont want to be limited by a framework that covers everything, I prefer using small vertical libraries like Guice, Hibernate, JSP/Servlet.

Out of my scope: JSF, Struts, Tapestry. Those three I didn't feel comfortable reading about or using.

I need help, can anyone please provide me a relieving answer to the above? Thanks.

+2  A: 

If you can not decide on what to use, there are only 3 ways to do it, and the choice is yours:

  1. Open your local job-search web page and find which technologies are currently popular in your region. If you choose it this way - you will have most money (statistically you should).
  2. Input various technologies in the search box on stackoverflow and see the amount of results. Pick up the one with most results. This will mean the biggest community resulting in getting the help easier if something goes wrong.
  3. Trying them all out yourself. Every human is different, there are ones prefering assembler, and other trying to code everything in Javascript. You can't just ask which of the platforms is generally better - you have to try them out yourself.
Max
I like your angle
DutrowLLC
+1  A: 

I suggest to add the play framework to your list.

Just another links for my commentators ;) : How to demo the play framework

BTW - my recommendation is mainly based on their tutorial. After studying these pages, I thought for the first time, next time I do a web application. Those guys seem to know what web developers really need. (again - my personal impression)

Andreas_D
Ehm, because it has a nice ASCII art in the console? What's so special/innovative about this framework that makes you add it to the list?
Max
@Max - ASCII Art??? Did I provide a wrong link? Last time I used it it was a pretty cool framework/environment to develop web applications (-> those apps that show up in a browser)
Andreas_D
@Andreas_D: Yes, I understood, I've read the description on the page you gave me. However I did not quite understand what's so innovative about it comparing with Grails, Ruby on Rails and tonns of other frameworks? (As about ASCII Art, I mean the 'Play' ASCII art as seen in the video).
Max
Hey that's neat
kibibu
It's easy to use. If you prefer latest-and-greatest-mature-but-innovative frameworks than look at other corners. I usually prefer stuff that I can understand (at my age) ;-)
Andreas_D
@Andreas_D: No offence intended, but I was just wondering if there is something more into it than being 'new'. There are hundreds of 'new' Java frameworks appearing and dying each month, so I'm trying to figure out if this one is solid enough not to die.
Max
I was pretty impressed by the feature to just 'start' the server from the console and have a hot code replacement plus clever solutions for 'live' testing and debugging. Most of the times during development you keep the server running and just reload the page...
Andreas_D
A: 

Option 1: It's a good option if you add some libraries to it to avoid re-programming what it has been programmed already (see out of scope paragraph) You don't need to maintain a web.xml for every Servlet. You must maintain one web.xml per application running in Tomcat. Strict types = less bugs. What's the problem with restarting tomcat? You develop with Eclipse for example, who has a server integrated so you don't need to deploy to see your changes and when you reach certain milestone or release, you deploy to production server.

Option 2: I have no experience whatsoever with it. But slow? Don't think so. Difficult to debug? You come from PHP...I'm sure you find it easier :).

Option 3: Spring is a huge factory with tons of various tools and items. Then you take that items and construct a bike or a tank out of them. (Thanks to Max comments)

Out of your scope: JSF is on top of JSP so does a lot of stuff for you, and helps you develop a MVC pattern. It provides you with a nice framework, which is easy to understand if you already know JSP. I'd give it a second try. Also consider using GWT, maybe is what you are looking for.

My two cents: I'd go with Hibernate and JSF (and Richfaces) or GWT. You'll learn, you'll have fun, you'll get what you want. Grails and Groovy has become really popular lately. I'm sure if you choose them you'll learn and have fun too.

pakore
em..why the downvote? care to explain? If I said something wrong I can correct it...
pakore
@pakore: -1 because I see the answer as incompetent. Option 1 - sucks, as you will end up writing your own framework and then realize it is already written. Option 3 - you need to play much more with Spring to understand it's architecture. It is not a tank, it's rather a huge factory with tonns of various tools and items. Then you take that items and construct a bike out of them.
Max
not sure about the downvote, it's not mine, but there is no way JSF is an improved version of JSP
unbeli
@Max edited adding your comments. @unbeli I didn't want to mean that JSF is JSP 2.0, I rephrased it.
pakore
Neither it is similar to JSP. It may be _using_ JSP
unbeli
@unbeli, @pakore: Ha ha, this starts to feel like a community wiki to me :D
Max
@unbeli edited.@Max I can set CW if you want, I don't mind :)
pakore
A: 

I recomend to use GWT, you can keep programming in pure java

http://code.google.com/intl/es-ES/webtoolkit/

Then all pure java experience, books, libraries and hours of work will be useful without needing another language, that was the google idea behind that.

There is also a Java Web Toolkit (and one for C++), but I haven't tried them yet

http://www.webtoolkit.eu/jwt

Hernán Eche