Imagine a bacon-wrapped Ferrari. Still not better than our free technical reports.

The Ultimate Java Web Frameworks Comparison: Spring MVC, Grails, Vaadin, GWT, Wicket, Play, Struts and JSF

7. Code Maintenance/Updates

Releasing you first version of code is the start of a wonderful journey of support, migration and new features. But how wonderful will that journey actually be? Will you be in a state where each project, using the same framework is configured differently? Planning for the future saves regretting for the past.

Spring MVC

Unlike the convention-over-configuration frameworks like Grails and Play, Spring MVC is heavy and dense despite taking advantage of the Model-View-Controller paradigm (Spring -> MVC <-). Updating and code maintenance is manageable if you’re already familiar with the intricacies of the framework and the project itself, but if you’re just diving in it can be a little overwhelming and slow going. But still, annotations enable to access all kinds of data in a declarative manner and this way, not much hacking is needed.

Score: 3/5 — Annotations are cool. They make life so much easier. Multiple ways to configure. Server side logic is easy to maintain but if comes to managing layouts and complex UI-s, it will be hard.


Grails

Just like the Play framework, 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. Hot code reloading makes the updates even more fast.

Score: 4.5/5 — Convention over configuration makes most of Grails projects look similar and if you are new to Grails – those conventions are easy to grasp.


Vaadin

So you want to change your Vaadin implemented UI but don’t want to change all the code in the world? Well, it’s not actually that bad, as many of the Vaadin components share many of the same characteristics, so if you wanted to switch from one component to another to capture input slightly differently, e.g. from a drop down list to a table of elements, it is surprisingly easy to do so. Very often it’s just a case of switching the class names around and maybe touch up one or two attributes and you’re good to go. Code updates can be quite slow, but JRebel integration is supported.

Score: 4/5 — Very good code reuse and component class hierarchy model, as well as switchable themes, shame it can be a little slow to update.


GWT

Being a component driven framework with a JavaScript-esk feel (it does compile to JavaScript after all) gives GWT a leg up on manageability and extendability. The code is easy to step through line by line and the availability and use of widgets allows a lot of code reuse. The automatic code generation through the Design mode is relatively organized and manageable as well.

Score: 4/5 — Very easy to maintain and update but automatically generated code from the Design mode can be hard to deal with.   


Wicket

Maintaining and updating code written for the Wicket framework is manageable and further helped by its execution of the convention over configuration methodology. The user components are based on inheritance and so are easy to debug, and the separation of style and logic means you can reuse a lot of your code and easily change the look of your web application without worrying about breaking the logic. HTML templates are easy to modify and errors come out early and clearly.

Score: 4.5/5 — Separation between HTML and Java allows for easy design changes without ruining existing logic.  No additional configuration files to deal with.


Play

Code written for the Play framework is readable, as the framework follows a convention over configuration methodology that makes most Play framework projects look very similar in structure. This enables a developer to switch between applications without having to relearn the ecosystem for every project. The built in templating system also helps with the readability of code and can help create incredibly powerful and useful applications with lower Lines of Code counts. Play also has reloading of components and code built in which definitely helps cut down on time during the development phase of your applications.

Score: 4/5 — The convention over configuration aspect of Play leads to readable code, however the reliance on Scala does limit the readability to Java-specific developers.


Struts

Similarly to Spring MVC, maintenance should not be a big problem if you are familiar with Struts, but if you are new to the project, the learning curve can be steep. Even if you have experience with Struts, your new project may have a bit different structure and different configuration.

Score: 3/5 — Lots of different aspects to grasp. Two Struts projects can also look pretty different.


JSF

JSF projects leverage existing design paradigms such as Model-View-Controller to help enforce maintainability and readability. The framework itself does not have any features that particularly impact readability or maintainability. One of the stated goals of JSF is to help developers produce better code, but we do not see how they facilitate that.

Score: 4/5 — JSF leverages pure Java syntax in well-defined paradigms to create projects that any standard Java EE developer can step in and work on.

web-frameworks-code-maintenance-updates

Framework Score

Grails

4.5

Wicket

4.5

Vaadin

4

GWT

4

Play

4

JSF

4

Spring MVC

3

Struts

3



DOWNLOAD THE PDF