About java in jails

java in jails? is this just a java version of ruby on rails??

The answer is "no". java in jails is not a java version of ruby on rails, but it was inspired heavily by parts of it.

rails is a framework intended to make building web applications easier, allowing you to write less code and get more done. It is full of conventions about how things should be done, and provides a way to do almost anything you can imagine. java has frameworks too; some of the more well known ones are spring, wicket, tapestry, and so on, most of these frameworks can do much of what rails have to offer (in their own way). java also has a lot of older frameworks that can't really do a lot of what rails has to offer. lots of java shops also have legacy proprietary frameworks that can't even do a lot of what those older java frameworks do. some projects are not big enough to justify using a framework, or use a more skeletal approach like JAX-RS. this is where jails comes in.

jails is not a framework. jails is a framework independent, lightweight API that provides a very simple way to:

  1. display html forms, nicely formatted, with error highlighting
  2. validate form data on the front end
  3. validate form data the back end.
  4. populate objects with the form data

jails is entirely configuration free, and provides a simple--but optional--set of conventions for you to follow to make certain boilerplate tasks easier.

jails, like rails, is opinionated, it uses a curated set of technologies to accomplish it's objectives:

  • For displaying forms we use a custom tag library.
  • For populating objects we use apache-commons BeanUtils (though extending its capabilities with a custom wrapper).
  • For server side validation we use the hibernate implementation of JSR 303 (bean validation specification).
  • For client side validation we use a position:abosulte, a jquery-library written by Cedric Dugas. http://www.position-absolute.com/articles/jquery-form-validator-because-form-validation-is-a-mess/

    On top of this I have added some custom annotations to give you more control, if needed, but in order to use jails at minimum, all you will have to do is annotate your classes with JSR 303 constraints (which you may want to look into doing anyway).

    For more detailed documentation, check out the a href="/using.html"using jails page/a or read the a href="apidocs/index.html"javadoc/a.