|
|
|
|
|
|
|
|
Alan Cameron Wills |
|
joint developer of Catalysis design method for
CBD, EAI, OOD |
|
|
|
technical director of TriReme International Ltd |
|
Mentoring in software architecture and process |
|
Clients in diverse application areas in UK,
Europe, USA |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Software architecture and process |
|
http://www.trireme.com |
|
|
|
|
|
Agile Methods – XP etc – increasingly popular
& successful |
|
Rigorous testing, frequent refactoring and
elaboration |
|
Minimal documentation |
|
Close links between customer and developers |
|
|
|
|
|
Analysis, architecture, and design used to seem
quite useful – UML, use-cases, CRC, patterns, and all that |
|
Clarification of goals before rushing into code |
|
Definition of interfaces, conventions and
standards |
|
High-level descriptions of code |
|
|
|
Can they be used together? Can both sets of
benefits be got? |
|
|
|
|
Incremental Software Development |
|
|
|
Requirements process must clean up the
requirements |
|
|
|
Requirements models encode vocabulary and
business rules |
|
|
|
Raising issues with consistency checks:
Catalytic Modeling |
|
|
|
Models Generate Tests |
|
|
|
|
|
|
|
|
|
|
|
|
|
Close coupling between customer and developer |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Converges on real needs of customer |
|
!= needs as originally understood by either
party |
|
|
|
|
Incremental Software Development |
|
|
|
Requirements process must clean up the
requirements |
|
|
|
Requirements models encode vocabulary and
business rules |
|
|
|
Raising issues with consistency checks:
Catalytic Modeling |
|
|
|
Models Generate Tests |
|
|
|
|
|
|
|
Customer works with developer and tries out
software |
|
=> Design converges on customer’s real needs |
|
not the same as initially perceived needs |
|
|
|
Developers work in (varying) pairs |
|
=> tends to spread common understanding of
aims and architecture |
|
|
|
Little documentation except Stories, Tests, and
Code |
|
=> little or nothing to get out of step with
code |
|
|
|
Rigorous regression testing |
|
=> bugs only rarely introduced while
refactoring and elaborating code |
|
|
|
|
|
Any changes to the method should not lose these
benefits |
|
|
|
|
|
Common understanding of needs is difficult in a
big team |
|
Tests not easy to read |
|
Stories ambiguous |
|
Big picture gets lost among details |
|
|
|
Common understanding of architecture is
difficult in big team |
|
Big picture difficult to see in the code,
without high-level explanation |
|
Many developers insufficiently experienced to
hold design in the head |
|
|
|
Customers not always unitary and coherent |
|
Can spend much time arguing among themselves |
|
Close coupling feeds a lot of noise to the
developers |
|
|
|
Customers focus on superficial features until
too late |
|
Looking at a working prototype not always best
way to see deep issues |
|
|
|
|
|
|
|
|
|
|
Development stages have to be done for each
iteration |
|
|
|
|
|
|
|
|
|
|
|
|
Incremental Software Development |
|
|
|
Requirements process must clean up the
requirements |
|
|
|
Requirements models encode vocabulary and
business rules |
|
|
|
Raising issues with consistency checks:
Catalytic Modeling |
|
|
|
Models Generate Tests |
|
|
|
|
|
|
|
|
|
Analysts write Requirements Models |
|
don’t assign operations to classes inside the
system |
|
don’t define collaborations inside the system |
|
do define collaborations external to the system |
|
do define operations or transactions visible at
system interface |
|
just define what they achieve, not how they work |
|
|
|
|
Designers determine internal structure &
collaborations |
|
|
|
|
Requirements determine tests |
|
|
|
|
|
|
|
Repository of principal things we know about
requirements: |
|
Stories |
|
Business concept model |
|
Use cases |
|
Business rules and constraints |
|
Website navigation maps |
|
GUI style guide |
|
External interface definitions (to other
systems) |
|
Quality requirements |
|
Usability, robustness, reliability, latency,
capacity, security, … |
|
|
|
Doesn’t include: |
|
Fine detail |
|
Internal structure of system |
|
|
|
|
|
UML for requirements specification |
|
|
|
|
|
|
|
|
|
|
|
|
|
UML for design |
|
Can almost write code in UML – e.g. Together |
|
|
|
UML has different interpretations depending on
usage |
|
|
|
|
|
|
|
Some tools maintain a direct correspondence
between
UML and program code |
|
eg. Together/J |
|
effectively programming in a UML/Java mix |
|
But UML is also useful for: |
|
Abstract models that don’t contain all the
detail |
|
very useful for high-level ‘domain’ or
‘essential’ models, which define business vocabulary and rules |
|
clear high-level overview of requirements or
design, uncluttered by the fine detail of the code |
|
Defining interfaces in frameworks and between
components |
|
These models are about what the components talk
to each other about – not about their internal structure |
|
|
|
UML programming tools are not so useful for
these purposes |
|
|
|
|
The high level view helps think clearly about
designs |
|
|
|
|
Incremental Software Development |
|
|
|
Requirements process must clean up the
requirements |
|
|
|
Requirements models encode vocabulary and
business rules |
|
|
|
Raising issues with consistency checks:
Catalytic Modeling |
|
|
|
Models Generate Tests |
|
|
|
|
|
|
|
|
|
In requirements analysis, we: |
|
Encode the requirements in a model incorporating |
|
use-cases |
|
class diagrams |
|
business rules |
|
non-functional requirements |
|
We use a battery of techniques and patterns
designed to raise issues with the requirements |
|
|
|
Small selection of Catalytic Modeling techniques
follows |
|
Techniques drawn from work on ‘Catalysis’ |
|
[DeSouza & Wills 1998] |
|
|
|
|
|
|
|
|
|
|
|
Inspect class diagrams; ask: |
|
what changes this association or attribute? |
|
what creates/deletes this object or association? |
|
|
|
|
|
|
|
|
|
Static rules (“invariants”):
statements always true about associations and attributes |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Look for loops in class diagrams |
|
Look for instance diagrams that would conform to
class diagram but be wrong within the business |
|
|
|
Use the vocabulary of the class diagram to
express the rules |
|
|
|
|
Look for instance diagrams that conform to class
diagram
but would be wrong in the domain |
|
|
|
|
Any loops in the type diagram suggest an
invariant might be appropriate – raise questions to the customer |
|
|
|
|
Any loops in the type diagram suggest an
invariant might be appropriate |
|
|
|
|
Incremental Software Development |
|
|
|
Requirements process must clean up the
requirements |
|
|
|
Requirements models encode vocabulary and
business rules |
|
|
|
Raising issues with consistency checks:
Catalytic Modeling |
|
|
|
Models Generate Tests |
|
|
|
|
Incremental development relies on rigorous
testing |
|
|
|
|
|
|
The model is not necessarily a picture of the
internal structure |
|
Component is a black box:
We don’t know anything about how Flight, captain and copilot are
implemented inside the component |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The model says what questions the component can
answer: |
|
AirCrewName getCaptain (FlightId fid); |
|
AirCrewName getCopilot (FlightId fid); |
|
|
|
|
|
|
So this rule in the model: |
|
Flight :: captain != copilot |
|
|
|
means that for any Flight ID fid, in any
scheduler component, at any time: |
|
schedulerSystem.getCaptain(fid)
!= schedulerSystem.getCopilot(fid) |
|
|
|
The requirements model: |
|
tells the test team what to test; |
|
tells the design team what requirements to meet; |
|
doesn’t necessarily tell them how to design it; |
|
doesn’t tell them how to test it
(harness/monitor/…) |
|
|
|
|
|
Postconditions compare before- and after-states |
|
Save before-state |
|
|
|
|
|
Program code may be much more complex than the
abstract model |
|
But the associations and attributes of the model
can be abstracted from the code by read-only functions |
|
all the information in the abstract model is
there in the code |
|
Postconditions expressed in terms of the
abstract model can be tested by applying the abstraction functions |
|
|
|
|
|
|
|
White box testing |
|
checks each path through code |
|
no good if you can’t see the code (as in CBD) |
|
|
|
Black box testing |
|
partition state space into zones, check
representative points |
|
|
|
|
|
|
|
|
Theory: |
|
For each use-case / operation: |
|
Consider space of all parameters and state
variables |
|
Delineate boundaries where changes in behavior
arise |
|
Look at preconditions, postconditions and
invariants |
|
Choose points on the boundaries; and in the
intervening zones |
|
Set up tests that exercise the operation at each
point |
|
|
|
|
|
|
|
|
|
Boundary points @ one room available; and @ all
rooms available |
|
Zone @ some rooms available |
|
|
|
|
|
Separate requirements analysis necessary in big
projects |
|
Requirements analysis obstructs incremental
development unless it |
|
gets quickly to a broad view of the big issues,
faster than programming |
|
raises questions about those issues, to improve
consistency and completeness |
|
Catalytic Modeling techniques provide ways to
raise issues and check consistency |
|
Requirements should be ‘black box’, so that
pluggable and bought-in components can be used |
|
Requirements model should generate tests (not
code) |
|
|
|
|
|
Incremental Development |
|
eXtreme Programming: http://www.c2.com; books by
K Beck et al |
|
RUP/ USDP: http://www.rational.com; book by P
Kruchten |
|
DSDM: http://www.dsdm.org; book by J Stapleton |
|
Crystal: books by A Cockburn |
|
UML |
|
UML standard: http://www.omg.org; book by M
Fowler |
|
OCL: book by J Warmer & A Kleppe |
|
Product Line Architecture |
|
Book by Linda Northrop |
|
|
|
Catalytic Modeling Techniques |
|
http://www.trireme.com/xp-uml |
|