Java IoT Authors: Zakia Bouachraoui, Pat Romanski, Elizabeth White, Liz McMillan, Yeshim Deniz

Related Topics: Java IoT

Java IoT: Article

Gen-it for Java 1.1 by Codagen

Gen-it for Java 1.1 by Codagen

Test Environment
Client: Dell Precision 410, 128MB RAM, 18GB disk drive,
Windows NT Workstation 4.0 SP 5

Codagen Technologies Corporation
2075 University St., Suite 1020
Montreal, Quebec, Canada, H3A 2L1
Phone: 514 288-4802
Fax: 514 288-2446

Gen-it for Java $4,900/ Developer
Batch-it for Java $295/ Developer

In last month's issue of JDJ (Vol. 5 issue 6) I talked about the concept of using frameworks to automate the development of J2EE applications. Armed with this concept I took a look at Codagen Technologies' Gen-it for Java 1.1.

Codagen's product is designed around the basic premise that much of the lower-level structural code within an application is highly repetitive. Routine tasks such as persisting objects into the database, managing locks and performing integrity checks can be easily generated from a template rather than built from scratch each time.

Codagen's product is slightly different from a typical application generator in that it works in conjunction with frameworks that you may already have built. (In fact, Codagen has a partnership with IBM to leverage their San Francisco object framework with Gen-it for Java.) In the following sections I'll take a look at installing and using Gen-it for Java using one of their sample projects.

Installing and Configuring Gen-it for Java
I downloaded the 1.1 release of Gen-it for Java from Codagen's Web site. (Since this article was written, version 1.2 has been released.) The InstallShield setup kit is a little under 9MB in size and installs quickly and easily. Codagen uses Globetrotter's FlexLM software to control licensing for Gen-it for Java, but the downloaded installation kit is preconfigured with a demo license key already installed. When all is said and done, the installation process was a quick and painless affair - I had Gen-it up and running in about 15 minutes. One factor worth mentioning is that Gen-it for Java requires either Rational Rose or Visual Modeler (a version integrating with Telelogic's Tau, formerly Sterling's Cool:Jex, is scheduled for beta this month) to be installed on your local machine before the Gen-it installation can proceed. If you want to test Gen-it for yourself, you'll need to acquire one of the modeling tools in advance. (Rational allows you to download Rational Rose Enterprise Edition 2000 for a 20-day trial period as well.) Once the product is installed, it's a simple process to start working with Gen-it.

Working with Gen-it for Java
Codagen provides a tutorial that describes the basic value proposition for Gen-it for Java, and I would recommend going through it as a starting point. The Codagen folks believe strongly that frameworks are just as important for small and medium projects as they are for large projects - and the introduction section of the tutorial is dedicated to explaining this concept. As IT professionals and application developers we're certainly living in a time of tight deadlines and complex projects. I'd argue that very few projects in today's world are actually "small" projects. Sure, they might start out small; but they often end up being much larger efforts over the life of the application. Does this mean that we're underestimating the initial development effort in the first place? Not necessarily. We've all learned the lesson that large, multiyear projects are less likely to be successful than smaller, tactical projects. (We may be short on empirical evidence for this hypothesis, but it appears to be so from anecdotal evidence.) The result of this collective experience has been a trend toward projects that are much shorter in duration. This doesn't mean that we simply ignore larger, more complex, long-term projects. Rather, we have a better chance of success in managing large projects if we can break them down into a series of smaller projects with highly focused goals. Even projects that appear to be smaller in scope can grow as the needs of the business change. For many companies the first step into the Internet is a simple Web site soon to be followed by a dynamically generated Web site, online payment, interfaces to partners - the list is endless. Of course, one result of taking a large, complex project and breaking it down into smaller, more manageable chunks is that without a proper game plan it can lead to chaos. This is exactly where the folks at Codagen have designed the Gen-it product to play. Tackling larger projects (or small projects that grow into large projects over the life of the application) becomes possible when you use a well-planned architecture.

Gen-it is designed with the idea of removing the burden of implementing repetitive code from the hands of the programmer. It differs somewhat from typical frameworks in that it has been designed to work in conjunction with a framework. Thus, while most framework products are harnessed into the programmer's interactive development environment (IDE), Gen-it is plugged into the modeling environment. Figure 1 shows this relationship graphically.

The implied development methodology that Gen-it follows starts with a UML model. Having defined the model, you then choose a prefabricated framework for deployment (such as EJB or San Francisco). Once you have the framework, you then use the Gen-it tools to create a set of templates that would be used to harness the framework to your UML model. A thorough understanding of UML isn't required as Gen-it currently uses only the UML class diagram. Furthermore, Gen-it doesn't affect the visual representation of a UML model. It simply uses the items found in the static view - the class diagram - as convenient holders for extra structural information.

Codagen recommends you make use of their consulting resources in order to evaluate the Gen-it for Java product, and based on my experiences with it I would have to agree. While the tutorial attempts to walk you through the development process using the simple "Memento" framework model, inexperienced developers aren't likely to pick up on the benefits through the tutorial. Version 1.2 has reworked the tutorial to address these shortcomings.

The main interface for Gen-it is the organizer (see Figure 2), used by application architects in creating and managing templates. Templates define the specific actions implemented for the various classes in your application. In essence, the templates map the framework to your UML model.

