Categorization and Comparison of Popular Web Frameworks in the Java / JVM Environment
Join the DZone community and get the full member experience.Join For Free
the following article shows a categorization of java / jvm web-frameworks, considering different types of web applications. the intention is to give an overview, not to start a flame war.
an uncountable number of web-frameworks exists in the java environment. if you visit it conferences or google for web-framework comparisons, almost always you find a discussion about the advantages and disadvantages. often, a flame war is the consequence, each guy likes or dislikes a specific framework. thus, a neutral comparison, which helps to choose the one which fits best for your requirements, is rare.
in the following, i try to compare web-frameworks in a more neutral way. i categorize the most important web-frameworks in the java / jvm environment (i.e. frameworks which generate bytecode for the jvm) by classifying them to different types of web applications.
my experiences from discussions with colleagues and customers showed me, that the consequence is a neutral overview without any flame war or framework-bashing. i wonder if you think so, too...
types of web applications
different types of web applications exist. they have different sizes. thus, the time to develop them is varying, too. the following chart shows the types of web applications:
classical web application
a classical web application (e.g. amazon) is server-centric and uses html user interfaces with multi-page structure, bookmarking and forwards / backwards navigation. it is well-known since the beginning of the internet age. in the course of time, ajax was integrated. thus, just the changed part of the site has to be refreshed. a plugin is not necessary, but therefore the user inferface must be adjusted explicitly for every web browser.
rich internet application (ria)
a rich internet application (e.g. pokerstars) provides a modern looking web application with animations, effects and multimedia features. the web application is hardly recognizable as web application, there is no html user interface with forms, drop down boxes or tables. typical features of web browsers such as bookmarking or forwards / backwards navigation are usually missing. a plugin must be installed required (e.g. java runtime environment or adobe flash player).
the rich client mixes the characteristics of classical web applications and rias. the web application is client-centric (i.e. the user interface is loaded to client at the start of the application). the view uses html widgets, thus no plugin is required. contrary to rias, the goal of a rich client is not to offer a modern looking user interface, but to improve the usability of an already widespread and accepted view.
a crud client complies to a classical web application. however, it primarily offers functionalities to create, read, update and delete data.
the web-frameworks for crud clients have a conceptual difference: instead of just realizing the user interface, the whole application (database, application logic and user interface) is realized at once. important characteristics of these frameworks are „convention over configuration“ and „code-generation“. the main goal is high productivity, thus often „modern“ jvm languages such as groovy or scala are used.
a portal offers the possibility to present different applications such as standard software, individual components or websites in a consistent way. a portal server such as liferay portal must be used in combination with one or more web-frameworks. the effort is huge, because you have to use a portal server, create portlets and implement the communication between different portlets. a portal does not make sense for a small web application - e.g. if you want to realize just a little crud client, then a portal server and portlets are oversized.
categorization of java / jvm web-frameworks
the following chart categorizes the most widespread and popular web-frameworks in the java environment. some important notes before:
- complexity implies the view of a java developer! therefore, it is much more complex and time-consuming to learn e.g. grails because you have to learn groovy first.
- javafx: the new javafx (which will be released 2011 with a java api) is meant here.
- adobe flex does not compile java bytecode. due to missing alternatives for a ria in 2010 (besides the old javafx without java api, bad ide support, and so on), it is added nevertheless. flex can be integrated with jee by using tools such as graniteds.
- i cannot tell you, why jsf is a little bit above wicket or tapestry. the intention is to give an overview and a categorization, no flame war. so you also could put jsf a little bit below wicket and tapestry. does not matter! the same is true for the other frameworks.
key message: right tool for right job!
the key message is: use the right tool (i.e. web framework) for the right job!
if you want to realize...
... a classical web application, choose jsf or wicket or tapestry if you want to use a component-based framework. use spring mvc or struts if you need an action-based (also called request-based) framework.
... a ria, you have to use flex or javafx, because none of the other frameworks offers the possibility to realize a modern looking application such as pokerstars at the moment.
... a rich client, you have to evaluate if you need a client-centric framework (such as gwt) or a server-centric framework (such as vaadin or zk).
... a crud client, you can realize it with every framework. if you want to realize it with high productivity, you should use a framework which is constructed exactly for this. if you are a good java developer, you can use spring roo or the roma meta framework. grails (using groovy) or lift (using scala) are good alternatives, if you are familiar with a „modern“ jvm language or if you want to learn that language.
... a portal, you have to do much more work. choose a portal server, use portlets, and choose your web-framework. for this purpose, jsf could be a good choice in the majority of cases, because good (and standardized) bridge implementations are available. but other web-frameworks offer "integration plugins", too.
i showed you a categorization of web-frameworks in the java / jvm environment, considering different types of web applications.
i hope this is a good overview. discussions are welcome, but please do not start a flame war. do not tell me that jsf is better than wicket because of xyz. but of course, tell me if you do not like this categorization considering different types of web applications. tell me if some important framworks are missing or if anything else is in your mind besides a flame war.
kai wähner (twitter: @kaiwaehner)
Opinions expressed by DZone contributors are their own.