What Are the Pros and Cons of the Assorted Java Web Frameworks

What are the pros and cons of the assorted Java web frameworks?

I've used Tapestry 3, Wicket, Echo, and JSF fairly extensively. I'd really recommend you look those over and pick the one that appears the easiest for you, and to most closely fit the way you prefer to work.

Of them, the most comfortable for me to work with was Wicket, due to the lightweight nature of component building and simplicity of page templating. That goes doubly so if you are using your own db code instead of Hibernate or some other framework (I was never completely happy with Wicket Hibernate or Spring Integration).

Echo is great if you don't mind writing all of your layout in Java. I know that is different now, but I still think that product serves a fairly narrow niche. They change the development model with every major release as well it seems.

Tapestry is a great product, but it is obviously very different from the others in terms of development model as it is led mainly by one dude. Howard Lewis Ship is no doubt quite smart, but I am disappointed with their decision to basically forget backwards compatibility with each release. Again, though, for your needs this may not matter, and I've always found the Tapestry products pleasurable to work against.

JSF has been out for years, and still feels like something that a Struts guy built to fix all of the problems of Struts. Without really understanding all of the problems with Struts. It still has an unfinished feel to it, although the product is obviously very flexible. I use it and have some fondness for it, with great hopes for its future. I think the next release (2.0) to be delivered in JEE6 will really bring it into its own, with a new template syntax (similar to Facelets) and a simplified component model (custom components in only 1 file... finally).

And, of course, there are a million smaller frameworks and tools that get their own following (Velocity for basic needs, raw JSPs, Struts, etc). I generally prefer component oriented frameworks myself, though.

In the end, I'd recommend just taking a look at Tapestry, Wicket, and JSF and just picking the one that feels the best to you. You'll probably find one that just fits the way you like to work very quickly.

What are the Grails advantages over other Java Web Frameworks?

Grails is, like you say, built off Groovy which gives the immediate benefit of being more productive. The Groovy syntax is much terser than Java, it's much easier to do things in one line of Groovy code that would take you several in Java.

Grails specifically provides you with a number of advantages over other web frameworks (I can only talk for Struts 1.x, 2.x and SpringMVC however) - Grails is actually built on top of SpringMVC by the way and you can integrate other components using Spring.

  • Database Migrations and Versioning - no more application out of sync with database schema syndrome. Most Java web apps suffer from this.

  • Artefacts - which make creating new controllers and components easier. No more create a controller, configure it and stuff it into the right place in your web app. doh! Scaffolding also provides you with all some initial components to allow you to start building your pages and customising

  • Simpler validation (def simpler than Struts 1.x), e.g. username(size:6..10, blank:false) specifies two validation rules for a username field to be of a specific length and non blank. It's a bit harder in the other Java web app frameworks.

  • Built in Webflow (via Spring webflow) which makes creating complex workflows much simpler. Struts 2 can support Webflow, but via a plugin which is a little odd if I rememeber. Spring can too.

  • Interceptors - SpringMVC also has these.

  • Flash scope, see http://grails.org/doc/docs/1.1/ref/Controllers/flash.html

  • Better data binding - Struts 2 is pretty good, much better than Struts 1. SpringMVC is also good.

There's a few more, check out the documentation for more details: http://grails.org/doc/1.1.1/

What are the most commonly used Java Frameworks?

Here are just a few answers to your question that can be found on StackOverflow.

  • Best Java framework?
  • What is the most commonly used Java web framework?
  • Best java mvc framework implementation for web apps
  • What are the best MVC web frameworks on the market?
  • What are the best Java social networking frameworks?
  • Best server-side framework for heavy AJAX Java application
  • What Web Application Framework for Java is Recommended?
  • Java Validation Frameworks
  • Validation Framework in Java
  • Java 2D Game Frameworks
  • What are good docking frameworks for Java/Swing?
  • Which framework should I choose - Seam, Wicket, JSF or GWT?
  • Java Frameworks War: Spring and Hibernate
  • Recommended framework for Java Web Services
  • Java Desktop application framework
  • Alternate Java GUI Frameworks
  • What’s the best mock framework for Java?
  • Java configuration framework

You can do this search yourself via Google

recommendation for choosing a new web development stack

I cannot recommend anything, but strongly recommend that you consider these things:

  • Rapid development. Basically you want to save a page file, and reload it in the browser. Instantly! It can be done, do not settle for long deployment times.
  • Plain, readable text files!
  • Convention coding instead of explicit coding - big XML files will eventually drive one or more developers insane. The less, the better.
  • Good tool support (just having syntax coloring may be a big help)
  • Consider the long term support of your choice. You are basically remarrying with your software - will it still be maintained in 10 years? By whom? Will you have alternatives (JSR's are great - look at the amount of servlet engines)?

And WHEN you choose - get the source code for it, and ensure that it builds correctly. It will never be easier than now, and some day you WILL need to fix something inside. On short notice! (You may even consider allocating resources for donating documentation/patches/time to the open source project you are building your business on).


EDIT: A few more things:

  • You want to be able to verify things at compile time. One of the things that make it possible to build cathedrals in Java is that the static typechecking prevents a lot of nasty runtime errors. "Oh, THAT method? Well, it's not here, sorry. Boom!"
  • You want good error reporting. Built in! Try throwing a NullPointerException deep, deep down and see what 1) the user and 2) the developer is told about it. Anything that requires going to a log file to get the details WILL cause calls at 3 AM eventually.
  • Look into scalability from the start. Any non-trivial customer will need to and the world goes to multicores, so you might as well think about it already now. What will you do when all the magic pixie performance dust has been used and it just isn't enough: The application requires more than a single box.

And read this: http://www.pragprog.com/titles/mnee/release-it

web applications -- where to start?

I would suggest to learn Seam as it builds further on JSF, an industry standard.
It is also one of the newer and better web application frameworks available in the Java landscape today.
Furthermore, it has great support for both EJB3 and simple pojo development.

You should also do some background reading about servlets.

Which framework should I choose - Seam, Wicket, JSF or GWT?

The only one of those I've used is JSF, so I won't be able to give you feedback on the others, but here's my take on JSF. In my experience, the minute we converted from JSF in JSP to JSF in facelets, life got MUCH easier, so I'll focus around facelets. Also, It looks like Seam and JSF are not mutually exclusive.

Pros:

  • Creating facelets xhtml components is simple, which promotes re-use.
  • Decent templating abilities using built in tags like ui:insert, ui:include, and ui:decorate
  • Simple access to Spring beans through faces-config
  • XHTML based so web developers unfamiliar with java can still be effective
  • Good widget library available in tomahawk/trinidad

Cons:

  • Post requests only. This can make bookmarking difficult.
  • Not as built-in ajax-y as GWT, but this may be fixed if used with Seam

I'm by no means an expert in JSF/Facelets, so I'm sure there are others I've missed. Hopefully someone else will also elaborate.

Update for JSF 2.0:

  • Has even better re-use capabilities with composite components
  • Widget libraries for 2.0 include primefaces and mojarra scales
  • Allows get requests and bookmarking
  • Has built in Ajax support
  • See http://andyschwartz.wordpress.com/2009/07/31/whats-new-in-jsf-2/ for more on JSF 2

python vs java on web service development?

I can only give suggestions for web development in python:

  • Use Tornado - A non blocking web server.
  • Use Jinja2 - A templating engine.
  • Use MongoDB - A schema less database server | You can also use any RDBMS according to your requirement.

Above 3 tools are enough to build a web application in python.

or you can always choose Django - The giant web framework with all the features required to build a scalable web application in python.



Related Topics



Leave a reply



Submit