| By Richard Soley, Mike Oara | Article Rating: |
|
| October 3, 2006 11:00 AM EDT | Reads: |
23,531 |
The operations of many large organizations rest on large applications that are characterized as "legacy." To increase flexibility or reduce costs businesses are looking to modernize these applications, for instance, via renovation, introducing an SOA architecture, or even re-implementing in a new environment. No matter which approach is taken, it's important to salvage as much knowledge and logic as possible from the legacy application. Unless the application's function is obsolete recovering functional knowledge (what does the application do?) and structural knowledge (how does it do it?) can accelerate the modernization effort.
A parallel can be drawn with renovating a building, since modernization can involve gradual changes to the building's internal structure, say, larger doors, or complete demolition and reconstruction. In both cases blueprints of the buildings are required. These blueprints form a shared basis of knowledge between the architect and the developer that's necessary for planning and execution. Just as blueprints are necessary to determine how a building can be adapted to suit a new need, they are also necessary to determine how to adjust an application. However, since legacy applications have, by their nature, been developed over long periods of time and, in most cases, by many people such blueprints don't exist. They have to be recovered to start the modernization process.
Many legacy analysis tools have emerged to address this situation. They attempt to reveal the internal and implicit architecture and business function of a legacy application in a fashion understandable for people. The discovery and then the expression of the business function at an abstract level that discards incidental technical details is a difficult task. However, this is precisely what is necessary since modernization projects are interested in re-implementing business functions, not particular technical solutions.
The tension between expressing business functions in a comprehensible fashion and expressing them with enough detail and precision has to be addressed. This requires a language in which business knowledge can be practicably expressed.
UML as a Solution
UML has emerged as the most successful non-proprietary object modeling and specification language. UML includes a
standardized graphical notation that can be used to create an abstract model of a system, that is the UML model. UML can precisely and understandably describe an application at a high level of abstraction, hiding the implementation details to reveal the actual business functions. Furthermore, as a formal language, UML has a well-defined syntax that makes it suitable for both forward and reverse engineering. In forward engineering, a UML model could be used to generate actual code (e.g., Java code). Most commercially available UML tools are capable of forward engineering (in various degrees), while possessing some reverse engineering features. The most common reverse engineering activity involves extracting class diagrams from Java code. However, reverse engineering is limited so far to modern programming languages, while lacking similar capabilities for older technologies like COBOL.
The Benefits of UML vis-à-vis Legacy
The ability to reverse engineer legacy applications to UML would offer substantial benefits:
- Preservation of Knowledge at an Abstract Level
In many instances it may be necessary to re-implement an application in a new and modern technical environment. However, because the application represents years of organizational learning it contains functionality that must be preserved. The information must be described at a high enough level of abstraction to avoid unnecessary technical details. UML offers the right level of abstraction so that the author can retain as much detail as necessary for future implementation. - Communication Mechanism
Distance, language, and cultural issues can impair the communication of information about business functions between the legacy maintenance team and the re-implementation team. UML offers developers a common language that promotes precision and comprehensibility. - Vendor Independence
The universal acceptance and adoption of UML also offers the advantage of choosing from a large number of UML tool vendors. One team can select Rational Rose to create the models while an outsourced re-implementation team can use Borland to view and reuse the same models. Users can even switch between tools and still preserve the knowledge encapsulated in the models. - Forward Engineering
While the challenge to be discussed is reverse engineering legacy applications into UML, we should recall that many UML tools offer forward engineering capabilities.
Thus UML can be the intermediate stage through which an application rewrite may pass. The process would thus be:
"People Reuse"
The standard method of acquiring business process knowledge through user interviews involves a major commitment
of time and new resources. The results may be incomplete and error-prone. Alternatively, extracting knowledge directly from the current application circumvents these concerns while continuing to rely on the resources currently involved in application maintenance.
Limitations
There's no silver bullet for reverse engineering legacy to UML. In fact, one may notice that some concepts simply don't match. Furthermore, some important information about the use of the legacy application isn't captured in the code itself, making automatic extraction impossible. For instance:
Actors
In UML, an actor is a user of the system; "user" can mean a human user, a machine, or even another system that interacts with the system from outside its boundaries. Because of this definition in most cases information about actors can't be found in the code.
Requirements
While the current system may implement business requirements, they may not appear explicitly in the code, but rather in the form of fulfilled requirements.
Navigation & Sequence
Certain sequences of operations may not be explicitly specified in the application. So, while a user knows that to open a new account, he or she must perform activities A, B, and C in this precise order, the application may allow other paths that aren't meaningful from a business perspective.
We can therefore recognize that any UML description of a legacy application can't be achieved through completely automatic reverse engineering. While a legacy analysis tool may expose the artifacts of the application, only a human can assemble them into meaningful UML diagrams.
A Balanced Approach
We have shown that a totally automated approach isn't feasible. At the other extreme, a completely manual approach has
two primary disadvantages:
Economics
Over time applications tend to be modified to such a degree that neither the initial plans, nor the current documentation reflects the reality of the application. Knowledge must be acquired from the code itself,
but to manually review a multimillion-line application would be far too burdensome financially to be a realistic option.
Completeness
As a legacy application is modified and enhanced over the years users often lose a complete understanding of how the application functions. For example, in a pension system the rules for computing the pension can be spread through numerous government and corporate policy documents. This knowledge is already in the code, which is more complete, precise, and concise than what would come from user interviews. Moreover, the application stakeholders are
likely to insist that nothing is lost from the current functionality.
The best balance between fully manual and fully automatic can be called "tool assisted." In this approach, a software tool may be able to:
- Parse legacy code and show its information in a convenient manner. Convenience is key since the selected tool would have to filter out a great deal of unnecessary detail while assembling the application information that is actually needed.
- Allow the user to select relevant legacy artifacts and quickly derive UML entities. For example, the tool may show a list of COBOL structures that, when clicked on, create a class with the data members derived from the fields of the structure.
- Let the user quickly assemble UML diagrams based on derived entities. Further to point 2, once two classes are created the user should be able to indicate a relationship that would appear in a class diagram.
- Export data in standard XMI notation. Doing so would ensure that the user would end up not only with just attractive diagrams but useful models that can be refined by UML tools and used for the forward generation of the code.
What UML Diagrams Can Be Extracted?
We have now identified the approaches that yield the maximum benefit and their drawbacks. So let's look at specific information that can be extracted from the legacy application. These possibilities should be thought of as a starting point since more automation will likely arise as UML extraction tools increase in sophistication.
Published October 3, 2006 Reads 23,531
Copyright © 2006 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
About Richard Soley
As chairman and CEO of OMG and executive director of the SOA Consortium, Dr. Richard Soley is responsible for the vision and direction of the world's largest consortium of its type. He joined the nascent OMG as technical director in 1989, leading the development of OMG's world-leading standardization process and the original CORBA specification. In 1996, he led the effort to move into vertical market standards and modeling, leading first to the Unified Modeling Language and later the Model-Driven Architecture. Previously, Dr. Soley was a cofounder and former Chairman/CEO of A. I. Architects, Inc., maker of the 386 HummingBoard and other PC and workstation hardware and software. He holds a BS, MS, and PhD in computer science and engineering from MIT.
About Mike Oara
Mike Oara is CTO, Relativity Technologies.
- Universal Middleware: What's Happening With OSGi and Why You Should Care
- An A to Z of Cloud Computing Companies in 2009
- SOA and eXtreme Transaction Processing (XTP)
- Ulitzer’s Amazing First 30 Days in Public Beta
- SYS-CON Announces Government IT Conference & Expo
- Why an Application Grid?
- "Government IT Expo" to Highlight Cloud Computing and SOA
- 2nd International Cloud Computing Expo New York Photo Album
- Building a Composite Application Using Multiple Web Services
- Commercial vs Federal Cloud Computing
- Universal Middleware: What's Happening With OSGi and Why You Should Care
- An A to Z of Cloud Computing Companies in 2009
- Blending Discovery, Governance, Security, and Management in SOA
- SOA and eXtreme Transaction Processing (XTP)
- Ulitzer’s Amazing First 30 Days in Public Beta
- Enterprise Mashups: The New Face of Your SOA
- SYS-CON Announces Government IT Conference & Expo
- Why an Application Grid?
- "Government IT Expo" to Highlight Cloud Computing and SOA
- 2nd International Cloud Computing Expo New York Photo Album
- The i-Technology Right Stuff
- Get the Message
- Success, Arrogance, Rise and Fall
- i-Technology Viewpoint: Is Web 2.0 the Global SOA?
- i-Technology Viewpoint: Thinking Outside the VC Box
- ESB Myth Busters: 10 Enterprise Service Bus Myths Debunked
- i-Technology Viewpoint: When to Leave Your First IT Job
- SOA Web Services Edge Conference Coverage on SYS-CON.TV
- Five Reasons Why Web 2.0 Matters
- SYS-CON.TV's "SOA Web Services" and "Enterprise Open Source" Programs To Air in December





































