15 Java frameworks that give developers a boost

Java development frameworks can help developers get an application up and running faster, offering code reuse and eliminating the task of building boilerplate code

15 Java frameworks that give developers a boost
Astris1 (CC BY-SA 3.0)

Java development frameworks can help developers get an application up and running faster, offering code reuse and eliminating the task of building boilerplate code.

Developers have many choices of Java frameworks. Here are 15 prime choices for building Java platform applications, in alphabetical order.

Blade: lightweight MVC framework

This MVC framework is based on Java 8 and the Netty web server. Described as lightweight and simple, Blade offers a RESTful-style routing interface and has no invasive interceptors, documentation states. Blade’s source code is smaller than 500KB.

To build an application with Blade, developers create a common Maven project. Template engine support and a streaming API style are included.

Blade’s development began in 2015, with the goal of providing a full-stack web framework. Plans call for adding support for the modularity featured in Java 9 as well as backing for more web ecosystem components.

Where to download Blade

Download Blade from its GitHub repo.

Dropwizard: “ops-friendly” web services

First released in 2011, Dropwizard is a framework for buildings “ops-friendly” RESTful web services. With Dropwizard, you use the Jetty HTTP library o embed an HTTP server into a project. The Jersey JAX-RS implementation enables writing of testable classes, which map HTTP requests to Java objects. There is also the Jackson tool for JSON.

Key to Dropwizard is productivity during and after development, core contributor Nick Babcock says. Developers can focus on business logic instead of writing code for metrics, configuration and logging. Dropwizard’s builders plan to keep looking at improvements to projects such as Jetty and Jersey when determining where to improve the framework.

Where to download Dropwizard

You can download Dropwizard on GitHub.

Grails: anchored by the Groovy JVM language

Now maintained by the Object Computing Initiative (OCI), Grails is a framework for building web applications for the JVM. Developers can build applications such as content management systems and e-commerce sites, as well as RESTful web services. Based on the Groovy JVM language, Grails works with Java technologies including Java EE containers, Hibernate, and Spring, and it operates with the Java Development Kit.

Fans say it requires considerably less code and less complexity than what is needed to build applications with other frameworks. Cofounded by Graeme Rocher, the decade-old framework’s Version 4.0 is due in late 2018, with capabilities including support for Groovy 2.5, a Java 8 baseline, and Java 9.

Where to download Grails

You can download Grails from Grails.org.

GWT: Java in, JavaScript out

Pronounced “gwit” and also known as Google Web Toolkit, GWT lets developers write client-side applications in Java and deploy them as JavaScript. It has been used in Google products such as AdWords and Wallet.

GWT supports development of browser applications without the developer having to be an expert in technologies such as JavaScript or XMLHttpRequest. The GWT SDK includes the Java libraries, compiler, and development server. The GWT compiler provides optimizations across the code base, with inlining methods, dead code removal, and optimizing strings. Split points in code can segment a download into multiple JavaScript fragments and improve startup times.

Where to download GWT

You can download GWT from the GWT website.

JavaServer Faces: specification for web UIs

The 14-year-old JavaServer Faces (JSF) features a Java specification for building component-based UIs for web applications. It also is an MVC web framework to simplify construction of UIs for server-based applications, with reusable UI components in a page. JSF offers a standards-based approach for UI development, with applications portable across Java EE application servers.

JSF 2, the current version, uses Facelets as its default templating system. View technologies including XUL (XML User Interface Language) and plain Java also can be deployed.

There are implementations on top of JSF such as Apache MyFaces. Also, the Eclipse Foundation has its JSF Tools Project, which is intended to simplify development of JSF applications.

Where to download JavaServer Faces

You can download Glassfish to get the JSF 2.0 reference implementation.

JHipster: choice of Angular or Spring Boot

Working on top of the Spring Boot application builder, the four-year-old JHipster provides a modern web services or microservices architecture. It can build both Spring Boot and Angular applications. JHipster is sponsored by Okta, which offers a service providing secure access to tools.

Client-side technologies include Yeoman, Webpack, Angular, and Bootstrap. Server-side technologies include Maven, Spring technologies, and Netflix OSS.

In development are JHipster 5, support for Spring Boot 2 on the back end, and support for the React JavaScript UI framework on the front end. JHipster’s domain language will be enhanced as well.

Where to download JHipster

You can download JHipster from GitHub.

MyBatis: easier relational database integration

The primary selling point of MyBatis is simplifying the use of JDBC and reducing the amount of code needed when writing Java applications that interact with relational databases. MyBatis distinguishes itself from object-relational mapping tools by not mapping classes to tables but instead mapping objects to SQL. With MyBatis, SQL is not hidden from the developer. The framework offers flexibility in terms of databases and schemas that can be used with it.

MyBatis originally was called iBatis, which was first demonstrated publicly in 2002.

Where to download MyBatis

You can download MyBatis from the MyBatis website.

Play Framework: reactive web framework

Using a lightweight, stateless architecture, Play is a high-productivity, reactive web framework for both Java and Scala. It provides hot loads on code changes, where developers make changes, refresh their browser, and see changes immediately without recompiling or deploying.

Asynchronous APIs let developers build web applications that can scale with minimal resources. Built on the Akka toolkit for distributed applications, the framework was first released in 2007 and underwent a rewrite in 2012. Plans call for making Play more modular, with modules intended for microservices. Multiple Play services would be able to run at once via a single command, using hot reload. Better support for microservices patterns such as asynchronous messaging and event sourcing is under consideration as well.