Individual developers can be given access to the templates for use in generating code using the Batch-it interface. While Gen-it allows the application architect to modify templates, Batch-it developers are restricted to code generation based on the templates. In this way you can prevent individual developers from straying away from the framework by consolidating template management to a smaller subset of critical developers. Gen-it's real power is based on this template feature - but it's difficult to get the true flavor of templates from the downloadable kit. Even if you were able to work with templates extensively in the downloadable version, I would still recommend that you take advantage of Codagen's consulting services in evaluating Gen-it for Java. The real value in this product is in the creation and deployment of a framework throughout your application. By working closely with the Codagen experts, you're much more likely to get the most out of the templates interface. (The tutorial and user guides aren't enough to get you rolling with Gen-it on a real project.) If you're familiar with Rational Rose, at least, then part of the overall learning curve will be much easier. Gen-it for Java is linked directly into the Rational Rose IDE (see Figure 3).

The evaluation kit includes several Rational Rose models, including the Banking Model shown in Figure 3. Using the Gen-it tools within Rational Rose allows you to record design decisions directly in your UML model. Gen-it properties are attached to the UML model by means of External Properties, which are specific to a class, attribute or role. Gen-it uses the external properties that you set in the model to apply template definitions to your generated code. Once you select a set of classes (or packages) in your model and choose the "Gen-it" option from the menu, the Organizer interface will appear as shown in Figure 2. (Codagen provides an option that will allow Gen-it to write the generated code directly into IBM's Visual Age for Java as well.) The result is a fairly seamless transition from UML to code - provided that you have the proper templates.

The twin problems of limited resources and short deadlines can be mitigated by leveraging application frameworks. Codagen's Gen-it for Java product is a useful tool for connecting frameworks to models. Though Gen-it does require more than a casual understanding of Java and architecture, Codagen encourages you to use their technical support for evaluation and product issues. It's free and it helps them better understand customer issues. The consulting services can be used for more in-depth issues related to deeper architecture issues. Products such as Gen-it that have the potential to significantly shorten your development cycles are not simply "plugged-in and turned on." However, if you're short on Java programmers and want to make your development resources go farther, then a little up-front effort can pay big dividends down the road.

More Stories By Jim Milbery

Jim Milbery is a Vice President with William Blair Capital Partners, a venture capital firm based in Chicago. He has over 19 years of experience in application development and relational databases. He is the former applications editor for "Wireless Business and Technology", the past product reviews editor for Java Developer Journal and the author of "Making the Technical Sale". Jim can be reached at [email protected], or via the company web site at http://www.wbcapitalpartners.com

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.

IoT & Smart Cities Stories
Moroccanoil®, the global leader in oil-infused beauty, is thrilled to announce the NEW Moroccanoil Color Depositing Masks, a collection of dual-benefit hair masks that deposit pure pigments while providing the treatment benefits of a deep conditioning mask. The collection consists of seven curated shades for commitment-free, beautifully-colored hair that looks and feels healthy.
The textured-hair category is inarguably the hottest in the haircare space today. This has been driven by the proliferation of founder brands started by curly and coily consumers and savvy consumers who increasingly want products specifically for their texture type. This trend is underscored by the latest insights from NaturallyCurly's 2018 TextureTrends report, released today. According to the 2018 TextureTrends Report, more than 80 percent of women with curly and coily hair say they purcha...
The textured-hair category is inarguably the hottest in the haircare space today. This has been driven by the proliferation of founder brands started by curly and coily consumers and savvy consumers who increasingly want products specifically for their texture type. This trend is underscored by the latest insights from NaturallyCurly's 2018 TextureTrends report, released today. According to the 2018 TextureTrends Report, more than 80 percent of women with curly and coily hair say they purcha...
We all love the many benefits of natural plant oils, used as a deap treatment before shampooing, at home or at the beach, but is there an all-in-one solution for everyday intensive nutrition and modern styling?I am passionate about the benefits of natural extracts with tried-and-tested results, which I have used to develop my own brand (lemon for its acid ph, wheat germ for its fortifying action…). I wanted a product which combined caring and styling effects, and which could be used after shampo...
The platform combines the strengths of Singtel's extensive, intelligent network capabilities with Microsoft's cloud expertise to create a unique solution that sets new standards for IoT applications," said Mr Diomedes Kastanis, Head of IoT at Singtel. "Our solution provides speed, transparency and flexibility, paving the way for a more pervasive use of IoT to accelerate enterprises' digitalisation efforts. AI-powered intelligent connectivity over Microsoft Azure will be the fastest connected pat...
There are many examples of disruption in consumer space – Uber disrupting the cab industry, Airbnb disrupting the hospitality industry and so on; but have you wondered who is disrupting support and operations? AISERA helps make businesses and customers successful by offering consumer-like user experience for support and operations. We have built the world’s first AI-driven IT / HR / Cloud / Customer Support and Operations solution.
Codete accelerates their clients growth through technological expertise and experience. Codite team works with organizations to meet the challenges that digitalization presents. Their clients include digital start-ups as well as established enterprises in the IT industry. To stay competitive in a highly innovative IT industry, strong R&D departments and bold spin-off initiatives is a must. Codete Data Science and Software Architects teams help corporate clients to stay up to date with the mod...
At CloudEXPO Silicon Valley, June 24-26, 2019, Digital Transformation (DX) is a major focus with expanded DevOpsSUMMIT and FinTechEXPO programs within the DXWorldEXPO agenda. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of business. Only 12% still survive. Similar percentages are found throug...
Druva is the global leader in Cloud Data Protection and Management, delivering the industry's first data management-as-a-service solution that aggregates data from endpoints, servers and cloud applications and leverages the public cloud to offer a single pane of glass to enable data protection, governance and intelligence-dramatically increasing the availability and visibility of business critical information, while reducing the risk, cost and complexity of managing and protecting it. Druva's...
BMC has unmatched experience in IT management, supporting 92 of the Forbes Global 100, and earning recognition as an ITSM Gartner Magic Quadrant Leader for five years running. Our solutions offer speed, agility, and efficiency to tackle business challenges in the areas of service management, automation, operations, and the mainframe.