Skip to content
branaway edited this page Sep 14, 2010 · 5 revisions

under construction….

How does it work?

Japid is a Java code generator that transforms html based templates to Java source files that are compiled and linked statically to applications.

How to install/upgrade to the latest module?

# play install japid
# cd my_project_root
# play japid:regen
# play eclipsify

Basically the install command will replace the current module if it has been previously installed.
Then you need to regenerate all the java artifacts from the html templates.
After that you create the eclipse project files since the new version of the module might have newer lib dependency.

How does it compare with the Play’s built-in template engine?

Advantage

  1. performance: the Japid by itself can be 6-12 X faster than the build-in Groovy based template engine
  2. server-side-include with cache control to better partition complex pages’ data retrieval and rendering.
  3. cleaner syntax
  4. Java as EL, so no new language to learn.
  5. compile-time template error check, so the templates will probably work fine if they compile fine.

Disadvantage

  1. th EL uses Java so it’s more verbose in some cases
  2. internally it involves a two-step process to run: html → Java → bytecode. However it’s been handled for you implicitly if you us the implicit parameter binding. See it here.