Java's Spring Framework gets a new competitor

The Datamill framework brings functional programming to Java

Datamill, an open source framework that leverages Java 8 and lambdas, is bringing functional programming to Java-based web development.

Positioned as an alternative to the popular Spring Framework, Datamill uses a functional reactive style built on RxJava, a library for composing asynchronous and event-based programs, and leverages the Java Virtual Machine.

"Modern-day Spring allows you to be pretty concise," lead developer Ravi Chodavarapu said. "You can get an elaborate web service up and running using very little code. But when you write idiomatic Spring, you find yourself strewing your code with lots of magic annotations, whose function and behavior are hidden within complex framework code and documentation."

With Datamill, developers can specify how data flows through an application and how to modify that data. "Unlike other modern Java frameworks, it makes the flow and manipulation of data through your application highly visible," release notes on GitHub state.

Chodavarapu recalled having to spend hours deep-diving through Spring code to figure out how to do something that strayed from straightforward uses of that framework. "It made me a better -- and more valuable -- consultant to go down the Spring rabbit hole, but I found that it just isn't sustainable for just some members of a team to be framework experts," he said. "So this was one of the things I wanted to focus on with Datamill."

Datamill, still in a very early stage of development, currently is suited especially for writing HTTP services that return JSON and are backed by a MySQL database, Chodavarapu said. "The framework gives you pretty low-level control over what the responses look like, so if you want to make your services RESTful, you will have to adhere to some strict guidelines yourself," he noted. "We don't do anything at the framework level to enforce RESTfulness."

Applications written with datamill are intended to be started primarily as standalone Java applications, with developers writing the HTTP server, specifying how requests are handled, and having the server start listening on a port. "Unlike traditional Jave EE deployments where you have to worry about configuring a servlet container or an application server, you have control of when the server itself is started," Chodavarapu said. This makes creating a Docker container for server simple, and developers can package up an executable JAR file using Maven and place it in a standard Java container.

Copyright © 2016 IDG Communications, Inc.