Comparison of Java Web Application Frameworks

18
Comparison of Java Web Application Frameworks By Angelin

description

Comparison of Java Web Application Frameworks

Transcript of Comparison of Java Web Application Frameworks

Page 1: Comparison of Java Web Application Frameworks

Comparison of

Java Web Application Frameworks

By

Angelin

Page 2: Comparison of Java Web Application Frameworks

©ardentlearner

Agenda

Top Java Web Application Frameworks

Frameworks - Comparison Criteria

Frameworks - Comparison Results

Summary

Page 3: Comparison of Java Web Application Frameworks

©ardentlearner

Top Java Web Application Frameworks

• SPRING MVC

• GRAILS

• VAADIN

• PLAY

A Web Application Framework (WAF) is a software framework that is designed to support the development of dynamic websites, web applications, web services and web resources.

Currently the top 4 Java based Web Application frameworks are :

Page 4: Comparison of Java Web Application Frameworks

©ardentlearner

Frameworks Comparison

Page 5: Comparison of Java Web Application Frameworks

©ardentlearner

Frameworks - Comparison Criteria

Following are the categories of data used to compare these Java Web

Application Frameworks:

• Framework Complexity

• Ease of Use

• Rapid application prototyping

• Throughput/Scalability

• Code Maintenance/Updates

• UX (User Experience), Look and feel

• Documentation & Community

• Framework Ecosystem

Java web frameworks comparison

Page 6: Comparison of Java Web Application Frameworks

©ardentlearner

# 1 - Framework ComplexityFramework Details Complexity

Spring MVC • Spring framework has over 30 subprojects that range from fully functional MVC to Spring .NET and Spring for Android.

• Spring MVC architecture is relatively simple, but still there are many layers and abstractions that are sometimes hard to debug if something goes wrong. And it is highly dependent on Spring Core.

• Spring MVC is an old and mature framework that has numerous amount of ways to extend and configure it - and this actually makes it fairly complex.

Complex

GRAILS • Grails’ MVC functionality is covered by Spring MVC; GORM (Grails' Object Relational Mapping) is actually a facade for Hibernate. Everything is glued together with core Spring.

• All of these frameworks are mature, but heavyweight and Grails adds another layer of abstraction on top of it.

• Grails has all of the complexity associated with Spring and Hibernate, and adds another layer of abstraction to that.

Fairly Complex

Vaadin • The Vaadin Framework currently builds upon a flavor of GWT (lightly altered), which is a mature framework.

• Developing a Vaadin project is similar to GWT, but learning GWT is not a prerequisite to be competent at using Vaadin.

• Vaadin is slightly more complex than GWT, as it embeds a version of it.

Simple

Play • Play is quite a complex framework given how robust of an ecosystem the Play framework provides.• The framework comes with Netty, SBT, Akka, a Scala templating engine, and several other modules

built in. • Play emphasizes convention over configuration, so the framework is responsible for scaffolding much

of the glue and configuration between the modules, which does cut down on the complexity experienced by the developer.

Very Complex

Page 7: Comparison of Java Web Application Frameworks

©ardentlearner

# 2 - Ease of UseFramework Details Ease of Use

Spring MVC • Spring knowledge as a whole is needed. • Plain JSP & Controllers do not provide usable, out-of-the-box components and widgets.

Very Poor Usability

GRAILS • Designed to be a rapid development framework, easy to use without any complex configuration;

• Extensibility is very simple when using Plugins

Very easy to use

Vaadin • The design view allows us to drag and drop components onto a canvas, also creating their code in the background. We only need to provide the logic code behind each component.

• There are also many videos and documentation pages set up for new users to ease the new user learning curve.

Very easy to use

Play • While simple to get started, the two things that really keep Play from being really easy to use are the complete backward incompatibility between versions and the requiring Scala to use templates.

Moderately easy to use

Page 8: Comparison of Java Web Application Frameworks

©ardentlearner

# 3 - Rapid Application DevelopmentFramework Details Complexity

Spring MVC • Much preexisting Spring knowledge is needed. • Plain JSP & Controllers do not provide out-of -the-box components and

widgets that can be used.• Spring Roo, a subproject of Spring that supports Spring Framework, Spring

Security and Spring Web Flow, is Spring’s convention-over-configuration solution for rapidly building applications. It focuses on Java platform productivity, usability, runtime avoidance, lock-in avoidance, and extensibility via add-ons. It’s in the process of being expanded and has a lot of potential.

Very Poor Support

GRAILS • Grails setup is very fast and scaffolding (code generation) saves a lot of time. • Convention over configuration principle helps you to forget almost all of the

configuration hassle.• Grails comes with a reloading mechanism out of the box, but it has some

limitations (like it can only reload Groovy classes).

Very fast and easy setup

Vaadin • The Vaadin directory is a component repository which provides existing components that users have implemented and contributed for others to use.

• Also, the design mode provides a drag and drop mechanism to add components and the code is generated for you, providing you with the exact layout you want, without even having to use the keyboard!

Good Support

Play • Play has a binary component similar to the Rails component of RoR, which is used for scaffolding and makes Play a little unconventional as a Java web framework.

• Play has great documentation and the scaffolding works wonderfully.

Excellent Support

Page 9: Comparison of Java Web Application Frameworks

©ardentlearner

# 4 - Throughput/ScalabilityFramework Details Scalability

Spring MVC • It contains necessary components for parallel processing and solutions like EhCache can be attached easily to scale memory. Spring Batch enables to build multi-threaded apps, partition applications and do bulk processing.

• Spring apps can be modularized and different modules can be set up on different hosts. These components can talk with each other using JMS (Java Message Service) for example.

Good

GRAILS • Grails is an abstraction over Spring and Hibernate making it more scalable. Good

Vaadin • Takes the scaling value from GWT and doesn’t add any additional scaling complexity. Very Good

Play • Play uses Akka actors to be incredibly scalable and allow for high throughput. It does require learning how to use Akka.

Excellent

Page 10: Comparison of Java Web Application Frameworks

©ardentlearner

# 5 - Code Maintenance/Updates

Framework Details Ease of maintenance

Spring MVC • Spring MVC is heavy and dense despite taking advantage of the Model-View-Controller paradigm.

• Server side logic is easy to maintain but if it comes to managing layouts and complex UIs, it will be hard.

• But annotations enable to access all kinds of data in a declarative manner.

Fair

GRAILS • Grails follows the convention-over configuration principle, which makes maintenance easier. It enforces the project structure, thus most Grails projects look very similar.

• Groovy is less verbose than Java, thus less code need to be written.

Very good

Vaadin • Very good code reuse and component class hierarchy model, as well as switchable themes. Good

Play • The convention over configuration aspect of Play leads to readable code.• The reliance on Scala does limit the readability to Java-specific developers.• Play also has reloading of components and code built in which definitely helps cut down on

time during the development phase of your applications.

Good

Page 11: Comparison of Java Web Application Frameworks

©ardentlearner

# 6 - UX, Look and feelFramework Details Support

Spring MVC • Spring MVC has a very rich feature set to develop and maintain code on the server side, but despite its extensibility it still does not provide any rich framework for building awesome interfaces.

• No re-usable and nice components. But templates are easy to manage and create.

Very Poor

GRAILS • The auto-generated project skeleton has some basic view templates and CSS to start with.• Plugins provide integrations with popular JS frameworks like Query and Twitter Bootstrap, and

include many rich UI AJAX components

Very Good

Vaadin • Vaadin themes are collections of layouts for components, custom images and CSS.• Vaadin gives the ability to switch themes without changing the logic.• A theme follows a specific directory layout, and with them you can specify the CSS for the

default Vaadin components or create custom components.

Excellent

Play • Play applications usually leverage LESS CSS and CoffeeScript mixed with templates instead of the CSS and JavaScript leveraged by traditional Java web application

Fair

Page 12: Comparison of Java Web Application Frameworks

©ardentlearner

# 7 - Documentation & Community

Framework Details Availability of documentation &

community

Spring MVC • The Spring website itself provides numerous tutorials both in video and written format, and it’s useful for beginners to the most advanced developer.

• There is a link to a GitHub repository with the Petclinic sample application - the go-to for a Spring MVC tutorial.

• Spring also hosts a blog on their website with articles written by the public as well as Spring team members.

• The community is strong with this one. The Spring team actively encourages forking the Spring project repositories in order to make changes, fix bugs and add new features. They allow public access to their JIRA tracker in order to facilitate this.

• There are numerous Spring User Groups and Java User Groups that discuss Spring topics. • Spring even holds an annual conference called SpringOne/2GX.

Very Good

GRAILS • Documentation section is actually a wiki, which can be modified by any logged in user http://grails.org/edit/Documentation.

• It has an official manual, tutorials, screencasts, a• sample app and more.

Excellent

Vaadin • Top class documentation, both online and in The Book of Vaadin.• Video tutorials and demos are also impressive. • Vibrant community.

Excellent

Play • Lots of great documentation from TypeSafe (Play) and external sources.• Play’s full API is well documented and there are great tutorials that show off the scaffolding

features of Play.

Very Good

Page 13: Comparison of Java Web Application Frameworks

©ardentlearner

# 8 - Framework EcosystemFramework Details Ecosystem

support

Spring MVC • Spring MVC’s ecosystem is well-developed. As it is based and dependent on the Spring Framework itself, it can benefit from tools like Spring Roo and Spring Tool Suite IDE.

• There are no problems with Maven dependencies as everything is available in a public Maven repository and also from SpringSource’s own Maven repository.

• There are 3rd-party solutions like MyEclipse for Spring, which includes scaffolding capability for Spring MVC.

• Still some very useful parts of the ecosystem are commercially available and this makes it not available for everyone.

Good support

GRAILS • Grails is a full-stack web framework, not just MVC. It contains a lot of stuff out of the box, but it doesn’t enforce it. The provided parts can be replaced, and there is a big library of plugins.

Very Good Support

Vaadin • Vaadin doesn’t really provide an ecosystem as such. But does allow for it within the Vaadin Directory.

• Because the ecosystem doesn’t exist out the box, expanding application will lead to increase in complexity as the application starts to support different technologies and their integration.

Poor Support

Play • Play framework is an all-encompassing ecosystem that provides everything you need to develop, run, and test your applications. The only real downside is Play’s reliance on Scala for templating and SBT.

• Play is bundled with SBT (Simple Build Tool) for building, Netty for a non-blocking networking I/O, Scala is used as a templating engine, and Akka is included for asynchronous operations.

• Play, unlike many Java web frameworks, includes a binary that is used for scaffolding of applications.

Very Good Support

Page 14: Comparison of Java Web Application Frameworks

©ardentlearner

Frameworks ComparisonResults

Page 15: Comparison of Java Web Application Frameworks

15

©ardentlearner

Frameworks - Comparison Results

Framework / Criteria

Framework Complexity

Ease of Use

Rapid application prototyping

Throughput or Scalability

Code Maintenance or

Updates

UX, Look &

feelDocumentation &

CommunityFramework Ecosystem

Spring MVC Complex Very Poor

UsabilityVery Poor Support Good Fair Very

Poor Very Good Good support

GRAILSFairly

ComplexVery easy

to useVery fast and

easy setup Good Very good Very Good Excellent Very Good

Support

VaadinSimple Very easy

to use Good Support Very Good Good Excellent Excellent Poor Support

PlayVery

ComplexModerately easy to

useExcellent Support Excellent Good Fair Very Good Very Good

Support

Grails1 Vaadin2 Play3 Spring MVC4

Page 16: Comparison of Java Web Application Frameworks

©ardentlearner

SummaryFramework Complexity

Vaadin proves to be the simplest of frameworks with fewest dependencies, while Play struggles,

particularly with its reliance on Scala knowledge and SBT.

Ease of Use

Grails and Vaadin did well when it came down to the ease of use, particularly due to the

configuration, and design mode. Spring suffered, due to the amount of knowledge required to use

and the amount of configuration required.

Rapid application prototyping

Grails and Play coming out on top, due to the mostly to the scaffolding support. Vaadin was close

behind and the Vaadin Directory of plugins is worth a mention. Spring struggled here, with few out

of the box components.

Throughput/Scalability

Play was easily the winner here as it’s features are so suited to scaling and throughput, supporting

async applications with Akka actors. Vaadin also did well as its model is based around client side

execution.

Page 17: Comparison of Java Web Application Frameworks

©ardentlearner

SummaryCode Maintenance/Updates

Grails did particularly well with most configuration relying on default convention.

UX, Look and feel

Vaadin excelled here, with neat usage of customizable themes and the ability to inherit from

existing themes. Presentation wise, this is very easy on the eye. Spring MVC suffered here,

because clearly this is not one of the goals of the framework.

Documentation & Community

Grails and Vaadin again took top spot with their vibrant communities and extensive docs.

Framework Ecosystem

Grails and Play both have good ecosystems, including build support all the way to tools and

plugins. Spring MVC also has a good ecosystem, although some of which is commercial.

Page 18: Comparison of Java Web Application Frameworks

©ardentlearner

Thank You