Archives
 
 
 
  Special
 
 
 
  About Us
 
 
 

Newsletter
Free E-mail Newsletter from BYTE.com

 
    
           
Visit the home page Browse the four-year online archive Download platform-neutral CPU/FPU benchmarks Find information for advertisers, authors, vendors, subscribers Request free information on products written about or advertised in BYTE Submit a press release, or scan recent announcements Talk with BYTE's staff and readers about products and technologies

ArticlesBest CASE Scenario: Choosing OO Methods


August 1996 / International Features / Best CASE Scenario: Choosing OO Methods

Pairing an OO CASE tool to a flexible method can link source code closer to application design.

Dick Pountain

The basic idea behind CASE tools is as simple as it is ambitious: Support the whole development process through a graphical notation, from analysis of design to implementation, and derive the complete code from the corresponding diagrams. But traditional CASE tools have not delivered on this holistic, model-driven development promise. Though object orientation moves CASE tools closer to this paradigm, developers have yet to effect a fully automated process that can turn specifications into executable programs.

What today's traditional and object-oriented (OO) CASE tools don't have is a methodology tha t automatically keeps the model and the program in step with each other. However, with most OO methods, it is possible to automatically maintain consistency between the source code and th e corresponding data and process diagrams, even when either of them is changed. The actual coding still requires some manual intervention.

OO CASE Methods

A key feature shared by all OO-programming (OOP) systems is that they recognize a clear distinction between data (objects) and action on that data (methods), and most of them encourage the reuse of both data structures and actions through inheritance. OO CASE tools exploit this clean separation by using two kinds of models to specify a system.

The object structure model describes which objects will appear in the system (and their attributes and relationships that persist over time). The object behavior model describes the way the objects respond to external events and how their states change as a result.

The object structure model corresponds fairly closely to the data-modeling function of older CASE tools, which was their most successful aspect. In this first step of a development project, you draw diagrams that connect real-world objects and their relations (typically, customers and orders) with class hierarchies.

In such diagrams, each symbol representing an object can have several internal slots that represent named attributes (e.g., customer ID or address). Such diagrams map easily onto the syntax of such typical OOP languages as C++, Smalltalk, and Visual Basic 4. Therefore, almost all OO CASE tools are capable of automatically generating class templates that have all the necessary data declarations already in place.

Finding the Right Model

The object behavior model, which describes the processing that the system performs, is more complicated to produce, and the variety of techniques employed is far wider than in data modeling. The most important techni ques are state-transition modeling , event-flow modeling , use-cases modeling , and responsibility-and-collaboration modeling (see the sidebar "Behavior-Modeling Techniques").

It's not as easy to translate behavioral diagrams into method code as it is to translate data diagrams into class templates. Most of the OO CASE tools that perform code generation have to insert much meta-information--in the form of specially formatted comments--into the generated code. This can make it more difficult for programmers to understand the source code and may mean that large expanses of the code are declared "do-not-touch" and must not be modified manually. Furthermore, most of the OO CASE tools generate only the prototypes for C++ member functions, leaving their code bodies to be added manually.

Often, none of these behavior-modeling techniques are strong enough to be used on their own, and OO CASE methods tend to apply two or more of them in conjunction to provide different view s of the model. State transition and event flow seem to be more favored for modeling real-time and embedded systems (or telecommunications networks). The plain-language descriptions of use cases are especially suited to business applications, where end users must understand the notation used to model their working practices. However, because use cases can also be less precise, they are frequently assisted by a more rigorous method (e.g., an event-flow chart).

The OO-Method Confusion

More than 50 OO-code design methods make tool selection a real Babel and split the developers' community into camps of believers and nonbelievers in a certain methodology. Named mostly after their authors, they combine some of the data- and behavior-modeling methods mentioned above.

Some of the better-known design methods are Rumbaugh's Object Modeling Technique (OMT), the Booch Method, Jacobson's Use Cases, Shlaer/Mellor's Object-Oriented Analysis (OOA), Martin/Odell, Coad/Yourdon's Object-Oriented Analysis and Design (OOAD), and Wirfs-Brock's Responsibility-Driven Design (RDD).

Because of these vying methods, many OO CASE tools support three or four of the most popular to serve different camps. Other tools include sophisticated meta-modeling facilities that let users create and maintain new design methodologies or customize the notation used by an established method to support their own needs. At the upper end of the market, tool vendors sell consultant services and training along with software in order to help developers cope with the sheer proliferation of OO methods.

Another approach to make the tool market more transparent is the current collaboration of the authors of three of the leading methods--James Rumbaugh, Grady Booch, and Ivar Jacobson--to produce a single Unified Method that will be launched later this year. If vendors decide to accept the Unified Method as a standard, chances are good that the OO development community will be less fragmented soon.

Anatomy of an OO CASE Tool

A typical OO CASE tool setup is based on a shared repository that contains all the components of the model being built (i.e., the graphs, diagrams, and the internal representation of the model). Some products store this repository data in a proprietary format; others implement it using industry-standard relational or object database engines.

