SIGDOC Newsletter
December 2003
:: Volume 4, Number 4
Features
What is Round-Trip Engineering to an Information Developer?
By Rob Pierce
Unless you are a software developer, you may not be familiar with the
term round-trip engineering.
Round-trip engineering encompasses two engineering practices, forward
engineering and reverse engineering. And what are these? In short, they
are terms that represent a relationship between diagrams and code.
Both forward and reverse engineering are part of what makes a modeling
tool compelling. And what is modeling? In software development, it is
the creation of diagrams that represent the software application or system
that you plan to develop. A model is essentially a blueprint for an application.
By definition, it is an abstraction of a physical system with a certain
purpose. And what language is the blueprint written in? The unified modeling
language (UML).
The Object Management Group is the organization that governs UML and
defines modeling as the “designing of software applications before
coding.”
Using UML, an engineer can develop diagrams that describe the application
to be developed. A diagram is a graphical representation of a collection
of model elements that can represent all or a part of a model. UML supports
several different types of diagrams.
Some UML tools enable you to generate code from the diagrams you create.
This is called forward engineering. By designing the objects in your
application and how they interact, developers can save a lot of time
and effort by generating a lot of the code that is not focused on specific
business logic.
back to top
So, generating code from your diagrams is forward engineering. And as
you can imagine, reverse engineering is the opposite. It is the generating
a model from code. Sometimes this is creating a model from object code,
and sometimes from source code. If you have the code for an application,
you can reverse engineer it using the modeling tool to create a model.
And once you have the model, you can then quickly form diagrams that
illustrate the objects and their relationships in your application. For
example, given a data link library (dll), you can reverse engineer it
and create class diagrams that illustrate the architecture of the objects
in the dll and what they contain. This is extremely useful for application
programming interfaces (APIs).
Thus, round-trip engineering represents the best practice in software
development of using a modeling tool and going the full cycle of keeping
code and models in sync as you iteratively develop your application.
You model a portion, then generate code, and then test it. Then, perhaps,
you modify the code and later reverse engineer the modified code back
into the model.
One of the best practices in the engineering discipline involves creating
an architecture that is component based. A component represents a portion
of a whole system and it is reusable. Thus, a component can be used in
more than one application. In effect, it can “plug into” an
existing architecture, system, application, or platform. In UML, a component
diagram shows the organization and dependencies among components.
Modeling tools help ensure a component-based architecture since UML
and the tools provide a means of developing discrete objects that communicate
with each other. Each component can be viewed as a subsystem of the entire
system or software application. By definition, a subsystem is a grouping
of model elements that represent a behavioral unit in a physical system.
In summary, automation and visualization are two clear benefits to round-trip
engineering - generating code and understanding the complexity of an
application more clearly by seeing it.
back to top
There is an obvious opportunity to apply this discipline to information
development.
To create an information system, you might first design an information
architecture. And using UML enables the information architect to design
the system by creating a model. The model will likely have separate components
or subsystems that plug into the complete architecture that could also
be used in other architectures or systems.
A documentation example of forward engineering would be to develop a
model that could represent a template for what each subsystem in a full
Help system or information architecture for a product should look like,
and how it should behave. You could model the flow of information or
the logic of each primary use case for users of your product. Such a
template would provide a structural blueprint for the writers who would
be creating the technical content.
The information architect could also define specific objects in the
UML model to represent each topic in the information architecture. Perhaps
a subsystem or component could represent a collection of topics for a
given portion of the product or application.
A documentation example for reverse engineering is different but also
useful both for visualization and automation. Given source code, in the
form of a component such as a data link library (dll) or Java .jar file,
you can reverse engineer the source and use the resulting structural
model to help generate reference documentation of that source code.
While the above examples do not illustrate round trip engineering, they
do provide useful possibilities for information developers using software
development tools for information development.
An example of round-trip engineering opportunity is when the information
developers can work with the same sources as the developers. For example,
if you work with developers that are round-trip engineering an application
and they let you have access to the UML model by using the same tools,
then you can add documentation to the model just as you could add Javadoc
comments to source code, but in a more visually compelling manner. Developers
will be more apt to enable a writer to add descriptions to objects in
a model than to encourage them to enter comments in source code. Round-trip
engineering could provide the means to enable a writer to actively participate
in the software and information development without actually working
with source code.
Whether you are developing software or developing information, you can
benefit from using a modeling tool, especially if your software developers
are already using the tool.
For more information on UML and modeling, visit The Object Management
Group website: http://www.omg.org/uml/
back to top
|