Saturday, September 20, 2008

Java On Rails

This is a ruby on rails succedaneum for Java. You can find the code and examples here.
http://code.google.com/p/jmap/

This framework can make URI map to Class and a Method call, and automatically create a form value bean to map the form values to bean's fields, use the validating annotations to check these values and output the multi-language error messages.

For example, the URI: /jmap/main/login, will be map to the class "package.prefixname.controller.Main" and call the controller class method "public void Login()". Before the controller method call, a form value bean "package.prefixname.bean.main.Login" will be created and set all form values to its fields and checked against the fields validating annotations. So, in the controller method call, you can easily get this form bean from the request attribute with a key name "MainLogin". You can check this bean's status for the form values validating and any other business data status to determin a response with a "render" method call.

No comments: