Javalin 2.0 supports WebJars web libraries, JSON modularization Credit: Matthew Kerslake

Javalin 2.0 supports WebJars web libraries, JSON modularization

Version 2.0 of Javalin, a lightweight framework for the Java and Kotlin languages, is now shipping.

Supporting HTTP/2 and async requests, Javalin 2.0 provides interoperability between Java and Kotlin and is intended to be simple to use.

Changes made since the Version 1.7 release in May include:

  • Support for WebJars client-side web libraries.
  • Modularization of JSON and template functionality, so developers can plug in their own mappers/rendering engines.
  • The addition of a CRUDhandler to remove boilerplate from creating standard CRUD (create, read, update, delete) APIs.
  • Improved support for single-page applications.
  • Better exception handling for async requests.
  • The Pac4 security library.
  • Template functionality has been moved to a single ctx.render() function that uses the correct engine, based on file extension.
  • Rewritten WebSocket implementation.
  • Rewritten test suite.
  • A RequestLogger interface has been added.
  • Default values have been changed in some instances.
  • Functions return list instead of array.
  • Empty collections are returned instead of null.

Rather than being a full web framework, Javalin is a lightweight REST API library, or microframework. Although Javalin has no concept of MVC, its support of WebSockets, template engines, and static file-serving lets Javalin be used for building a RESTful API back end and serving index.html with static resources, if a developer is building a single-page application. To build a more traditional website, template engine wrappers can be used. The framework began as a fork of the Spark framework for Java and Kotlin but was rewritten, influenced by the Koa.js web framework.

Where to download Javalin

You can download Javalin from the project’s download page.

IDG Insider

PREVIOUS ARTICLE

«Samsung Galaxy Note 9 review: The best never felt so bland

NEXT ARTICLE

Soundcast VGtx Bluetooth audio transmitter review»
author_image
IDG Connect

IDG Connect tackles the tech stories that matter to you

Recommended for You

alex-cruickshank

Platform or publisher?

Tech Cynic – IT without the rose-tinted spectacles

martin-veitch-thumbnail

Mark Shuttleworth’s next mission: making private clouds affordable

Martin Veitch's inside track on today’s tech trends

dan2

GDPR-based extortion could be the next cybercrime trend

Dan Swinhoe casts a critical eye on the future

Our Case Studies

IDG Connect delivers full creative solutions to meet all your demand generatlon needs. These cover the full scope of options, from customized content and lead delivery through to fully integrated campaigns.

images

Our Marketing Research

Our in-house analyst and editorial team create a range of insights for the global marketing community. These look at IT buying preferences, the latest soclal media trends and other zeitgeist topics.

images

Poll

Should the government regulate Artificial Intelligence?