Welcome!

Java Authors: Maureen O'Gara, Liz McMillan, Walter H. Pinson, III, Yakov Werde, Tony Bishop

Related Topics: Java

Java: Article

Product Review: zeroCode

Product Review: zeroCode

ZeroCode is a Web-based development environment that allows a team to graphically develop a Web-based database application with minimal handwritten code. The development environment is Web-based and housed on zeroCode servers. Developers build the application via the Web interface and when complete, the entire site is downloaded and installed on servers in the production environment.

While developing with zeroCode, a heavy emphasis is placed on an application's design. To optimize code generation capabilities, the zeroCode environment defines a set of design rules and guidelines the development team must follow. Some examples of rules to follow include using Java naming conventions for database objects, normalizing the table structure as much as possible, and using foreign key constraints to identify relationships among tables.

zeroCode is designed to isolate the tiers within an application, shown in Figure 1 from the zeroCode documentation. Users interact with zeroCode applications through servlets. The servlets interact with the application objects, which in turn interact with the database through a data-access layer. Manipulation of data for UI display purposes is handled via FreeMarker, an open-source tag expansion engine designed to interface HTML and application objects.

All data to support the application is stored in a JDBC-compliant database (zeroCode has been tested with Oracle 8/8i and MS SQL Server). The database design should closely follow the application's object model to provide the best possible generation of components. All data relationships must be modeled with foreign keys to allow zeroCode to construct relational objects for the application. The data model is uploaded to zeroCode, which then generates the tables, business logic components, and default HTML views for each database object in the schema. At this point, the user has access to the system and may manipulate data at a table level.

Once the schema is uploaded and the database is in place, there are several concepts and related terminology that must be understood to develop applications with zeroCode. The user interface data model (UDM) is an object that relates an HTML page to data in the database. UDMs are hierarchical in nature and represent data accordingly. An example might be a collection of albums by a single musician. zeroCode provides basic UDMs for common actions and data representations. Customized UDMs may be created to perform more complex operations.

zeroCode automatically generates HTML pages to view data in the database schema. These pages are called templates and may be modified individually to provide a customized look and feel. Templates include HTML, JavaScript functions for validating form input, and FreeMarker tags. Metatemplates are the files that contain instructions for generating templates. By modifying metatemplates, a large number of HTML pages may be changed. For example, if a company logo and common header were required for all pages, the HTML can be added to the metatemplates and the site regenerated to update all pages.

Predicates are objects that are analogous to "where" clauses in SQL. They're used to constrain data for display and are applied to nodes within a UDM.

As mentioned earlier, all development takes place on the zeroCode Web site and when complete, the application and all tools for runtime support are downloaded and installed on local production boxes. The two main components to zeroCode are the zeroCode development environment and the runtime environment. The development environment is currently available for Linux only and was therefore not included in this review. The runtime environment is a pure Java implementation and will run on any supported platform. Currently, zeroCode is tested for Linux and Windows NT with UNIX evaluations forthcoming. For this review I created a very simple site to access a database schema and proceeded to download the environment for deployment.

When downloaded, the site is packaged as a .tgz file, readable by WinZip. The finished application package will include all runtime required files (zeroCode JAR files, stylesheets, HTML files, UDM files, etc.) in their appropriate directories. To bring the site up, the database schema file must be executed within a local instance of Oracle to create the database structure. Then the configuration files must be modified to fit the runtime environment. Settings include the name, port, user, and password settings for the local database and the paths to the root of the zeroCode download. Finally, JRun must be configured to recognize a servlet URL for the site. The process was relatively easy to complete and the site was up and running locally in less than one hour. Currently, zeroCode runtime has been tested for Linux, Solaris, and Windows NT.

The zeroCode development environment presents a powerful alternative to developing database-enabled Web sites. As zeroCode evolves and is enhanced further, more and more complex sites will be able to be generated using this development platform. It's a product that takes a significant step toward the goal of developing applications with minimal handwritten code.

More Stories By Brian Barbash

Brian R. Barbash is the product review editor for Web Services Journal. He is a senior consultant and technical architect for Envision Consulting, a unit of IMS Health, providing management consulting and systems integration that focuses on contracting, pricing, and account management in the pharmaceutical industry.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.