Modern Java Web frameworks

Java is still the preferred choice of programming language for enterprises (Reference – TIBOE Index). Java’s matured open eco-system and the robust virtual machine (JVM) make the enterprises go for it withstanding the criticisms of being verbose and entailing longer time to market.

The hard to make good web recipes from JEE spec allowed the flourishing of web frameworks. Per Zeroturnaround web framework index, here goes the frameworks that top the list –

  1. Spring MVC
  2. JSF
  3. GWT
  4. Spring Boot
  5. Grails
  6. Struts2
  7. Play framework
  8. JAX-RS
  9. Apache Wicket
  10. Vaadin

All these are made with certain goals of solving specific type of problem. Your selection of one of these has to be weighing heavily on the design goals. All of them follow loose variants of Model View Controller (MVC) pattern. Here’s a loose classification of these frameworks.

  • Component (Widget) based UX framework
  • Request Routing based server-side framework
  • Full stack framework
  • Micro services framework

Component based UX

Component based web frameworks provide an abstraction letting java developers build complex UI applications. Developers are fairly insulated from Front End (browser) technologies allowing them to code and debug in server side itself. They promote a programming model where you design the UX in terms of component hierarchy. It’s more like building traditional AWT/swing desktop application.

JSF

JSF is a component based web framework and a part of JEE spec. Being a part of JEE specification is probably the reason for its wide adoption. It saves its component state in the server side. JSF application usually has models (POJO – Managed Beans), views built with JSF components and the configuration (xml) files that glue the models and views. JSF is complex and may not be the right choice for rapid application development.

GWT

Google Web Tookit’s (GWT) objective is to allow java developers to create web UI in java without worrying much about html/javascript quirks. Comes with canned set of widgets to build complex web application. GWT compiler generates the required javascript saving the expertise requirement of developers.

Vaadin

Vaadin is similar to GWT. Vaadin supports theming. Check the features of Vaadin.

Apache wicket

Wicket force you go for a steep learning curve. Wicket provides a cleaner separation between java code and HTML so let the HTML developer code the markup. It boast of a maintainable code over long run.

Request routing framework

These frameworks generally sit at the presentation tier of the server and deals with request routing.

Spring MVC

A module of Spring projects. Popular due to the popularity of spring framework. It just provides the MVC model for dealing with requests. It’s often critiqued for being fat with hard to grasp concepts.

Struts2

Often considered as legacy technology. Provides the basic server side presentation framework. Doesn’t impose restrictions on the browser side markup or business / persistence tier on the server side.

Full stack framework

These are much beyond the frameworks and made to get started quickly achieving high velocity. Most of them package more than one existing technology in providing a rapid application development platform.

Spring boot

Spring boot eases use of Spring framework with an opinionated view of building web application. Spring boot packages the entire deployable code bundled with web container into a fat jar.

Play framework

Play is Robust, Light-weight, Stateless(no session per connection) and Modular web platform. Supports non-blocking I/O and made for high scalability. Uses Jboss Netty web server. Composed of number of modules. Provides built-in testing tools. Supports hot reloading. More aligned with Scala than Java. Easy to get started but difficult to master – Once conquered, you are unstoppable.

Grails

Grails is a Groovy (JVM language) based web platform. Internally uses Spring boot. Supports hot reloading. Designed for rapid development work.

Micro services framework

These frameworks are popular in the micro services world. Sprint boot and Play framework are obvious choices here as well for complex implementations.

Spark

Tiny framework suitable for quickly exposing few REST end points.

JAX-RS

JEE 6+ spec for RESTful web services. Popular as supported by JEE complaints web/app servers. Generously uses annotations. Jersey, RESTeasy – popular implementations.

Drop Wizard

Simple, light-weight framework for micro services. Comes packaged with bunch of operational tools letting develop production quality REST services in short time.

Reference

Leave a Reply

Your email address will not be published. Required fields are marked *