Where to download Play Framework

You can download Play Franework from PlayFramework.com.

PrimeFaces: lightweight UI framework

A UI framework for Java EE and JavaServer Faces, the decade-old PrimeFaces serves as a lightweight library configured as a single .jar file with no dependencies. The framework, sponsored by e-commerce provider Prime Technology, has more than 100 components, a touch-optimized mobile kit, client-side validation, and a theme kit.

PrimeFaces’s developers are experimenting with JSF Renderer APis to determine if a JSF application can render progressive web apps (PWA) with a Java back end baked in. They also are looking at having JSF components rendering web components to take advantage of modern web APIs.

Where to download PrimeFaces

You can download PrimeFaces from PrimeFaces.org.

Spark Framework: microframework for quick development

Spark Framework (not to be confused with Apache Spark big data patform) is a declarative web framework, letting developers get a working back end up and running quickly. Using language features of Java 8, the seven-year-old Spark Framework offers an expressive API.

Spark’s develoeprs plan a major update of the original framework, to be labeled Version 3.0, and an official version of Spark for the Kotlin language.

Where to download Spark Framework

You can download Spark Framework from SparkJava.com and, from there, get it via Maven or GitHub.

Spring Framework: early support for dependency injection 

Perhaps the best-known Java framework, the 14-year-old Spring Framework has long featured dependency injection as a key capability, even offering this capability before Java Enterprise Edition (EE) had it.

The framework features a programming and configuration model for enterprise Java applications. It purports to take care of application “plumbing” so development teams can focus on application-level business logic. It also provides backward compatibility and testability of code, transaction management, data access and web applications.

Partner projects in the Spring line include Spring Boot, to help build Spring applications.

Where to download Spring Framework

You can download Spring Framework from the Spring website.

Struts: Apache’s MVC framework

Struts is an MVC framework for building web applications. It uses a plugin architecture, with plugins for REST, AJAX, and JSON included. Struts has tools to provide for and maintain web-based user interfaces and services, helping developers bridge the presentation and service layers as well as assisting with type conversion and input validation. Struts combines a request-response model with HTML and AJAX UI components.

The initial Struts 1.0 framework debuted in 2000; Struts 2 emerged after the WebWork 2 code base was merged with Struts in 2006. Development is about to start on Struts 3, which Apache terms a radical renovation of the framework.

Where to download Struts

You can download Struts from the project website.

Tapestry: component-oriented framework

Apache’s Tapestry is a component-oriented framework for building scalable web applications in Java. Coding can be done in Java, Groovy, or Scala.

In Tapestry, pages and components are POJOs (plain old Java objects). Apache says that developers get the speed and depth of Java and agile development akin to Ruby or Python via access to Java language features and the Java ecosystem. POJO classes, templates and exception reporting are offered as well. The live class-reloading capability lets developers change code, refresh the browser, and see changes, similar to the Play Framework.

Tapestry 1.0 was created in 2000. The current version, Tapestry 5, was a rewrite with no shared code from Version 4. Plans for the upcoming 5.5 release call for adding Java 9 support, performance improvements, and TypeScript compilation.

Where to download Tapestry

Download Tapestry via Maven: mvn archetype:generate -DarchetypeCatalog=http://tapestry.apache.org.

Vaadin Flow: linking browser and server

Bridging the web and Java ecosystems, the Flow Java web framework from Vaadin features bidirectional communication between the browser and server, linking the web UI to server-side Java. Direct access is provided from the DOM to the server. Apps run on the JVM.

Part of the Vaadin 10 development platform, Vaadin Flow was introduced in October 2017 in beta Vaadin had been a monolithic framework but the company split the framework into Flow and the web component set as of Vaadin 10. Vaadin Flow’s builders want to make it faster and make it easier to build progressive web apps.

Where to download Vaadin Flow

You can download Vaadin Flow from GitHub.

Vert.x: reactive apps on the JVM

The Vert.x toolkit from the Eclipse Foundation is event-driven and nonblocking. This means applications can handle concurrency using a small number of kernel threads. Vert.x can be used with Java, JavaScript, Groovy, Kotlin, Ruby, Ceylon, and Scala. Idiomatic APIs are provided for supported languages.

The framework is not restrictive; developers are given “useful bricks” and can build an app how they want, its creators say. Vert.x also can be used for building lightweight microservices.

Vert.x 1.0 was released in September 2012. Version 3.5.1 was released in February 2018, woth support for the JUnit 5 Java testing framework.

Where to download Vert.x

You can download Vert.x from the Vertx.io website.

Wicket: abstracted request-oriented web technologies

Apache’s Wicket is a component-oriented web framework that abstracts away request-oriented web technologies and provides UI concepts to developers, who can build UIs using Java and HTML. With Wicket, a page consists of components working together to provide desired functionality. Developers think in terms of pages, panels, buttons, links, forms, and list views. Components also can have internationalization, JavaScript, and CSS files associated with them.

The 14-year-old  Wicket became an Apache project in 2007. Next on the docket for Wicket is the introduction of Java 8 idioms. Developers will be able to use new time/date APIs and lambda expressions with Wicket components. (Lambda expressions will cut down on boilerplate code.)

Where to download Wicket

You can download Wicket from its Apache project site.

This story, "15 Java frameworks that give developers a boost" was originally published by InfoWorld.