Title: Building better business layer models faster
1Building better business layer models
faster using Archetypes in UML
David Anderson Development manager, Mobile
Portal SprintPCS.com dander28_at_sprintspectrum.com
Based on the work of Peter Coad et al, as
described in the book, Java Modeling in Color
with UML Enterprise Components and Process
PTR-PH 1999
2Background - 3 tier model
3Background - Software Engineering Lifecycle
Requirements
Analysis
Design
Build
Test
4Background - Quality of a model
- Elegant
- Enough to get the job done and no more
- Extensible
- Robust and resilient to change
In anything at all, perfection is finally
attained not when there is no longer anything to
add, but when there is no longer anything to take
away
Antoine de Saint Exupery
5Background - Repeatability, a modeling goal!
Find a technique that delivers predictable, good
quality models from a broad mix of developer
ability.
- - What the patterns movement is all about!
61995 - Roles, Transactions, Things, Catalog
Descriptions
Catalog Description
Role
Transaction
Thing
Object Models Strategies, Patterns
Applications, 1st ed., Coad, Mayfield North,
Yourdon Press, Prentice Hall, 1995
71997 - Moments or Intervals of Time
- Generalization of the idea of a transaction
- Warranty Period
- Period of Employment
- Loan Approval Request
- Funds Disbursement
still referred to as Transaction in, Object
Models Strategies, Patterns Applications, 2nd
ed., Coad, Mayfield North, Yourdon Press,
Prentice Hall, 1997
8Adoption of
Now using UML notation
Meta class types are now being annotated on the
diagrams using tags
Person/Place/Thing
The stereotype chosen indicates the role the
class is playing in the model and the kinds of
associations that we might expect it to have.
Beginning to see a propensity for behavior to
repeat itself across different classes of the
same
9September 1997 - Introduction of Color
Color instantly communicates the pattern of class
relationships to the viewer
If the colors are not configured in the correct
pattern then there are strong clues that the
model could be improved!
10Behavior of Colors
Pink - Moment or Interval of Time
Attributes - startDate, endDate, number, total,
status, priority Methods - totalSalesValue(),
isComplete(), isApproved(), isUrgent()
Yellow - Role
Methods - assessPerformance(), salesMadeInPerio
d(), averageSalesOverPeriod(), assessAccuray(),
assessSpeed()
Green - Person, Place or Thing
Attributes - quantity, status e.g. on vacation
Blue - Description
Attributes - price, text description,
image Methods - business rules, terms and
conditions totalUnitsAvailable() totalUnitsManuf
actured()
11Dec 1998 - Influence of Phil Bradley
Archetypes not stereotypes.
a model from which all things of the same kind
more or less follow
rather than
a conventional, formulaic, over-simplified
conception, opinion or image
All business flows should / ought to be basically
the same.
Data Model Patterns - Conventions of
Thought, David Hay, Dorset House, 1996
The Universal Data Model
Phil Bradley was Development Manager Persistence
Layer, PowerLender Project, United Overseas Bank,
Singapore 1997 - 1999
12Jan 1999 - The Domain Neutral Component
Java Modeling in Color Enterprise Components
and Process, Coad, Lefebvre and De Luca, PTR-PH
1999
13The Pink or Green Conflict?
14The Solution - Things play Roles in M-Is
15A Video Store Example
16Simple Corporate Structure Example
17A Bank Loan Example
This example shows the Person Class holding
relationships to several Classes. The
Loan Application Class is a Moment or Interval
which crosses the Boundary from inside to outside
the business.
18Using Archetypes to model Business Flows
A business flow is modeled with a stack of Moment-Intervals which happen over time.
19Summary - Modeling with Archetypes
- A craft - perfected over time
- Easily learned - Easily taught
- DNC reliable and repeatable
- Archetypes easily identified from reading a
requirements document - Leads to elegant, robust, extensible, business
layer models - Repeatable - a basic pattern even novice modelers
can follow - Eliminates class discovery problems
- An order of magnitude, speed improvement for
class diagrams - Only one pattern to learn!
20References
Object Models Strategies, Patterns
Applications, 2nd ed., Coad, Mayfield North,
Yourdon Press, Prentice Hall, 1997
Java Modeling in Color with UML Enterprise
Components and Process, Coad, Lefebvre, De Luca,
Prentice Hall, 1999
Data Model Patterns Conventions of Thought,
David Hay, Dorset House, 1996
The Coad Letter 68 - The Domain Neutral
Component, Stephen Palmer, http//www.togethercomm
unity.com/coad-letter/Coad-Letter-0068.html
Developing a UI Design from a UML Color Model,
David Anderson, http//www.uidesign.net/1999/paper
s/UML_UI.html