JLoom is a software tool designed to generate text using a modular template language. It offers a flexible and customizable approach to text generation, making it an ideal choice for developers and businesses that require a reliable template language.
JSP like Syntax
The syntax and semantics of JLoom templates are similar to Java Server Pages (JSP). If you already know JSP, you will have no problem writing JLoom templates.
Modularity
JLoom doesn't have include-tags like JSP, instead of include-tags, JLoom supports modular composition of templates. Templates are full encapsulated like classes with parametrization and compiletime type-checking. You can make a top-down/bottom-up design of the text processing in your application.
The modular templates enhance the maintainability of your code and eliminate redundancy. You can also organize your templates hierarchically in packages, and make modular extensions of the language with macros.
Simplicity
JLoom is easy to learn. The syntax is clean and uniform. Because it is built upon Java, it can concentrate on its core function: building a bridge from Java to text-generation. If you are already familiar with Java syntax, there is not much to learn.
The operators, rules for assignments, and expressions are the same. You can use the most recent Java (currently Java 1.5) syntax features, like Generics, Varargs, Autoboxing, etc. The basic syntax is simpler than JSP syntax, but it is very powerful by allowing the definition of new syntax elements.
This is done by writing macros, which are nothing else than JLoom templates themselves. The basic JLoom syntax is extended by such macros. You can extend the language by writing your own custom macros, which are simple and powerful.
Universality
JLoom can be used to generate dynamic web content, and you can use both together: a JSP which accepts the HTTP requests, handles HTTP specific things like setting the content type and delegates the HTML generation to a JLoom template.
JLoom can be used for arbitrary purposes such as generating source code, XML (as an alternative to XSLT), documentations, Emails, configuration files, scripts and more. Everywhere you have text-generation in your application, JLoom can help you to get an easy maintainable and extendable solution.
JLoom lets you control the indention of the generated text. This is especially useful for code generation. JLoom uses itself (JLoom macros) to create the generator classes, and therefore the generated Java code has correct indention.
Efficiency
JLoom generates text extremely fast. Like in JSP, JLoom generation is done in two phases. In the first phase, the template is parsed and compiled into a Java class. This phase takes place only one time after creating/changing the template. Subsequent generations just "throw out" the text.
Version 1.2: N/A