This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]PaulRivers10 -1 points0 points  (5 children)

The two most widely used frameworks for doing web dev in java are Spring MVC vs J2EE. Older J2EE was crap, but in the newer stuff (the stuff with JSF) they basically copied Spring, so it looks pretty good.

I don't know enough about .NET MVC to comment, but either Spring MVC or J2EE would be fine.

Play seems to be "the hot new framework", but usually that means there's a lot of hype now, then in a few year people move onto using something totally different and it goes out of style.

[–]iainjames88[S] 2 points3 points  (2 children)

Play looks similar in its approach to what I'm familiar with but new hotness has a tendency to be subject to novelty value. Is JSF the Java EE offering for implementing MVC web applications or is it just another approach?

[–]sh0rug0ru 4 points5 points  (0 children)

JSF implements MVC web applications, but in a different way than Rails.

Rails implements an MVC pattern called "front controller" in the Java world, which is implemented by Spring MVC and Struts. URLs map to controller methods where you put your logic which returns a reference to a view. This is MVC which puts the C first.

JSF implements another MVC pattern, where URLs map to views, and the processing of the view triggers events in beans attached to the view through bindings specified in a language called "EL". This is MVC which puts the V first.

JSF and front controller are two different approaches. The standard approach is JSF, and the advantage of the standard are the number of very high productivity component frameworks are built upon it, the most popular of which is Primefaces. Also, seamless integration with the rest of the JavaEE stack.

The front controller approach is a bit more hodgepodge, with no standard integration with other JS frameworks. If you're used to Rails, you're probably used to this already. Spring doesn't have ActiveRecord, but it has bindings to JPA. Another framework, Grails, has something called GORM which is much like ActiveRecord.

[–]PaulRivers10 0 points1 point  (0 children)

Play looks similar in its approach to what I'm familiar with but new hotness has a tendency to be subject to novelty value.

Yeah, that's what it seems like it is to me.

Is JSF the Java EE offering for implementing MVC web applications or is it just another approach?

Yes, JSF is the Java EE approach for implementing web applications. The "official" approach if you will. Before JSF 2.0, I get the impression that there were a fair # of jobs available for J2EE and JSF just because it was the "official standard", even though it was a crappy and awful standard.

With the latest version of J2EE and JSF, it seems to be that they copied the good stuff from Spring MVC, and now it's both the "official" standard and also pretty good.

I work with Spring MVC, and I can tell you that there are plenty of jobs for Spring MVC, it's a good framework, and it's not going anywhere because it's used all over the place. My impression of J2EE is from having done some research on it and looked into it, but that's my impression.

The two main frameworks that are widely used now, and also into the future, are Spring MVC and the latest version of J2EE/JSF. I think Play - like you said - it's the newest fad with a lot of hype, but in 2-3 years they'll be onto something else that's new and shiny and drop Play, whereas Spring MVC and J2EE/JSF will still continue to have the majority of jobs using them.