Java and Web development
When it comes to Web development, Ruby has the Sinatra framework and Node.js has Express.js. Now, Java has micro Web framework Jooby.
Built by developer Edgar Espina, Jooby offers modular, stateless application development leveraging NIO (non-blocking IO) servers including Netty, Jetty, or Undertow.
The main intent of Jooby is simplicity, according to Espina. "Although Java is a simple and easy-to-learn programming language, building Web applications in Java has always been a challenge, " he said in an email. "The Java community has done a lot to simplify the development of Web applications. Still the effort to build a Web application in Java is high compared to Ruby or Node. Jooby comes to fill that gap and simplify Web development in Java by providing an unopinionated, simple, and easy-to-learn micro Web framework."
At the core of Jooby are modules, which are built to expose functionality from an external library. "They are thin and do a lot of work to bootstrap and configure the external library, but they don't provide a new level of abstraction nor [do] they provide a custom API to access functionality in that library. Instead they expose the library components as they are, " Espina said. "This is a major difference with other Java Web frameworks."
Jooby provides defaults for typical aspects of applications, such as database access, authentication, sessions, template engine, and email. This makes it easy to get started using it, Espina said, "but at the same time it is incredibly flexible and modular, and more experienced users can mix and match modules as needed and even write their own integrations."
Stateless application development in Jooby enables it to scale without major effort, especially if developers build REST APIs with header/JWT (JSON Web Token) authentication. There are some use cases, however, where developers need to save user information. "For such use cases, you can use the HTTP Session, " said Espina.