01 BestPractices-bn
01 BestPractices-bn
Topics
Practice 1: Develop Iteratively .............................................................................. 1-7
Practice 2: Manage Requirements ...................................................................... 1-11
Practice 3: Use Component Architectures........................................................... 1-15
Practice 4: Model Visually (UML)........................................................................ 1-18
Practice 5: Continuously Verify Quality............................................................... 1-22
Practice 6: Manage Change ................................................................................ 1-27
1-1
DEV475 Mastering Object-Oriented Analysis and Design with UML
Objectives
Objectives
Identify activities for understanding and
solving software engineering problems.
Explain the Six Best Practices.
Present the Rational Unified Process (RUP)
within the context of the Six Best Practices.
In this module, you learn about recommended software development Best Practices
and the reasons for these recommendations. Then you see how the Rational Unified
Process (RUP) is designed to help you implement the Six Best Practices.
1-2
Module 1 - Best Practices of Software Engineering
1-3
DEV475 Mastering Object-Oriented Analysis and Design with UML
1-4
Module 1 - Best Practices of Software Engineering
Treat these root causes, and you will eliminate the symptoms. Eliminate the
symptoms, and you’ll be in a much better position to develop quality software in a
repeatable and predictable fashion.
Best practices are a set of commercially proven approaches to software development,
which, when used in combination, strike at the root causes of software development
problems. These are called “Best Practices,” not because we can precisely quantify
their value, but because they are observed to be commonly used in the industry by
successful organizations. The Best Practices are harvested from thousands of
customers on thousands of projects and from industry experts.
1-5
DEV475 Mastering Object-Oriented Analysis and Design with UML
1-6
Module 1 - Best Practices of Software Engineering
Best Practices
Process Made Practical
Develop Iteratively
Manage Requirements
Use Component
Architectures
Model Visually (UML)
Continuously Verify Quality
Manage Change
1-7
DEV475 Mastering Object-Oriented Analysis and Design with UML
1-8
Module 1 - Best Practices of Software Engineering
Evaluation
The earliest iterations address the greatest risks. Each iteration includes integration
and testing and produces an executable release. Iterations help:
• Resolve major risks before making large investments.
• Enable early user feedback.
• Make testing and integration continuous.
• Focus project short-term objective milestones.
• Make possible deployment of partial implementations.
Iterative processes were developed in response to these waterfall characteristics. With
an iterative process, the waterfall steps are applied iteratively. Instead of developing
the whole system in lock step, an increment (for example, a subset of system
functionality) is selected and developed, then another increment, and so on. The
selection of the first increment to be developed is based on risk, with the highest
priority risks first. To address the selected risk(s), choose a subset of use cases.
Develop the minimal set of use cases that will allow objective verification (that is,
through a set of executable tests) of the risks that you have chosen. Then select the
next increment to address the next-highest risk, and so on. Thus you apply the
waterfall approach within each iteration, and the system evolves incrementally.
1-9
DEV475 Mastering Object-Oriented Analysis and Design with UML
Risk Profiles
Risk Profiles
Waterfall Risk
Risk
Risk Reduction
Iterative Risk
Time
1 - 10
Module 1 - Best Practices of Software Engineering
Best Practices
Process Made Practical
Develop Iteratively
Manage Requirements
Use Component
Architectures
Model Visually (UML)
Continuously Verify Quality
Manage Change
A report from the Standish Group confirms that a distinct minority of software
development projects is completed on-time and on-budget. In their report, the
success rate was only 16.2%, while challenged projects (operational, but late and
over-budget) accounted for 52.7%. Impaired (canceled) projects accounted for
31.1%. These failures are attributed to incorrect requirements definition from the start
of the project to poor requirements management throughout the development
lifecycle. (Source: Chaos Report, http://www.standishgroup.com)
1 - 11
DEV475 Mastering Object-Oriented Analysis and Design with UML
Requirements Management
Requirements Management
1 - 12
Module 1 - Best Practices of Software Engineering
1 - 13
DEV475 Mastering Object-Oriented Analysis and Design with UML
Problem Problem
Space
Needs
Solution
Tr
Space
ac
Features
ea
bil
The
it y
Product
Software to Be
Requirements Built
1 - 14
Module 1 - Best Practices of Software Engineering
Best Practices
Process Made Practical
Develop Iteratively
Manage Requirements
Use Component
Architectures
Model Visually (UML)
Continuously Verify Quality
Manage Change
Software architecture is the development product that gives the highest return on
investment with respect to quality, schedule, and cost, according to the authors of
Software Architecture in Practice (Len Bass, Paul Clements and Rick Kazman [1998]
Addison-Wesley). The Software Engineering Institute (SEI) has an effort underway
called the Architecture Tradeoff Analysis (ATA) Initiative that focuses on software
architecture, a discipline much misunderstood in the software industry. The SEI has
been evaluating software architectures for some time and would like to see
architecture evaluation in wider use. As a result of performing architecture
evaluations, AT&T reported a 10 percent productivity increase (from news@sei, Vol.
1, No. 2).
1 - 15
DEV475 Mastering Object-Oriented Analysis and Design with UML
Architecture is a part of Design. It is about making decisions on how the system will
be built. But it is not all of the design. It stops at the major abstractions, or, in other
words, the elements that have some pervasive and long-lasting effect on system
performance and ability to evolve.
A software system’s architecture is perhaps the most important aspect that can be
used to control the iterative and incremental development of a system throughout its
lifecycle.
The most important property of an architecture is resilience –flexibility in the face of
change. To achieve it, architects must anticipate evolution in both the problem
domain and the implementation technologies to produce a design that can gracefully
accommodate such changes. Key techniques are abstraction, encapsulation, and
object-oriented Analysis and Design. The result is that applications are fundamentally
more maintainable and extensible.
1 - 16
Module 1 - Best Practices of Software Engineering
1 - 17
DEV475 Mastering Object-Oriented Analysis and Design with UML
Best Practices
Process Made Practical
Develop Iteratively
Manage Requirements
Use Component
Architectures
Model Visually (UML)
Continuously Verify Quality
Manage Change
1 - 18
Module 1 - Best Practices of Software Engineering
1 - 19
DEV475 Mastering Object-Oriented Analysis and Design with UML
Collaboration Component
Models
Diagrams Diagrams
1 - 20
Module 1 - Best Practices of Software Engineering
Docu me ntList
ad d( )
Actor A Actor B fetchD oc( ) del ete( )
name : i nt
doci d : int
sortB yName( ) numFiel d : int
add file [ numberOffile==MAX ] / Writing
flag OFF
get( )
open( ) read() fill the
Use Case 2 close( ) cod e..
Openning
FileList read( )
sortFileList( )
fList create( )
fillDocu me nt( ) close file
add( )
del ete( )
1
rep
File
Deployment
Rep ositor y
read( )
readD oc( )
op en( )
readFil e( )
create( )
Diagram
fillFile( )
2: fetc hDoc( )
FileManager
Window95
¹®¼ -°ü¸®
Windows95
W indow s95
Document
Ŭ¶óÀ̾ðÆ®.EXE
8: fillFile ( ) W indow s
NT
IBM
7: readFile ( ) Mainfra me
5: readDoc ( )
document : Document
repository : Repository
µ¥ÀÌŸº£À̽º ¼- ¹ö
user
mainWnd fileMgr :
FileMgr
document :
Document
gFile repository
Component
Diagram
Target
ƯÁ¤¹®¼- ¿¡ ´ëÇ Ñ º ¸±â¸¦ 1: Doc v iew request ( )
»ç¿ëÀÚ°¡ ¿äÃ»Ç Ñ´Ù.
2: fetchDoc ( )
3: create ( )
4: create ( )
System
5: readDoc ( )
7: readFile ( )
8: fillFile ( )
Forward and
È -¸é °´Ã ¼´Â ÀÐ ¾îµéÀ Î 9: sortByName ( )
° ´Ã¼µé¿ ¡ ´ëÇØ À̸§ º° ·Î
Á ¤·ÄÀ» ½ÃÄÑ È-¸é¿¡
º¸ ¿©ÁØ´Ù.
Sequence Reverse
Diagram Engineering
Mastering Object Oriented Analysis and Design with UML
Copyright © 2003 Rational Software, all rights reserved 21
Visual modeling with the UML makes application architecture tangible, permitting us
to assess it in multiple dimensions. How portable is it? Can it exploit expected
advances in parallel processing? How can you modify it to support a family of
applications?
We have discussed the importance of architectural resilience and quality. The UML
enables us to evaluate these key characteristics during early iterations — at a point
when design defects can be corrected before threatening project success.
Advances in forward and reverse engineering techniques permit changes to an
application’s model to be reflected automatically in its source code, and changes to
its source code to be automatically reflected in its model. This is critical when using
an iterative process, in which we expect such changes with each iteration.
1 - 21
DEV475 Mastering Object-Oriented Analysis and Design with UML
Best Practices
Process Made Practical
Develop Iteratively
Manage Requirements
Use Component
Architectures
Model Visually (UML)
Continuously
Verify Quality
Manage Change
Mastering Object Oriented Analysis and Design with UML
Copyright © 2003 Rational Software, all rights reserved 22
1 - 22
Module 1 - Best Practices of Software Engineering
1 - 23
DEV475 Mastering Object-Oriented Analysis and Design with UML
Functionality Reliability
Test the accurate Test that the application
workings of each behaves consistently
usage scenario. and predictably.
Supportability Performance
Test the ability to Test the online response
maintain and support under average and
application under peak loading.
production use.
Mastering Object Oriented Analysis and Design with UML
Copyright © 2003 Rational Software, all rights reserved 24
Functional testing verifies that a system executes the required use-case scenarios as
intended. Functional tests may include the testing of features, usage scenarios, and
security.
Usability testing evaluates the application from the user’s perspective. Usability tests
focus on human factors, aesthetics, consistency in the user interface, online and
context-sensitive Help, wizards and agents, user documentation, and training
materials.
Reliability testing verifies that the application performs reliably and is not prone to
failures during execution (crashes, hangs, and memory leaks). Effective reliability
testing requires specialized tools. Reliability tests include tests of integrity, structure,
stress, contention, and volume.
Performance testing checks that the target system works functionally and reliably
under production load. Performance tests include benchmark tests, load tests, and
performance profile tests.
Supportability testing verifies that the application can be deployed as intended.
Supportability tests include installation and configuration tests.
1 - 24
Module 1 - Best Practices of Software Engineering
UML Model
and
Implementation
Tests
In each iteration, automated tests are created that test the requirements addressed in
that iteration. As new requirements are added in subsequent iterations, new tests are
generated and run. At times, a requirement may be changed in a later iteration. In
that case, the tests associated with the changed requirement may be modified or
simply regenerated by an automated tool.
1 - 25
DEV475 Mastering Object-Oriented Analysis and Design with UML
Requirements Capture
Verify Approach
Time
The testing lifecycle is a part of the software lifecycle; both should start in an
equivalent time frame. The design and development process for tests can be as
complex and arduous as the process for developing the software product itself. If tests
do not start in line with the first executable software releases, the test effort will back
load the discovery of potentially important problems until late in the development
cycle.
1 - 26
Module 1 - Best Practices of Software Engineering
Best Practices
Process Made Practical
Develop Iteratively
Manage Requirements
Use Component
Architectures
Model Visually (UML)
Continuously Verify Quality
Manage Change
You cannot stop change from being introduced into a project. However, you must
control how and when changes are introduced into project artifacts, and who
introduces those changes.
You must also synchronize changes across development teams and locations.
Unified Change Management (UCM) is the Rational Software approach to managing
change in software system development, from requirements to release.
1 - 27
DEV475 Mastering Object-Oriented Analysis and Design with UML
Configuration
Management is
more than just
check-in and REPORT ALERT
check-out Process Build
Integration Management
Establishing a secure workspace for each developer provides isolation from changes
made in other workspaces and control of all software artifacts — models, code,
documents and so forth.
A key challenge to developing software-intensive systems is the need to cope with
multiple developers, organized into different teams, possibly at different sites, all
working together on multiple iterations, releases, products, and platforms. In the
absence of disciplined control, the development process rapidly degrades into chaos.
Progress can come to a stop.
Three common problems that result are:
• Simultaneous update: When two or more roles separately modify the same
artifact, the last one to make changes destroys the work of the former.
• Limited notification: When a problem is fixed in shared artifacts, some of the
users are not notified of the change.
• Multiple versions: With iterative development, it would not be unusual to have
multiple versions of an artifact in different stages of development at the same
time. For example, one release is in customer use, one is in test, and one is still in
development. If a problem is identified in any one of the versions, the fix must be
propagated among all of them.
1 - 28
Module 1 - Best Practices of Software Engineering
Aspects of a CM System
Aspects of a CM System
Change Request Management (CRM)
Configuration Status Reporting
Configuration Management (CM)
Change Tracking
Version Selection
Software Manufacture
1 - 29
DEV475 Mastering Object-Oriented Analysis and Design with UML
1 - 30
Module 1 - Best Practices of Software Engineering
Validates architectural
Use Component Architectures decisions early on
Addresses complexity of
Model Visually (UML) design/implementation incrementally
In the case of our Six Best Practices, the whole is much greater than the sum of the
parts. Each of the Best Practices reinforces and, in some cases, enables the others.
This slide shows just one example: how iterative development leverages the other five
Best Practices. However, each of the other five practices also enhances iterative
development. For example, iterative development done without adequate
requirements management can easily fail to converge on a solution. Requirements
can change at will, users cannot agree, and the iterations go on forever.
When requirements are managed, this is less likely to happen. Changes to
requirements are visible, and the impact on the development process is assessed
before the changes are accepted. Convergence on a stable set of requirements is
ensured. Similarly, each pair of Best Practices provides mutual support. Hence,
although it is possible to use one Best Practice without the others, it is not
recommended, since the resulting benefits will be significantly decreased.
1 - 31
DEV475 Mastering Object-Oriented Analysis and Design with UML
1 - 32
Module 1 - Best Practices of Software Engineering
Best Practices
Process Made Practical
Develop Iteratively
Manage Requirements
Use Component Architectures
Model Visually (UML)
Continuously Verify Quality
Manage Change
1 - 33
DEV475 Mastering Object-Oriented Analysis and Design with UML
Iterative approach
Guidance for activities
and artifacts
Process focus on
architecture
Use cases that drive
design and
implementation
Models that abstract
the system
Examples:
• The dynamic structure (phases and iterations) of the Rational Unified Process
creates the basis of iterative development.
• The Project Management discipline describes how to set up and execute a
project using phases and iterations.
• The Use-Case Model of the Requirements discipline and the risk list determine
what functionality you implement in an iteration.
• The Workflow Details of the Requirements discipline show the activities and
artifacts that make requirements management possible.
• The iterative approach allows you to progressively identify components, and to
decide which one to develop, which one to reuse, and which one to buy.
• The Unified Modeling Language (UML) used in the process represents the basis
of visual modeling and has become the de facto modeling language standard.
• The focus on software architecture allows you to articulate the structure: the
components, the ways in which they integrate, and the fundamental mechanisms
and patterns by which they interact.
1 - 34
Module 1 - Best Practices of Software Engineering
1 - 35
DEV475 Mastering Object-Oriented Analysis and Design with UML
time
During Inception, we define the scope of the project: what is included and what is
not. We do this by identifying all the actors and use cases, and by drafting the most
essential use cases (typically 20% of the complete model). A business plan is
developed to determine whether resources should be committed to the project.
During Elaboration, we focus on two things: getting a good grasp of the requirements
(80% complete) and establishing an architectural baseline. If we have a good grasp of
the requirements and the architecture, we can eliminate a lot of the risks, and we will
have a good idea of how much work remains to be done. We can make detailed
cost/resource estimations at the end of Elaboration.
During Construction, we build the product in several iterations up to a beta release.
During Transition, we move the product to the end user and focus on end-user
training, installation, and support.
The amount of time spent in each phase varies. For a complex project with many
technical unknowns and unclear requirements, Elaboration may include three-to-five
iterations. For a simple project, where requirements are known and the architecture
is simple, Elaboration may include only a single iteration.
1 - 36
Module 1 - Best Practices of Software Engineering
time
At each of the major milestones, we review the project and decide whether to
proceed with it as planned, to cancel the it, or to revise it. The criteria used to make
these decisions vary by phase.
LCO: scope is agreed upon and risks are understood and reasonable
LCA: high risks are addressed and architecture is stable
IOC: product is complete and quality is acceptable
The evaluation criteria for the Inception phase (LCO) include: stakeholder
concurrence on scope definition and cost/schedule estimates; requirements
understanding as evidenced by the fidelity of the primary use cases; credibility of
cost/schedule estimates, priorities, risks, and development process; depth and
breadth of any architectural prototype; actual expenditures versus planned
expenditures.
The evaluation criteria for the Elaboration phase (LCA) include: stability of the
product vision and architecture; resolution of major risk elements; adequate planning
and reasonable estimates for project completion; stakeholder acceptance of the
product vision and project plan; and acceptable expenditure level.
The evaluation criteria for the Construction phase (IOC) include: stability and
maturity of the product release (that is, is it ready to be deployed?); readiness of the
stakeholders for the transition; and acceptable expenditure level.
At the end of the Transition phase, we decide whether to release the product. We
base this primarily on the level of user satisfaction achieved during the Transition
phase. Often this milestone coincides with the initiation of another development
cycle to improve or enhance the product. In many cases, this new development cycle
may already be underway.
1 - 37
DEV475 Mastering Object-Oriented Analysis and Design with UML
Within each phase, there is a series of iterations. The number of iterations per phase
will vary. Each iteration results in an executable release encompassing larger and
larger subsets of the final application.
An internal release is kept within the development environment and (optionally)
demonstrated to the stakeholder community. We provide stakeholders (usually users)
with an external release for installation in their environment. External releases are
much more expensive because they require user documentation and technical
support — because of this, they normally occur only during the Transition phase.
The end of an iteration marks a minor milestone. At this point, we assess technical
results and revise future plans as necessary.
1 - 38
Module 1 - Best Practices of Software Engineering
Disciplines
group
activities
logically.
This slide illustrates how phases and iterations (the time dimension) relate to the
development activities (the discipline dimension). The relative size of each color area
in the graph indicates how much of the activity is performed in each phase or
iteratino.
Each iteration involves activities from all disciplines. The relative amount of work
related to the disciplines changes between iterations. For instance, during late
Construction, the main work is related to Implementation and Test and very little
work on Requirements is done.
Note that requirements are not necessarily complete by the end of Elaboration. It is
acceptable to delay the analysis and design of well-understood portions of the system
until Construction because they are low in risk.
1 - 39
DEV475 Mastering Object-Oriented Analysis and Design with UML
Models
Implemented
Realized By By
Realized Business Use- Use-Case
By Case Model Model
B
B B B
Automated
Business By Design Model Implementation
Object Model Model
The RUP takes a model-driven approach. Several models are needed to fully describe
the evolving system. Each major discipline produces one of those models. The models
are developed incrementally across iterations.
• The Business Model is a model of what the business processes are and of the
business environment. It can be used to generate requirements of supporting
information systems.
• The Use-Case Model is a model of what the system is supposed to do and of the
system environment.
• The Design Model is an object model describing the realization of use cases. It
serves as an abstraction of the implementation model and its source code.
• The Implementation Model is a collection of components and the
implementation subsystems that contain them.
Test Suites are derived from many of these models.
1 - 40
Module 1 - Best Practices of Software Engineering
Requirements:
Workflow
Mastering Object Oriented Analysis and Design with UML
Copyright © 2003 Rational Software, all rights reserved 41
Within a discipline, workflows group activities that are done together. Discipline
workflows will be present in varying degrees, depending on the phase.
1 - 41
DEV475 Mastering Object-Oriented Analysis and Design with UML
Workflow
Phase Iteration Discipline Detail
Participates in References
Role Activity
Responsible for Modifies
1 - 42
Module 1 - Best Practices of Software Engineering
Review
Review
Best Practices guide software engineering
by addressing root causes.
Best Practices reinforce each other.
Process guides a team on who does what,
when, and how.
The Rational Unified Process is a means of
achieving Best Practices.
1 - 43
DEV475 Mastering Object-Oriented Analysis and Design with UML
1 - 44