|
Jim's
Pages |
Software Architecture |
|
|
| Architecture Documentation |
It's a stereotype that techies don't much care for producing documentation.
Like most generalizations, it has some truth to it, but I, for one, love
writing. (Can you tell?) On my current project, I started architecture
documentation with the Four Plus One
views, but it never felt right. I wanted to slice the layers apart and show them
separately, but also wanted to follow certain functional areas from top to
bottom, plus fit in developer cookbooks and the rationale for customizations in
a vendor package. I wound up with a web site that cuts through the subject in
multiple directions with liberal hyperlinking. You can follow the documentation
in any dimension, in ways you never could with a paper document.
Code comments are a different story. I've come to believe "if you need
documentation to explain code, there's something wrong with the code" and
my comments have become more spare as I deliberately write code that explains
itself. In my Java work I focus on documenting packages and public methods where
the JavaDoc can help somebody use classes without seeing the code.
But systems in the large benefit from good architecture documentation. The
following is borrowed from Software
Architecture Documentation in Practice at the Carnegie Mellon Software
Engineering Institute. There is much more about documentation on the page,
and much more about everything at SEI.
Uses of Architecture Documentation
A vehicle for communicating the system's design to interested
stakeholders at each stage of its evolution.
This perspective on architecture is forward-looking, involving steps of
creation and refinement. Stakeholders include those involved in managing the
project, as well as "consumers" of the architecture that must write
code to carry it out, or design systems that must be compatible with it.
Specific uses in this category include the following:
- For downstream designers and implementers, the architecture provides their
"marching orders." The architecture establishes inviolable
constraints (plus exploitable freedoms) on downstream development
activities.
- For testers and integrators, the architecture dictates the correct
black-box behavior of the pieces that must fit together.
- For technical managers, architecture provides the basis for forming
development teams corresponding to the work assignments identified.
- For project managers, architecture serves as the basis for a work
breakdown structure, planning, allocation of project resources, and tracking
of progress by the various teams.
- For designers of other systems with which this one must interoperate, the
architecture defines the set of operations provided and required, and the
protocols for their operation, that allows the interoperation to take place.
A basis for performing up-front analysis to validate (or uncover
deficiencies in) architectural design decisions and refine or alter those
decisions where necessary.
This perspective on architecture is, in some sense, inward-looking. It
involves making prospective architectural decisions and then projecting the
effect of those decisions on the system or systems that the architecture is
driving. Where the effect is unacceptable, the relevant decisions are
re-thought, and the process repeats. This process occurs in tight cycles (most
architects project the effect of each of their decisions) and in large cycles
(in which large groups of decisions, perhaps even the entire architecture, are
subjected to formal validation). In particular, architecture provides the
following:
- For the architect and requirements engineers who represent the customer(s),
architecture is a forum for negotiating and making trade-offs among
competing requirements.
- For the architect and component designers, architecture is a vehicle for
arbitrating resource contention and establishing performance and other kinds
of run-time resource consumption budgets.
- For those wanting to develop using vendor-provided products from the
commercial marketplace, the architecture establishes the possibilities for
commercial off-the-shelf (COTS) component integration by setting system and
component boundaries and establishing requirements for the required behavior
and quality properties of those components.
- For those interested in the ability of the design to meet the system's
quality objectives, the architecture serves as the fodder for architectural
evaluation methods such as the Software Architecture Analysis Method [Kazman
96] and the Architecture Tradeoff Analysis Method (ATAMSM
) [SEI 00] and Software Performance Engineering (SPE) [Smith 90] as well as
less ambitious (and less effective) activities such as unfocused design
walkthroughs.
- For performance engineers, architecture provides the formal model that
drives analytical tools such as rate monotonic schedulers, simulations and
simulation generators, theorem provers and model checking verifiers.
- For product line managers, the architecture determines whether a potential
new member of a product family is in or out of scope, and if out, by how
much.
The first artifact used to achieve system understanding.
This perspective on architecture is reverse-looking. It refers to cases in
which the system has been built and deployed, and now the time has come to make
a change to it or to extract resources from it for use elsewhere. Architecture
mining and recovery fall into this category, as do routine maintenance
activities. In particular, architecture serves the following roles:
- For technical mangers, architecture is basis for conformance checking, for
assurance that implementations have in fact been faithful to the
architectural prescriptions.
- For maintainers, architecture is a starting point for maintenance
activities, revealing the areas a prospective change will affect.
- For new project members, the architecture is usually the first artifact
for familiarization with a system's design.
- For those inheriting the job of architect after the previous architect's
untimely departure, the architecture is the artifact that (if properly
documented) preserves that architect's knowledge and rationale.
- For re-engineers, architecture is the often first artifact recovered from
a program understanding activity or (in the event that the architecture is
known or has already been recovered) the artifact that drives program
understanding activities at component granularities.
It should be clear from this discussion that architecture documentation is
both prescriptive and descriptive. That is, it prescribes what should be true,
and it describes what is true, about a system's design. In that sense, the same
documentation serves both purposes, and rightly so. If the "build-as"
documentation differs from the "as-built" documentation, then clearly
there was a breakdown in the development process.
However, the best architectural documentation for, say, performance analysis
may well be different from the best architectural documentation we would wish to
hand to a module implementer. After we introduce architectural views and other
architectural documentation, we will return to the roles of architecture and
discuss what documentation strategies are well suited to each role.
Copyright 2001-2005, Jim Standley