The programmer can view the contents of the repository via editors or browsers to create the analysis and design diagrams, which may include object-structure, data-flow, event-flow, process-hierarchy, state-transition, and collaboration diagrams. Also plugged into the repository are report generators and documentation tools, and an interface to the compiler and development system for the OO language being used to implement the project.

A new feature in the latest versions of most OO CASE tools--which brings them closer to the model-driven development paradigm--is some degree of reverse-engineering abilit y. This means that they can take the source code for an existing project (in C++, C, Smalltalk, SQL, or sometimes even COBOL) and extract from it an object model that can then be edited and used to further modify the system or build a whole new system. Some OO CASE tools also maintain bidirectional live links between the source code and the model (i.e., any changes that are made to the source code will be reflected in the model and vice versa, a feature that is often called round-trip engineering ).

One of the most widely touted advantages of using object technology is that it corresponds more closely to the real world than do other programming paradigms. This means that you can, in principle, describe systems in a language close to natural language: Take an English (or French, or German...) sentence that describes a transaction, pick out the nouns to become your objects, the adjectives to become their attributes, and the verbs to become member functions (in C++) or methods (in Smalltal k). If you choose your sentences wisely, this procedure does indeed work, and several OO methods are based on it. One of these methods is HOOD from the European Space Agency.

KISS (which stands for Kristen Information and Software Services), a method invented by Gerald Kristen, takes this idea further . It starts from a natural-language textual description of the system and performs a grammatical analysis on it to extract subjects, predicates, active objects, passive objects, prepositions, and other parts of speech; all these entities translate into types and classes in the KISS object model.

Using these entities, KISS goes through a 12-stage process that involves analyzing communication between subjects and work flow and then creating a succession of models in which each model works on the previous one by adding more detail or removing ambiguities. The process culminates with designs for screens and reports.

Obviously, a program specification modeled by KISS can easily be understood by people who are not computer-literate enough to understand graphical notations. Another advantage of KISS, according to a Butler-Bloor report about OO methods, is that it "creates a logical model that is both more semantically complete and more semantically accurate than other OO methods," but at the price of being more prescriptive and less casual than some others. However, at present, only Paradigm Plus from ProtoSoft (Houston, TX) supports KISS among other methods.

Different Views on One Model

Another method that has some advantages but that hasn't been accepted too widely is Trygve Reenskaug's OOram. Reenskaug worked at Xerox's Palo Alto Research Center (PARC) in the pioneering days of 1978 and 1979 and based OOram on the Model-View-Controller schema that also underlies Smalltalk. OOram is supported by the CASE tool of the same name from Taskon.

OOram describes a system by a single model, onto which you can take many different views. It allows you to build c omplex models by combining simpler ones in arbitrary ways, with the advantage of not being confined to simple hierarchies. OOram offers a total of six views onto a central object model--collaboration, semantic, scenario, process, finite- state machine, and methods specification. Each one is represented via a different diagram tool. The system supports development in these languages: Smalltalk, C++, Eiffel, and SDL (see "RAD for Real-Time Apps," May BYTE International). It offers round-trip-engineering facilities from these languages.

CASE Tool for Visual Basic 4

One of the first OO CASE tools that is based on Microsoft's Visual Basic 4.0 and OLE Automation is Select Enterprise, from Select Software. The product is available in two different versions. One generates Visual Basic; the other one generates code for Forte, which is an OO fourth-generation language (4GL) for client/server development. The VB version also generates SQL DDL and C++ header files and skeleton implementation file s, and it can reverse-engineer from C++ code to produce a "first-cut" model that captures attribute and operation names and inheritance trees. Select Software says that more generators for Delphi, PowerBuilder, and SQL Windows will come soon.

Select Enterprise supports Rumbaugh's OMT method in combination with Jacobson's Use Cases and a Business Process Modeling facility that works from organizational structure charts. There are several add-on tools for Select Enterprise, including an object animator that lets you step through a Jacobson interaction diagram and shows the objects involved in each use case as pictures, with marquee-style moving lines representing the messages between them.

Select Enterprise stores its object model in an OLE-based repository so that any software that supports OLE Automation (e.g., Word or Excel) can have read and write access to the model data. Select Enterprise invokes the VB development environment to allow you to partition the application that's under construction into components (forms and skeleton class definitions), which get registered as OLE objects. You can reverse any changes that are made to the VB code back into the model, but this synchronization is not automatic and does not transfer type information.

Create Your Own Method

The Finnish company MetaCase Consulting describes its MetaEdit+ product as "the chameleon of CASE tools," which accurately pinpoints the program's strongest feature: It can support all existing OO design methods and enables you to create new ones. The tool comes with predefined support for 12 OO-, structured-, and business-modeling methods, including OMT, Booch, Fusion, OOA, and OOAD.

Its method-modeling editor lets you combine elements of these methods or devise completely new ones by defining graphical diagrams from which code definitions are generated to be compiled by a method compiler. MetaEdit+ includes a generic diagram editor for drawing all sorts of graphs, and matrix and table editors for handling design information as tables or forms. MetaEdit+ is written in Visual Works Smalltalk and comes with predefined code generation for Smalltalk and C++. However, you can modify the report browser to generate other target languages.

