Professional Documents
Culture Documents
Development Methodology
UNIFACE V7.2
151157206-00
Revision 0
Dec 2000
UMET
UNIFACE V7.2
UNIFACE Component-based
Development Methodology
Revision 0
Restricted Rights Notice
This document and the product referenced in it are subject to the following
legends:
1997-2000 Compuware Corporation. All rights reserved. Unpublished - rights
reserved under the Copyright Laws of the United States.
U.S. GOVERNMENT RIGHTS-Use, duplication, or disclosure by the U.S.
Government is subject to restrictions as set forth in Compuware Corporation
license agreement and as provided in DFARS 227.7202-1(a) and 227.7202-3(a)
(1995), DFARS 252.227-7013(c)(1)(ii)(OCT 1988), FAR 12.212(a) (1995), FAR
52.227-19, or FAR 52.227-14 (ALT III), as applicable. Compuware Corporation.
This product contains confidential information and trade secrets of Compuware
Corporation. Use, disclosure, or reproduction is prohibited without the prior
express written permission of Compuware Corporation.
Trademarks
Compuware is a registered trademark of Compuware Corporation and UNIFACE is a
registered trademark of Compuware Europe B.V. CICS, DB2, IBM, and OS/2 are
trademarks of International Business Machines Corporation. SOLID Server (TM), SOLID
Bonsai Tree (TM), SOLID Remote Control (TM), and SOLID SQL Editor (TM) are
trademarks of Solid Information Technology Ltd. All other company or product names used
in this publication are trademarks of their respective owners.
e-mail: DM&P-Hotline@nl.compuware.com
fax: +31 (0)20 311-6213
UNIFACE V7.2
Contents
Introduction
1.1
1.2
1.3
1.4
1.5
Inception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-3
The Modeling Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-8
Modeling processanalysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-10
2.3.1
Business function modeling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-11
2.3.2
Object modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-13
2.3.3
Behavioral modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-15
iii
UNIFACE V7.2
2.4
2.5
2.6
2.7
2.8
2.9
2.10
iv
(Dec 2000)
UNIFACE V7.2
Chapter 1
Introduction
Component-based development represents a significant paradigm shift
in application development. While component-based development
techniques have been used effectively in engineering and manufacturing
circles for many years, their application to software development is
relatively recent. The techniques came about in response to many of the
issues facing IT organizations today: reducing time to market,
responding more rapidly to change, and providing the flexibility to
change the scale or scope of functionality to keep pace with changes in the
business.
There are some inherent challenges in applying component-based
development techniques to software development. Until now, it has been
usual practice to design and build large, monolithic systems that perform
very specific functions. Component-based development, however,
employs a three-phase approach of modeling reusable, interchangeable
components, constructing the components, and assembling them into a
complete application.
Component-based applications are quite different from those developed
in the past, and the process for developing component-based applications
is also very different. Therefore, Compuware has developed a new
methodology to address the particular demands of component-based
development.
A software engineering methodology is a process for the organized
production of software using a collection of predefined techniques and
notation conventions. A methodology is usually presented as a series of
steps, with techniques and deliverables associated with each step.
The UNIFACE component-based development methodology uses
industry-standard object-oriented modeling techniques and notation
incorporated in the Unified Modeling Language (UML). This
component-based methodology addresses the entire system development
life cycle, conceived specifically to deliver the optimum design for
component-based applications. To achieve this goal, a thorough
1-1
UNIFACE V7.2
Modeling
(Analysis & Design)
Effort
Construction
Assembly
Elapsed time
Figure 1-1 Component-based development.
1-2
UNIFACE V7.2
What is an object?
What is a component?
Why develop component-based applications?
Why use a new component-based modeling technique?
1-3
UNIFACE V7.2
Cost
Retail Price
The structure defined for an object must be consistent for all occurrences
of that object.
1.2.3 Encapsulation
From the descriptions in section 1.2.1 Object structure and section 1.2.2
Object behavior, you might conclude that the objects structure is similar
to data specifications, and that the objects behavior is similar to process
specifications. This conclusion can be correct. However, prior to the use
of object-oriented design techniques, data design and process design were
addressed separately. When object-oriented design techniques such as
UML are used, there is no separation between structure (data) and
behavior (process). The behavior of an object encapsulates its structure.
Encapsulation means to enclose or conceal. When the term encapsulation
is applied to an object, it means that its structure is enclosed or hidden
by its behavior. This technique is often referred to as data hiding. The
objects data structure is concealed from the user, and is only accessible
by one of its public behaviors.
Figure 1-2 illustrates how structure is encapsulated by behavior.
1-4
UNIFACE V7.2
Order Equipment
Computer
Equipment
Receive
Equipment
Serial Number
Model Number
Manufacturer
Cost
Retail Price
Sell Equipment
Figure 1-2 The computer equipment objects behavior encapsulates its data.
Advantages of encapsulation
In todays dynamic business environment, frequent changes have become
commonplace. Keeping pace with this change is one of the greatest
challenges businesses face today. Using the example of a computer
equipment retailer, what would happen if the company decided to begin
repairing equipment in addition to selling it? They would need to add
new information to the structural and behavioral characteristics of the
computer equipment object. For example, the attributes Warranty Type
and Warranty Length, and a new operation Repair Equipment, would
need to be added.
Adding this additional data and functionality means that the retailer has
to make many extensive changes to existing programs and recompile any
programs that deal with computer equipment. With an encapsulated
object, however, none of this extra work is necessary. New attributes and
behavior can be added without affecting any of the existing behaviors.
Figure 1-3 illustrates this:
1-5
UNIFACE V7.2
Order Equipment
Computer
Equipment
Receive
Equipment
Serial Number
Model Number
Manufacturer
Cost
Retail Price
Warranty Type
Warranty Length
Repair
Equipment
Sell Equipment
1-6
UNIFACE V7.2
Order Equipment
Receive
Equipment
Computer
Equipment
Serial Number
Model Number
Manufacturer
Cost
Retail Price
Warranty type
Warranty length
Repair
Equipment
Sell Equipment
1-7
UNIFACE V7.2
1-8
UNIFACE V7.2
1-9
UNIFACE V7.2
1-10
UNIFACE V7.2
Packaged applications
Application components, subsystems
Objects, controls,
class libraries
Reuse
Business components,
subsystems
Productivity
1-11
UNIFACE V7.2
1-12
UNIFACE V7.2
1.4.7 Scalability
While there are many new applications being built today, many
mainframe and client/server legacy applications are still in use. The use
of components makes it possible to provide seamless integration between
these legacy applications and new, component-based applications. Also,
the rapid expansion of the Internet has created new business
requirements, such as B2C and B2B e-commerce. Components make it
1-13
UNIFACE V7.2
1-14
UNIFACE V7.2
Chapter 2
Component-based development
process
2-1
UNIFACE V7.2
Figure 2-1 also shows that this process is iterative. Components are
developed through a number of iterations, or repetitions, of the CBD life
cycle:
Inceptiongather business requirements from users and
stakeholders
Analysisproduce and validate UML analysis models from business
requirements
Designapply the properties of the application architecture to the
analysis models to produce the UML design models
Developmentdevelop components based on the analysis and design
models
Quality assurancetest the functionality, usability, and performance
of the components to determine how well the requirements have been
met
Feedback from the testing become the requirements for the next
iteration
The first iteration through the CBD process addresses the requirements
for all functionality within the scope of the project. At the development
phase, application functionality is constructed (see section 2.6
Incremental development approach). Application functionality is divided
into increments (discrete portions). Each of these increments consists of
a set of independently deployable, reusable components. Thus the
development of each increment can proceed independently using
iterative development techniques (see section section 2.7 Iterative
development approach) to build and refine the increment.1
Once a development iteration for an increment has been completed, it
proceeds into the quality assurance phase where it is thoroughly tested.
The feedback from the testing then becomes the initial requirements for
the next iteration. Each subsequent iteration is then focussed on
satisfying the requirements of a specific increment. This cycle is repeated
for each increment a set number of times, or until the stated
requirements are satisfied.
Incremental development provides a number of advantages, including:
1. Because the components delivered from each increment are independently deployable, increments can be
developed in parallel.
2-2
UNIFACE V7.2
2.1 Inception
2-3
UNIFACE V7.2
2-4
UNIFACE V7.2
2-5
UNIFACE V7.2
2-6
UNIFACE V7.2
2-7
UNIFACE V7.2
Modeling is divided into two processes: analysis and design. The analysis
process consists of the following activities:
Business function modeling
Object modeling
Behavioral modeling
The design process consists of the following activities:
2-8
UNIFACE V7.2
2-9
UNIFACE V7.2
2-10
UNIFACE V7.2
2-11
UNIFACE V7.2
2-12
UNIFACE V7.2
2-13
UNIFACE V7.2
2-14
UNIFACE V7.2
2-15
UNIFACE V7.2
Interaction diagrams
Activity diagrams
Statechart diagrams
Interaction diagrams
Interaction diagrams show how a group of objects interact to produce
specific behaviors. There are two types of interaction diagrams:
Sequence diagrams
Sequence diagrams show the sequence of interactions between
classes that occur within a specific scenario. Typically, these
interactions are initiated by an actor with a message to a class. The
class, in turn, sends messages to other classes that receive and act
upon the messages and perform the requested functions. The
interactions between classes continue in this way until the goal of the
scenario has been satisfied (see figure 2-11).
2-16
UNIFACE V7.2
: Order Clerk
: PURCHASE_
ORDER
: COMPANY
: PURCHASE_
ORDER_LINE
: PR ODUCT
: CATALOG
Enter Or der ( )
Ad d O rder Line(COMPAN Y)
Select Product(PRODUCT)
Collaboration diagrams
Collaboration diagrams depict the same information shown in the
sequence diagrams, but they present it from a different perspective.
In addition to the interactions shown in the sequence diagrams,
collaboration diagrams show the spatial relationships between
classes. Viewing the interactions from this perspective makes it
easier to understand how the classes are linked together.
2-17
UNIFACE V7.2
Activity diagrams
Activity diagrams combine the perspectives of use cases and interaction
diagrams by providing an aggregate view of all activities for a given use
case. Activity diagrams are similar to data flow diagrams and flow charts
because they show the flow and sequence of activities. However, while
data flow diagrams and flow charts are limited to describing only
sequential behavior, activity diagrams provide a means to describe
workflow, branching, and parallel behavior.
The content of activity diagrams is drawn from the elementary use case
diagrams and interaction diagrams. The elementary use cases identify
the elementary business functions in the system, and the interaction
diagrams define the behaviors required to complete these functions.
Activity diagrams blend the perspectives of function and behavior,
providing a unique, big picture view of the flow and behavioral
dependencies within an elementary use case.
2-18
UNIFACE V7.2
Figure 2-12 Activity diagram for the scenarios of an Enter Order use case.
Statechart diagrams
Statechart diagrams describe the possible states that a class can go into,
and the events or activities that cause changes in these states. Statechart
diagrams focus on the behaviors exhibited by each class.
2-19
UNIFACE V7.2
2-20
UNIFACE V7.2
The next phase in the modeling process is design. During inception and
analysis, the structural and behavioral requirements for the system are
defined and refined. The purpose of the design phase is to translate these
requirements into the desired component architecture that fully supports
heterogeneity, reusability, scalability, and portability.
The major activities in the design phase are:
Component model designMapping the dynamic behavior of the
class diagrams to interfaces and components (interface diagram and
component diagram).
Relational model designMapping the static information of the class
diagrams to a relational data model (persistent data model).
Business rules designMapping the business rules to business logic
components.
2-21
UNIFACE V7.2
2-22
UNIFACE V7.2
2-23
UNIFACE V7.2
Presentation layer
The presentation layer contains the graphical user interface (GUI) for an
application. The objects within the presentation layer provide a graphical
realization of the set of data elements and interfaces made available by
the applications business objects. However, they merely disclose these
data elements and interfaces and do not interact directly with
2-24
UNIFACE V7.2
application data sources; they request and receive data from objects
residing in the business logic layer. Objects residing in the presentation
layer are generically referred to as presentation components, even
though they can be implemented as browser-based server pages or GUI
forms.
Presentation components
Presentation components have the following characteristics:
Presentation components are typically resident or are downloaded to
the users computer.
Presentation components do not contain business rules. They allow
the user to enter, retrieve, change, and delete data. However, the
operations required to validate, process, and store this data reside
within components in the business logic layer rather than in the
presentation layer itself.
Presentation components do not maintain a constant connection to
components in the business logic layer. Instead, the business logic
layer sends a stream of data to, or receives a stream of data from these
components based upon the functions specified by the user. The
connection between the two components last only as long as needed to
pass the data stream, then the connection is terminated. The validity
of the data stream within the context of the function being performed
by the user is determined by the business logic components rather
than within the presentation component itself. This implies that the
presentation component does not contain any state behavior and is,
therefore, stateless.
Presentation components are not aware of the previous functions or
transactions performed by the user, so they do not maintain context
information.
2-25
UNIFACE V7.2
2-26
UNIFACE V7.2
2-27
UNIFACE V7.2
2-28
UNIFACE V7.2
Component diagrams
Once the process of defining components has been completed, the
components can be represented graphically using component diagrams.
Component diagrams are related to package diagrams. Component
packages are the logical containers, or sub-systems for the components
for a given business object. Where is a one-to-one correspondence
between component packages and class packages.
Each component package contains a component diagram (see
figure 2-15). The Component diagram depicts the components residing
within the package and their links to one another. Links to components
in other packages can also be depicted. For clarity, it is recommended to
show all of the operations contained within each component.
Components in the component diagram are logical by nature, meaning
that they specify no details pertaining to implementation technology.
2-29
UNIFACE V7.2
<<frm>>
PPH110I
Index
Company
<<frm>>
PPH410I
Index
Material
<<html>>
PPH020M
Maintain
Order
Service
Catalog
2-30
UNIFACE V7.2
2-31
UNIFACE V7.2
: Maintain Order
: Index
Company
: Service
Catalog
: Order Session
Service
: Business Rule
: Order Object
Service
Add Order( )
Select Company(COMPANY)
Create(ORDER, ORDERLINE)
Validate Uniqueness(
ordernumber
)
Validate dates(
orderdate
, expect date)
2-32
UNIFACE V7.2
2-33
UNIFACE V7.2
2.5 Development
Once all of the components have been defined for a package, development
can begin. Because the component-based development process is
iterative, and components themselves are self-contained and
independently deployable, the development effort can be broken down
into pieces called increments. This technique is called incremental
development.
2-34
UNIFACE V7.2
Figure 2-18
2-35
UNIFACE V7.2
Stage 1Objectives
Stage 2Architectural visioning
Stage 3Planning
Stage 4Standards and guidelines
Stage 5Available resources
Stage 6Definition of the business functionality (contained within
the business use cases) to be developed
The second step is to begin working on the package that you have chosen
to be delivered first. The development of the first increment helps to
identify the following:
2-36
Planning
Quality of the standards and guidelines
Adequacy of the available resources
Design or technology issues relating to the application architecture
UNIFACE V7.2
Feedback
Scope
of
project
Resources
Development 1
Development 2
Objectives
Development 3
Standards
and
guidelines
Development 4
Planning
Development 6
Solutions
Development 5
Delivery
and
evaluation
Development 7
Components
An evaluation after the second step identifies any changes that must be
made in the subsequent steps and, in doing so, minimizes the risks for
each step of the project.
The third step is to continue the development of the components
contained within the chosen package, and to evaluate the scope of the
project with its resources, objectives, standards and guidelines, planning,
and solutions.
2-37
UNIFACE V7.2
2-38
UNIFACE V7.2
Each iteration follows the overall CBD life cycle (see figure 2-20). During
the first iteration, the inception, analysis, and design activities are done
for the entire system (as defined by the scope of the project). Then, as
described in section 2.6 Incremental development approach, the
development effort is broken down into increments. From this point on,
the focus of each iteration is on the contents of the increment rather than
on the system as a whole. It is important to note, however, that changes
occurring within one increment can affect other increments.
2-39
UNIFACE V7.2
2-40
UNIFACE V7.2
2-41
UNIFACE V7.2
2-42
UNIFACE V7.2
2-43
UNIFACE V7.2
2-44
Testing
Deployment
Service level management
Usability measurement
UNIFACE V7.2
2.9.1 Testing
The constructed functionality must be tested against all requirements
and the agreed acceptance criteria, including completeness, robustness,
and stability. This means that the functionality should operate correctly
in all architectures in which it is deployed, and perform according to the
standards and measures established for the application.
A portion of testing is actually done during iterative development, and
other parts are done as part of quality assurance. Testing done during
development, called white box testing, is done by developers. Testing
done during quality assurance, called black box testing, is typically done
by users or with automated testing tools.
2-45
UNIFACE V7.2
run-time failures. This testing can require the creation of stub programs
for any related components that are not yet completed. Again, this
testing is best done by someone with a thorough understanding of
component development, but not the same person who developed the
component.
2-46
UNIFACE V7.2
2-47
UNIFACE V7.2
Stress testing
Stress testing involves measuring the capacity of components to process
large volumes of transactions within a specified period of time. For
example, an Order Entry component can have a requirement to be able
to process 2000 orders per hour. To accurately perform volume testing,
exact production conditions must be simulated. The subject components
are used to process the specified number of transactions. At the
conclusion of the test, the actual time and throughput metrics from the
components are documented. If the components perform within the
specified range, they are certified to perform acceptably. If they do not
perform acceptably, they require further refinement or reengineering to
improve their performance.
Concurrency testing
Concurrency testing is an extension of volume and stress testing. It
involves measuring the performance of components while in use by a
specified number of concurrent users. A component can process an
acceptable volume of transactions when used by one or a few users, but
might not perform at the same level when used by many concurrent
users. Again, accurate multiuser testing requires an exact simulation of
production conditions, and that the specified number of users attempt to
perform a specified function simultaneously. If the components are able
to handle the volume of concurrent users within the specified
parameters, they are certified to perform acceptably. If they do not
perform acceptably, they require further refinement or reengineering to
improve their performance.
2-48
UNIFACE V7.2
Regression testing
Regression testing is appropriate when a component is modified, or a new
component is added to a group of existing components. Regression testing
involves running a set of components through a pre-set series of tests and
comparing the results to a master set of results. If all of the regression
test results match the master set, the new component or function is
working correctly. If any of the tests differ in result from the master,
there is a problem. Identifying which part of the regression test set failed
isolates the offending component(s) or operation(s), simplifying the
debugging process. Regression testing is usually done by testing
specialists or by automated testing tools.
Automated testing
Many of the tests described above can be automated with a testing tool.
Automated testing tools run predefined test sequences called test scripts.
These test scripts can be developed from various sources. However,
modeling deliverables, such as use cases, interaction diagrams, and
inter-component communications diagrams provide a wealth of
information that can easily be mapped into test scripts.
2.9.5 Deployment
When components have been accepted by the users and certified as being
ready for production, they can be deployed into the production
environment. Deployment involves the actual distribution of the new
components to the various physical nodes throughout a network. This
should be done in accordance with version control and release
management standards and procedures.
2-49
UNIFACE V7.2
2.10 Summary
The component-based development methodology provides an effective
framework for the production of high quality, highly effective reusable
components.
2-50
UNIFACE V7.2
The CBD process is structured, with distinct phases that have specific
deliverables and goals. It is also iterative, featuring cycles of analysis and
design phases in conjunction with incremental development and delivery
approaches. This combination of structure and iteration provides the
optimum flexibility to accommodate a project of any size, using any
technology.
2-51
UNIFACE V7.2
2-52
UNIFACE V7.2
Use case
Actor(s)
Goal
Manage the entry and maintenance of purchase orders for products. The
purchase orders are received from retailers.
Pre-conditions
Business rules
A-1
UNIFACE V7.2
Standard scenario
1. Enter purchase order.
2. Select company.
3. For each orderline:
Select product to be ordered.
Get current product price.
Compute order total.
A-2
UNIFACE V7.2
Post-conditions
Business objects
A-3
UNIFACE V7.2
A-4