views:

342

answers:

9

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?

+2  A: 

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.

Itay
+1  A: 

Both JSF and Spring-MVC kick ass :) Try it - and see which fits your requirements better.

Xorty
+2  A: 

Stripes! Lightweight and little config overhead

http://stripesframework.org

James B
+2  A: 

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.

Bozhidar Batsov
+5  A: 

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?

Sigmund Lundgren
Matt Raibile calls this SOFEA - Service Oriented Front End Architecture. I like the approach as it allows you to easily support other view layers.
Damo
+1  A: 

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.

duffymo
+3  A: 

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.

Chris
A: 

Try Play! Framework. It seems to be a nice RAD framework especially for simple apps.

Coder
This is the 3rd time you posted an answer in this flavor. In fact, all your answers are like this. Is this framework yours or so? Aren't you plain spamming?
BalusC
It's not my framework nor am I spamming. I just browsed topics on web frameworks here and decided to share my opinion.
Coder
+1  A: 

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.

Eelco