days
-6
-8
hours
-1
-7
minutes
-2
0
seconds
-3
-7
search
“Do more, more easily”

Jooby: A micro web framework for Java 8

Michael Thomas
Freeze light – infinity image via Shutterstock

Jooby is a (relatively) new micro web framework inspired by express.js, which in line with the slogan by its creator Edgar Espina “do more, more easily” emphasizes the strengths of Java and would like to iron out its weaknesses.

Each language has its drawbacks, so does Java: on the one hand secure, well-tested and downward compatible, the language is sometimes rather “bloated” – a bit due to libraries which become more and more extensive with time and contain a number of things which are seldom, if ever, needed for development.

The first generation of lightweight Java frameworks occasionally aimed at reducing this unnecessary ballast, that is obtain the advantages of JVM and at the same time, reduce development time. Micro frameworks like Spark, Jodd or Ninja expand these thoughts even further: in line with their own understanding, they present focused and agile solutions which aim at reducing the production process to the essentials. This line-up also includes the still quite young Jooby micro web framework for Java 8 which is based on several sophisticated technologies.

Jooby Basics

Jooby follows the basic concept: “do more, more easily” – so for example reflection, annotations and dependency injection are reduced to a minimum and completely optional in a few areas; thanks to the use of the JVM Bootstrap in the standard deployment mode, developers can furthermore be shown a way out from the “classpath abyss.”

As a multi-language framework, Jooby allows developers to write applications in Java and JavaScript; Scripting à la express.js, Sinatra, etc., as well as MVC (Spring, Jersey) can be used as programming models. The multi-server support includes, aside from Netty, Java Webserver and Undertow as well. Web Sockets are supported as well, as is Dependency Injection via Google Guice (an open source dependency injection framework for Java 6 and up.) By running mvn jooby:run, you have a Maven plug-in available which allows for hot reloads. The scope of service is rounded off with an extensive module ecosystem.

Jooby requires at least Java 8 and Maven 3.

Author
Michael Thomas
Michael Thomas studied Educational Science at the Johannes Gutenberg University in Mainz and has been working as a freelance author at JAXenter.de since 2013.