Home Index

FireStorm/DAO Java Persistence Code Generator
Date: May  20,  2005
Subject: Online Programmer Ezine, Volume 4, No.1
Article: FireStorm/DAO Java Persistence Code Generator

FireStorm/DAO Architect Edition Product Review

CodeFutures’ FireStorm/DAO is a Java code generator that produces a data persistence tier and Web-based presentation tier.  The data persistence tier is based on the Data Access Object (DAO) core J2EE design pattern and the presentation tier is based on either JSPs or Struts JSPs. This makes it ideal for building Web applications. Indeed, CodeFutures says that most of its internal systems are Web-based applications built using FireStorm/DAO-generated code and MySQL as the data store.

FireStorm/DAO generates Java source code and configuration files that would normally take a lot of time and effort to manually produce. FireStorm/DAO imports existing database schemas from an SQL script or from a live JDBC connection.  FireStorm/DAO generates Java persistence code that is a direct mapping of a particular relational database schema. The primary purpose of FireStorm/DAO is to generate DAOs; however, FireStorm/DAO also generates data transfer objects (DTOs), business delegates, and session facades, JSPs, and JSP Struts.

FireStorm/DAO generates code using a variety of different technologies. This includes straight JDBC DAOs, EJB CMP, JDO, and Hibernate. One interesting fact is that CodeFutures recommends JDBC DAOs in most circumstances. It’s important to note that CodeFutures supports all of the technologies and therefore has nothing in particular to gain from one technology choice over another. It’s a refreshing if unfashionable attitude. It is possible to swap between Java persistence technologies – which offers the possibility of deferring the decision on technology until later in the project.

Generating DAOs is a key factor in making FireStorm/DAO produce readable and maintainable code. The DAO design pattern is a Core J2EE Design Pattern, which means that many developers are familiar with it. It also means that CodeFutures is not trying to impose a proprietary ORM technology, as per Toplink. There are no runtime or deployment fees, another key differentiator from some ORM tools.

The first thing you think when you read about FireStorm/DAO is does it really work?  Software that writes software sounds a) more advanced that a typical software application and b) too good to be true – where’s the catch? The document library has links to a tutorial and a recorded demonstration. The product download and installation are fairly straightforward.  FireStorm/DAO is available for download from the Web site via a registration form. A time and functionality-restricted license key is emailed with the download URL. The product is available for multiple operating systems (Windows, Linux, UNIX, Mac OS X) and with the option of a bundled JRE for the Windows download.

The next step in an evaluation is to look at the generated code. Some sample applications are shipped with FireStorm/DAO so it’s easy to get started.  The generated code looks pretty much like hand written code. In fact, it looks too good. A human would never be so disciplined to produce tens of thousands of “perfect” code – no typos, consistent naming conventions, and so on.

Finally, the third thing you’ll want to see is if the code actually works. FireStorm/DAO can generate code for standalone Java as well as for common application servers – Tomcat, JBoss, WebLogic, and WebSphere. The code is production ready – a complete end-to-end application can be tested straight away.

FireStorm/DAO is not a full Java IDE. It can be considered a stand-alone tool. CodeFutures says that an Eclipse version is on the roadmap, but there’s no real urgency since most users are happy to use the current graphical user interface. One potentially useful feature is support for Ant tasks, which means that FireStorm/DAO can be integrated with automated build systems.

FireStorm/DAO is available in Enterprise and Architect editions. The Enterprise Edition provides a reasonable level of configurability in relation to features such as custom type support. However, the real power of the product is the Architect Edition, which includes the source code.

FireStorm/DAO Architect Edition

One of the big weaknesses of most of the commercial code generators, especially the generators based on MDA, is lack of flexibility. Users generally do not have sufficient control over how the code is generated. CodeFutures overcomes this drawback by providing the source code for the various code generation templates used with FireStorm/DAO. The templates are written in Java, so there’s no need to learn a special mark-up language or struggle with a complex XML configuration file.

CodeFutures states that the purpose of customizing code generation is to optimize performance based on specific project requirements or add environment-specific extra custom features such as caching, security, auditing, and clustering. However, just about everyone will want to do something very simple and essential: adjust how the generated code looks to ensure it matches the rest of the code in the application and conforms to internal coding standards. This could simply mean changing the variable naming conventions.

The target audience for the Architect Edition is clearly different from the Enterprise Edition. The Enterprise Edition is really just a point-and-click exercise and users don't need to understand how the code generation works to use the product as a black box solution. The Architect Edition user has to be the type of engineer that understands how code generation works. This really limits the audience to senior engineers.

The templates are very well laid out, with a lot of internal coding comments. The user guide is fairly basic, without many examples. However, there are very good video demonstrations on the Web site. There are no restrictions on the number or type of modifications can be made to
the source code. Also, there are no restrictions on the number of new templates that can be produced – even new non-DAO templates from scratch are possible. Another interesting idea in the Architect Edition is that it provides previews of new features.

Perhaps the most interesting commercial application of the Architect Edition is with development teams. In this case, the data persistence expert can use the Architect Edition to produce a customized DAO template for a project that can be used by Enterprise Edition users. The Enterprise Edition users are not able to modify how the code is generated. This provides any number of benefits such consistency within the development team and better control by the architect. One obvious usage is outsourcing development, especially if the required data persistence skills are not available or if there are concerns about quality control.

Where and When to Use FireStorm/DAO

It’s clear that the main benefit of FireStorm/DAO is productivity gains. Data access code takes a huge amount of time to write. For a very large database, that could be hundreds of hours saved writing code and then testing it. Another obvious benefit is consistency within and between development groups over multiple development projects.  Code generators in general are ideal for rapid prototyping and proof of concept projects. FireStorm/DAO generates end-to-end applications, which makes it particularly suitable for prototyping. Ongoing maintenance efforts are clearly reduced because the Java persistence tier can be regenerated if the database schema changes.

The Verdict

Once you’ve used FireStorm/DAO, you certainly will not want to manually write persistence code again. It’s much more interesting to use the Architect Edition to customise a code generator rather than write repetitive data access code.

Key Disadvantages

-Not enough examples in documentation
-Not integrated with any IDEs
-Only supports JDO 1.1, not JDO 2.0 (promised later)
-Does not generate JSF presentation tiers

Key Advantages

-Produces ready-to-use code within minutes
-Based on Data Access Objects, which is a core J2EE design pattern
-Support for multiple Java persistence technologies, JDBC, EJB CMP, JDO, Hibernate
-Source code for generation templates provides complete control
-No runtime costs

Additional Resources:

Read more about FireStorm/DAO Architect Edition

Download FireStorm/DAO Architect Edition preview:

Read about Data Access Objects:


Please feel free to discuss the article in forums:

Home Index
© 2001-2005 OnlineProgrammer (HtmSoft.com) . All Rights Reserved