Java , where to start ? Thursday, September 18, 2008

Folks ! i need your help to pick where to start on Java web development. most of other web programming alternative are easy to get running and test (Rails, Django, Zend MVC ..etc)

I studied Java at school but i consider myself less than a beginner on Java !

please pick your recommended start from the poll and feel free to comment.








9 comments:

Dave Newton said...

It depends on your goals.

EJB3 isn't "Java web development". Don't start there. That one's easy.

Grails isn't Java, even though it runs on the JVM. If you want to do *Java* web development don't do Grails. Groovy isn't my favorite JVM language either, but that's a different issue.

Seam is more useful in the context of EJB3 and JSF, although it requires neither. That's a tough row to hoe--I wouldn't start there either.

Wicket/Tapestry are component-oriented frameworks. If your goal is to get a Java web development job you'll find your options somewhat limited--they're both nice, but less used than other options in the real world.

S2 is a nice action-oriented framework (full disclosure: I'm on the Struts PMC).

You don't mention Spring MVC, which should be on your list.

Spring itself, not just its MVC, should be on your list--I might even recommend starting there, but again, it depends on your goals.

Also bear in mind that JRuby/JRoR is a viable option these days and will only get better, and now that Sun has the Jython guy it's finally getting some of the attention it deserves.

que0x said...

Thanks dave for your detailed comment,
I was listing Spring but i attend 2 Java conferences before and they were discussing Spring and it was not that simple to start with, also yesterday i joined a webinar by redhat on Seam 2 ,more complex !

Ido said...

depend what you want to build...
If it's going to be a fancy web app (that focus on the client) - check out GWT.
If it's more server heavy lift - I will look at some of the popular framework (jsf,wicket,tapestry etc') and then base on the 'match' I will choose.
BTW, if it's your first project, you might want to try other technologies that will make your life easier. PHP for example...
Hope it help.

que0x said...

Ido: Thanks for your comment, actually I'm a seasoned ASP.NET developer and done some pretty complex web apps , however I'm trying to learn Java because of Java's loyal community and adoption, just search Java on sourceforge.net for example you will find thousands of active projects aged couple years or more ....

Daniel said...

I'm surprised no one has yet suggested plain old Java Servlets.

If I were you I'd start where it all started, because having a good grasp of the Servlet API will help you understand the other frameworks (which use Servlets under the hood anyway).

After that I'd suggest you look into JSPs.

By the time you are ready to look into 'proper' frameworks you will have already started your web development with Java using Servlets and JSPs. You will also have had the experience of working with web/app servers such as Tomcat, Jetty and Glassfish.

Then I suggest you look into Spring MVC for which there is a really good tutorial at http://tinyurl.com/49uv34

It's a bit of a steep learning curve (compared with some of the other languages you mentioned) but it's totally worth it in the end ;)

Good luck!

Kevin said...

I agree with Daniel. But, you don't quite make it clear what it is you are trying to do. Are you wanting to learn the java development process for a web architecture front to back, including the UI, the logic, O/R, database, etc?

If so, then definitely start off with the latest Servlets (and make sure you grasp the concept of annotations as the latest stuff is making great use of it and saving valuable development time). From there, I gotta be honest, I did EJB2 and it sucked, was overly complicated and turned me off from EJB to look at Spring/Hibernate. Recently I had to use EJB3, and with reluctance I got a book and dove in. Man, was I impressed! EJB3 is a complete turn-around. It's as if they took the best/easiest stuff from Hibernate and Spring, and called it EJB3. The ability to use pojos and turn it into ejb is amazing. I do not lie when I say, after reading a bit about it, I was able to deploy an ejb an < an hour and see it work, including connecting to the DB and working with data. Maybe that's slow.. I don't know, but having never done it before and not messing with EJBs since the early ejb2 days, it was a very pleasant surprise. Point of this is, while I do believe Spring/Hibernate are a wonderful library, I would argue with anyone to say picking up EJB3 was faster, easier and for the most part completely usable in just about any scenario you can think of. No configuration of xml needed (but you still can if you want), easy stateless, remote/local usage, and very little code to work with message driven beans as well with a JMS setup.

That said, I will also argue that MOST web apps could simply get by with JSP (or JSF, pick your flavor), a MVC framework like Struts or simply using servlets, and some JDBC code, or heck, use EJB3 for the back end/db work. It is truly impressive how easy it is to get started these days.

Now, I tried php, and ruby, and there are many that absolutely love this over java. Frankly, coming from object pascal, and c/c++, Java syntax is readable to me. I have a hard time looking at php/ruby code and thinking how it's so "easy" and readable. That is but my opinion. I've seen many argue that you can "just do" with ruby what takes tons of work in Java, and yet I find it takes mere minutes to do the same thing. I think it is all a matter of opinion. From what you said, you've done advancecd ASP.NET work. You probably could look at ruby, php, and java, and walk away with the same idea.. you could do it just as fast/easily in asp.net, since you know it.

At any rate, I suppose it really depends on what your end goal is. Simple "hello world" with a full J2EE cycle, or more robust web app using MVC, EJB, MYSQL, etc?

que0x said...

Daniel,Kevin: Many thanks for your input, most appreciated :)

Yes, for sure Java has a steep learning curve ,even to setup a simple WAR file but this is something special about Java: Huge API. coming from a .NET world make it's hard to use php or ruby, they have fast turn-around on simple database-driven web apps and fancy bloggers who are very good in screencasting ! but you won't expect a scalable enterprise level app , even enterprises using php are usually "backing" with Java ,Python or even Erlang.

Python is very productive actually , scalable and deployable to various platforms but still couple of active OSS projects, non-social community and almost no one ask about it in any job interview.

I attended Java conferences and i really liked their community and maturity of the developers ! all sessions was on architectures and best practices.it was useful for me in general on the other side microsoft conferences is all about marketing : "WOW silverlight ,did you checked office 2007 ribbons ??"
damn cheap, i felt humiliated !

I hope you took a chance for voting , looks like I'll pick grails for the sake of groovy !

Shams said...

Wicket is my favorite web framework. Apart from all the above the thing really going for it is a separation of java code and html. It's different to the traditional way of writing jsp tags with logic to determine html output. But the downside for a beginner is since it's all java code it takes a while to get started, esp. if you don't understand the servlet framework well.

que0x said...

Shams: thanks for your input , as most comments suggested, i should added jsp/servlets .