Software and Volleyball

Java Micro Frameworks

A few weeks ago, I helped organize a Meetup titled “The Battle of the Java Micro Frameworks” hosted at Kabisa in Weert. I came across a number of Java micro frameworks before and wondered how they compared with popular frameworks such as Spring. To be able to assess a number of these frameworks in a limited amount of time and in a nice environment, I tried to get more people involved in the evaluation process by organizing a Meetup.

The Meetup

The idea of the Meetup was to build a number of Twitter-clones in small groups using various micro frameworks, without any prior experience with any of the frameworks. Each group worked on a Twitter clone of their own for about an hour and afterwards continued working on the clone built by one of the other groups.

Initially, we were going to look at the following frameworks:

Due to the limited number of participants, we had to drop a few frameworks. Without any other means to assess the frameworks without going into details, we dropped the ones that were less popular on Github and ended up looking at Jodd, Ninja, Pippo, and Spark.

Preparation

In an attempt to give the groups a small head start, I tried to set up a few minimal apps for each of the frameworks. Doing so already highlighted some differences between the frameworks; some seemed to be more “micro” than others.

Setting up a small app for Jooby, Spark, and Pippo turned out to be really straightforward. The end results are available on Github:

For each of these frameworks, a small pom.xml and a few lines of Java were enough to get started.

In the limited time I had available, setting up a small app with only a few lines of code for Ninja and Jodd turned out to be too much to ask. The participants that worked with these two frameworks seem to have ended up running into the same problem I had and used rather large example applications as starting points:

For Ninja, setting up an app to get started is only a matter of executing a single command:

mvn archetype:generate -DarchetypeGroupId=org.ninjaframework -DarchetypeArtifactId=ninja-servlet-archetype-simple

The end result itself is not “micro”, but at least it’s clearly documented how to get started.

For Jodd, the situation is a little different. The main page of Jodd’s documentation links to pages named About Jodd, Jodd overview in 5 minutes, Jodd micro-frameworks in 30 minutes, Quickstart » instant run, and Web app example » step-by-step. For someone looking at Jodd for the first time, each of these pages look like they could describe how to set up a small app with Jodd. Some of them describe Jodd’s features, however, and some discuss or link to quite large applications.

Evaluation by Participants

In total, nine people attended the workshop. Some of them worked as software engineers, some of them were students. Each of the participants had experience with software development in Java, but none of them had ever worked with the frameworks we tried.

The participants noted the following general impressions, pros, and cons. You’ll see that their findings don’t always correspond with my own. I’ve copied the responses of the participants straight from the evaluation forms without rephrasing, to ensure that I didn’t influence their answers.

Ninja

General impressions:

Pros:

Cons:

Spark

General impressions:

Pros:

Cons:

Pippo

General impressions:

Pros:

Cons:

Jodd

General impressions:

Pros:

Cons: