Javascript dancing with Spring MVC
Milonga is library for helping developers writing javascript code to make Spring MVC controllers.
To take advantage of Javascript features such as dynamic typing, closures and JSON expressions, you can write Spring MVC controllers simple and easy.
Milonga is based on Rhino, which is an open-source implementation of Javascript written entirely in Java. Milonga controllers are compiled to Java bytecode and executed on JVM where Spring MVC application is executed. Therefore Milonga controllers can be used with existing Spring MVC controllers on the same JVM. For example, you can write Javascript code for some Spring MVC controllers.
Milonga Controller Example
Atmos.handler('/user/info', function() {
var userInfo = {
'id' : '[email protected]',
'firstName' : 'John',
'lastName' : 'Milonga'};
return userInfo;
});
You can define Spring MVC REST application by coding Javascript easy and fast way.
Using Maven
<dependency>
<groupId>com.skplanet</groupId>
<artifactId>milonga</artifactId>
<version>0.11.0</version>
</dependency>
Ready to use Milonga by adding dependency to to your build manager.
Check the installation section for more detail.
- Based on Spring MVC
- Writing Spring MVC handler in Javascript code
- RESTful request dispatching
- Using Rhino internally
Milonga is released under version 2.0 of the Apache License.