This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Its been a while since I did a web application (4 years). I am looking for advice what framework is recommended to use? Typically I used Struts in the past but I haven't kept up on the latest and greatest technologies.
ie. Spring MVC, Struts 2.x?
Also, what would be the best framework to integrate Ajax into? Is AJAX the current "standard" for server side scripting?
Most widely used is likely to SpringMVC at this point. But it's hard to say exactly.
If you want just a bare-bones, stay-out-of-your way framework, you might like FrontMan; otherwise, not so much. If you want in-your-face affect-every-aspect-of-how-you-code, then Struts2 or SpringMVC will be more to your liking.
Personally, I think JSF is an abomination that needs to be excised like a cancer.
I don't think these "which is the best framework" discussions are all that helpful. So much depends on facts we don't know (like the willingness and ability of the developer(s) to learn new stuff, who will be maintaining the code, what should the role of the framework be as part of the larger app, etc.) that these boil down to little more than personal preference.
That being the case, I'll chip in with my favorite: Stripes. It's built on convention-over-configuration (meaning: if you name classes, fields and methods the right way, then you don't need to specify what should happen to them - it will happen automatically), and for what configuration is needed it uses Java annotations right in the code where stuff happens - no XML like Struts and Spring use.
As to the other frameworks mentioned, my opinions are these: SpringMVC might make sense if you're using Spring anyway, but not otherwise. Struts 1 was great in its time but is now dead. Struts 2 is different, but I don't see it rise much beyond what Struts 1 did. JSF turned off many people in its 1.x incarnation; version 2.x is supposed to be better -particularly if coupled with Seam- but I don't think it'll have a great comeback. FrontMan doesn't do enough for my personal tastes (e.g., no variable binding); I don't want to use several frameworks when I can use Stripes for all of it.
Ulf Dittmer wrote:I'll chip in with my favorite: Stripes.
As Ulf says, its personal choice, and I liked what I saw when I looked at Stripes. Got and read the book cover to cover, and still liked it.
But, when I used it, I didn't like it as much as I wanted or expected. It could have easily been user error (i.e. mine). What turned me to look elsewhere was that the Stripes community was mostly inactive. I did not find timely responses to postings asking for help, the source code was not having bug fixes or new features added, etc. These are important criteria in my requirements, but may not be in someone else's list of requirements.
Ulf Dittmer wrote:I don't think these "which is the best framework" discussions are all that helpful.
Agreed, which is why I couched my response as: if you are looking for x, check out y. There is no "best" framework for everybody.
That being the case, I'll chip in with my favorite: Stripes.
Ah, yes. I forgot about Stripes. Not a bad choice for a middle-of-the road solution. But it does seem to be losing mind share.
JSF turned off many people in its 1.x incarnation; version 2.x is supposed to be better -particularly if coupled with Seam- but I don't think it'll have a great comeback.
Having to use a second framework to overcome the inadequacies of another doesn't strike me as even approaching reasonable.
FrontMan doesn't do enough for my personal tastes (e.g., no variable binding); I don't want to use several frameworks when I can use Stripes for all of it.
FrontMan2 (in beta) adds some minimal data binding around BeanUtils. But remember, that's what FrontMan is really all about: erring on the side of too little, rather than too much.
There are some other choices worth mentioning:
Grails, if you want to lean towards the "Rails way" and want to buy into groovy.
Play! which seems to be gaining momentum. Sort of a Grails-like approach with Java versus Groovy. It's interesting in a lot of ways, but may turn some people off as it's not even based on Servlets and JSP (though it will deploy into a Servlet container).
I would recommend Spring MVC, and with annotations, it's really fun.
If you want rails like experience, try Grails, Recently I am falling in love with grails. It's quite productive and has lot's of plugins, developing custom tags are piece of cake. Integrates well with Hibernate, JPA, App engine datastore, Hadoop, Mongo DB, Neo4j. Security plugins makes life easier.
Grails can give you a working application in days.
Doing own research from scratch will take lot of time. If I have to choose, I will use presentations/blogs like this as a baseline data to shortlist few frameworks on which I can do research. Anyway this data and graphs are changing every year and there is no best. Finally its everyone's choice.