What is the most up-to-date way to write Java web-based applications and front-end ?
What is it? JSF, JSF2 or some framework like Spring MVC or Tapestry?
What are pros and cons of each framework?
What is the most up-to-date way to write Java web-based applications and front-end ?
What is it? JSF, JSF2 or some framework like Spring MVC or Tapestry?
What are pros and cons of each framework?
You should take a look at either Spring (http://www.springsource.org) or the Play (http://www.playframework.org) frameworks. The latter is newer so it has the benefit of building on the experience gained in the last few years with webapp frameworks from various languages. On the other hand, it means that it is not as mature as Eclipse.
Also, you may want to check Grails (http://www.grails.org). Although it is a Groovy framework, it: (a) still runs on the JVM (so it can interoperate with your existing Java code/libraries); and (b) Groovy is quite close to Java so the learning curve is not too steep.
Both JSF and Spring-MVC kick ass :) Try it - and see which fits your requirements better.
With proper mark-up/logic separation, a POJO data model, and a refreshing lack of XML, Apache Wicket makes developing web-apps simple and enjoyable again. Swap the boilerplate, complex debugging and brittle code for powerful, reusable components written with plain Java and HTML. (the description is lifted from the project's website, but I can vouch that it's true - an amazing Java web framework).
My other suggestion would be JSF 2.
What about using Spring MVC as a restful webservice and then using mostly plain html, css, js and do the communication using json?
Haven't tried that approach yet. It will be more like an app, client/server with all it's pro's cons. Thoughts?
Up to date? JSF and Struts don't belong in the same sentence.
I find that the most up-to-date way to write UIs is XHTML, CSS, and JavaScript talking to services. The services can be written in any language (Java, .NET, Perl), so any client can use them.
I might have substituted Flex, but I wonder if Apple's lack of support is the start of its decline.
I'm a big fan of GWT and smartgwt . They are extremely easy to use and give a responsive feel to your application with lots of desktop-like AJAXy widgets. The caveat is that there is sometimes a pause on the initial page load, but after the initial load, I find GWT to be extremely responsive and you can forget about having to think about the deployment platform entirely. GWT is compatible across all browsers (although IE6 is likely to be dropped soon).
If you do not have a lot of experience of HTML/Javascript. WIcket is also good for a nice component based model of Web Development but overall I would say that GWT is my favourite right now. I deployed a production application using GWT in about a month including learning curve, I don't think I can go back now.
Try Play! Framework. It seems to be a nice RAD framework especially for simple apps.
What we are doing now for a current project is use Wicket in a mostly stateless fashion for link handling/ the general web site composition and preparing of pages for their first render, after which we use jQuery/ JavaScript and JAXRS for the dynamic behavior on pages. Works very well so far.