Focus on the Source Code

Object Engineering Workbench (OEW) for C++ and Java is not exactly a full CASE tool. It is closely centered on the project source code. It takes all parts of a C++ project--including header files, include files, and class libraries--and produces from them an object model of the whole project, using a sophisticated C++ parser that lies at the heart of the product.

OEW lets you add objects incrementally to a project, and its powerful parser enables it to reverse-engineer external class libraries. It offers two graphical views onto the internal model, an abstract view called the object relationship diagram, and a separate window that shows the class inheritance hierarchy diagram. Both these views are hot-link ed to the source code window, and you can edit the structure of a project by dragging and dropping classes, member functions, and slots between any of them, while OEW automatically keeps the views in sync.

Additionally, it automatically generates C++ headers and method templates from symbols you add to the object relationship diagram, and it enables you to complete writing the method bodies within the same environment. Though OEW doesn't currently support any CASE method, its object relationship view is based on an OO extension of entity-relationship modeling. However, Innovative Software announced that OEW will support the Unified Method and become a full CASE tool by the end of the year.

A Hard Choice

Given the size and depth of these products, choosing an OO CASE tool cannot be an easy matter. There is no simple way to prescribe which method is most likely to prove suitable for a particular job. Adopting a full-blown OO CASE method means abandoning casual and ad hoc analysis and design practices, which may require a large change in the programming culture of an organization. But the rewards far outweigh the inconvenience.

Over the next few years, we will see a degree of object-modeling ability beginning to appear within the integrated development environments (IDEs) of such languages as C++ and Smalltalk, and applications generators like PowerBuilder. The same is true for such visual programming languages as Microsoft's Visual Basic and Borland's Delphi, which are taken even more seriously for large-scale client/server applications. In this case, OO CASE tools without code-generation capabilities will be hard to sell.


Where to Find


KISS and Paradigm Plus.................................4000 Pounds UK

Kristen Information and Software Services
Veghel, The Netherlands
Phone:    +31 413 35 03 30
Fax:      +31 413 35 19 52
Circle 979 on Inquiry Card.

MetaEdit+................
...................Starts at $4500

MetaCase Consulting
Jyväskylä, Finland
Phone:    +358 41 650 400
Fax:      +358 41 650 405
Internet: 
http://www.jsp.fi/metacase

Circle 980 on Inquiry Card.

Object Engineering Workbench for C++ and Java.......DM 1190

Innovative Software
Frankfurt, Germany
Phone:    +49 69 236929
Fax:      +49 69 236930
Internet: 
http://www.isg.de

Circle 981 on Inquiry Card.

OOram..................................................$950 for a single-user version
................................................about $6000 for the professional version

Taskon A/S
Oslo, Norway
Phone:    +47 22 95 86 31
Fax:      +47 22 60 44 27
Circle 982 on Inquiry Card.

Select Enterprise.............................starts at 995 Pounds UK

Select Software Tools Ltd.
Cheltenham, U.K.
Phone:    +44 1242 22 97 00
Fax:      +44 1242 22 97 01
Circle 983 on Inquiry Card.

HotBYTEs
 - information on products covered or advertised in BYTE


A Generic OO CASE Tool

illustration_link (5 Kbytes)

A generic OO CASE tool is based on a central repository holding the object model.


From Natural Language to Object Model

illustration_link (4 Kbytes)

The KISS method converts natural language (here, the client deposits into an account at the counter) into object specifications.

The #1 Client sends a message to the #2 Deposit, while #3 Account and #4 Counter inspect the identity of the Client, then send the result to the Deposit, which in turn prompts the Client.


Hot Links with Workbench

screen_link (43 Kbytes)

Object Engineering Workbench lets you model object relationship diagrams hot-linked to the class inheritance hierarchy diagrams.


Dick Pountain is a longtime BYTE contributing editor based in London. You can reach him by sending e-mail to dickp@bix.com .

Up to the International Features section contentsGo to previous article: Go to next article: Behavior-Modeling TechniquesSearchSend a comment on this articleSubscribe to BYTE or BYTE on CD-ROM  
Flexible C++
Matthew Wilson
My approach to software engineering is far more pragmatic than it is theoretical--and no language better exemplifies this than C++.

more...

BYTE Digest

BYTE Digest editors every month analyze and evaluate the best articles from Information Week, EE Times, Dr. Dobb's Journal, Network Computing, Sys Admin, and dozens of other CMP publications—bringing you critical news and information about wireless communication, computer security, software development, embedded systems, and more!

Find out more

BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE Volume 1: Programming Languages
The Best of BYTE
Volume 1: Programming Languages
In this issue of Best of BYTE, we bring together some of the leading programming language designers and implementors...

Copyright © 2005 CMP Media LLC, Privacy Policy, Your California Privacy rights, Terms of Service
Site comments: webmaster@byte.com
SDMG Web Sites: BYTE.com, C/C++ Users Journal, Dr. Dobb's Journal, MSDN Magazine, New Architect, SD Expo, SD Magazine, Sys Admin, The Perl Journal, UnixReview.com, Windows Developer Network