Overview / Java

Systems

The major sweet spot for JeeWiz is to generate multi-tier web applications for Java, using a variety of frameworks as the implementation platform. But JeeWiz is universal - it can generate anything. Here are some other ways we use JeeWiz to build systems:

Code Generation for textual DSLs: Textual DSL programs are written in a text file - as opposed to graphical DSLs, which typically have a way of emitting XML. To handle textual DSLs, it is natural to use JeeWiz to generate "code" - Java code or some virtual-machine code - but JeeWiz needs some XML as its starting point. Where does this come from?

The answer is a parser - like YACC, JavaCC or ANTLR. JeeWiz supports ANTLR. The nice thing about parsers is that they produce an abstract syntax tree as their tree ... which is easily converted to XML. If the language is stand-alone, JeeWiz can use it as the intent. Alternatively, it can be pulled into a larger build by reading it in as an 'executable pattern', allowing a complete intent to be built up from a combination of graphical and textual DSLs.

JeeWiz Scripting: For single-step file processing, both for XML files and non-XML files, we use 'JeeWiz scripting'. This runs JeeWiz without doing the usual Ant build. For example, we used JeeWiz scripting to reverse-engineer a dump of a few hundred e-mails into files for a simple mail server. JeeWiz will be attractive as a scripting language for developers for its easy XML processing, access to all the extended Java functionality and of course the simplicity of Velocity.

XML Transformations: We highlight the case of XML transformations, because JeeWiz has a wide range of features for XML handling. This is based on our experience of transforming XMI (XML Metadata Interchange) for UML models, initially with XSL-T. XSL-T proved very difficult to program for what we wanted, but the killer was that a small transform of a complex language was taking 5 minutes to run; once we'd converted it to JeeWiz, this came down to a few seconds. JeeWiz now has a wide range of features for doing complex transformations on XML documents.

Another technique we use is to do transformations between two complicated XML documents in two stages, using JeeWiz's simple XML format as the intermediate format. This turns out to be a lot simpler than doing a complex-to-complex transformation.