0% found this document useful (0 votes)
93 views

Chapter 1 Introduction

The document discusses the importance of software architecture and design. It states that architecture defines early design decisions that are difficult to change and influence quality attributes and development process. Well-designed architecture organizes the project, enables achievement of quality goals, and helps manage change. Architecture also allows incremental development and is reusable. The document also notes that design is important to avoid complex code that is buggy and hard to maintain. Higher-level design descriptions lead to better code.

Uploaded by

Gachago Maina
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views

Chapter 1 Introduction

The document discusses the importance of software architecture and design. It states that architecture defines early design decisions that are difficult to change and influence quality attributes and development process. Well-designed architecture organizes the project, enables achievement of quality goals, and helps manage change. Architecture also allows incremental development and is reusable. The document also notes that design is important to avoid complex code that is buggy and hard to maintain. Higher-level design descriptions lead to better code.

Uploaded by

Gachago Maina
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 29

Chapter 1

Introduction
Outline
• Software Architecture and Software Design
• Importance of Software Architecture and
Design
• Documenting Architecture and Design

2
Architecture Definition
• A “software architecture” is the structure (or
structures) of a system, which comprise
– software components,
– the externally visible properties of those
components,
– and the relationships among them.
App

Logic Generic
GUI

Win32

3
Components & Structures
• Architecture defines “components”
– an abstraction
– suppresses details not pertinent to its interactions with
other components
• An architecture comprises more than one
structure
• modular structure (calls/uses)
• process structure (invokes, communicates with,
synchronises with)
• physical structure (libraries, DLL’s, processors)
• inheritance structures (inherits)
• …
4
Design & Architecture in the Development
Process
Requirements

Architecture

Design Design Design Design

Code C&ut C&ut C&ut C&ut C&ut C&ut


&
Unit
Test
Integration Test

System Test
5
Software Architecture

• Architecture is Early
• Architecture represents the set of earliest design
decisions
– Hardest to change
– Most critical to get right
• Architecture is the first design artifact where a
system’s quality attributes are addressed
Software Architecture
• Specifying at the highest level the construction of
the system:
– Technology choices
• Platforms, language, database, middleware, …
– System construction
• Overall pattern: Monolithic, RDBMS, client/server, 3-tiered, n-
tiered, distributed, …
• Hardware interfaces (if any)
– Division into programs
• E.g. a program for data entry, another for data analysis, a
Web-oriented interface, …
– Division of programs into major subsystems
• Reuse strategy (shared subsystems)
• Calls constraints
• Major strategies (e.g., for persistence, IPC, …)
7
Architecture Drives
• Architecture serves as the blueprint for the
system but also the project:
– Team structure
– Documentation organization
– Work breakdown structure
– Scheduling, planning, budgeting
– Unit testing, integration
• Architecture establishes the communication
and coordination mechanisms among
components
Describing an Architecture
Control
Process
(CP)

Prop Loss Reverb Noise


Model Model Model
(MODP) (MODR) (MODN)

• What is the nature of the components?


• What is the nature of the links?
• Does the layout have any significance?
• How does it operate at runtime
– Dataflow
– Control flow
• Can we evaluate this architecture?

9
Software Design

• We are now considering how to lay down code.


• E.g., Object-Oriented
– What classes? What inheritance amongst the classes?
– What classes will call what other classes?
– How are classes grouped into subsystems (e.g. Java
packages)?
– What data members of classes
• Must decide these things at some point during the
coding process.
– Wish to minimize re-writes now and down the line
– Danger in early over-complexity (c.f. Extreme
Programming)
10
Architecture & Design

• Architecture
– High-level
– Major decisions
– Not even thinking about programming
• Design
– “Laying out” the programming language code
used to implement the architecture
– Organizing programming language concepts
But, … N.B. no standard terminology
11
Architecture vs. Design
• Architecture: where non-functional decisions are cast,
and functional requirements are partitioned
• Design: where functional requirements are
accomplished

non-functional architecture
requirements
(“ilities”)

functional
requirements design
(domains)
Who influences Software Architecture?
Summary: Influences on the Architect
Outline
• Software Architecture and Software Design
• Importance of Software Architecture and
Design
• Documenting Architecture and Design

15
Why is architecture important?
• Manifests early design decision
– most difficult to get correct and hardest to change
– defines constraints on the implementation
– inhibits or enables quality attributes
• Defines a work-breakdown structure
– organization (especially important for long-distance development)
– estimation
• A vehicle for stakeholder communication
– an architecture is the earliest artefact that enables the priorities among
competing concerns to be analysed
• Reviewable
– architectural errors are vastly more expensive to fix once a system has
been coded
– Can serve as a basis for training new developers
– As an indication of progress

16
Architecture As Communication
Vehicle
• Architecture provides a common frame of
reference in which competing interests may
be exposed and negotiated.
– negotiating requirements with users and other
stakeholders
– keeping the customer informed of progress and
cost
– implementing management decisions and
allocations
Architecture Constrains Implementation

• An architecture defines constraints on an


implementation.
– Architectures are descriptive and prescriptive
• descriptive for communication
• prescriptive for design and implementation
– Global resource allocation decisions
constrain implementations of individual
components
– System tradeoffs regarding quality attributes
are in the architectural realm.
Architecture Organizes the Development
Project
• The architecture influences the organizational
structure for development/maintenance efforts.
Examples include
– division into teams
– units for budgeting, planning
– basis of work breakdown structure
– organization of documentation
– organization of CM libraries
– basis of integration
– basis of test plans, testing
– basis of maintenance
– Incremental deployment
Architecture Permits/Precludes Achievement
of Quality Attributes
• For example

If you desire Examine


performance inter-component communication
modifiability component responsibilities
security inter-component communication,
specialized components (e. g., kernels)
scalability localization of resources
ability to subset inter-component usage
reusability inter-component coupling
Architecture is Key to Managing Change
• An architecture helps reason about and manage
change.
• important since 80% of effort in systems occurs after
deployment
• Architecture divides all changes into three classes:
• local: modifying a single component
• non-local: modifying several components
• architectural: modifying the gross system topology,
communication, and coordination mechanisms
• A “good” architecture is one in which the most
likely changes are also the easiest to make.
Architecture is Basis for Incremental
Development
• An architecture helps with evolutionary
prototyping and incremental delivery.
– Architecture serves as a skeletal framework
into which components can be plugged.
– By segregating functionality into appropriate
components, experimentation is easier.
– Risky elements of the system can be
identified via the architecture and mitigated
with targeted prototypes.
Architecture is a Reusable Model
• An architecture is an abstraction: enables a
one-to-many mapping (one architecture,
many systems).
• Systems can be built from large, externally
developed components that are tied
together via architecture.
• Architecture is the basis for product
(system) commonality.
• Entire software product lines can share a
single architecture.
Importance of Design
• When dealing with ~100s of packages and ~1000s of classes,
coders lose sight of the forest for the trees.
– Leads to designs that are muddled and inconsistent
• Buggy, requiring constant re-work
• Long learning curve for new developers
• Hard to fix bugs
– Long time to debug, lots of code to fix, introduce new bugs
• Hard to change
– Lots of time to figure out how to change, lots of code to change, introduce
lots of new bugs
• Higher-level design descriptions lead to better designs
– Can grasp the design at its essence and in its entirety
– Can review and correct early
• Can be used to leverage the skills and experience of better
designers across many developers
24
Outline
• Software Architecture and Software Design
• Importance of Software Architecture and
Design
• Documenting Architecture and Design

25
Documenting Architecture and Design
• Architecture
– Informal diagrams
– Written explanations
– Bullet points
• Design
– Formal UML
– Reflects and in-synch with program structure
– Simplify and divide into small chunks for
presentation
– Add written explanations.
26
Documentation of an Architecture
• Golden Rule of Software Development:
– If it’s not reviewable (written down), it doesn’t exist.

• Architectures sometime suffer from over-elaborate


documentation
– Unnecessary. Simply document your decisions.
– Most systems don’t deserve elaborate architectural documentation

• Dealing with unknowns


– Indicate they are unknown for the present
– Cycle back later and add new decisions taken
– But beware of costs of postponing decisions

• Must religiously keep architecture document up-to-date


– Very hard to do in practice: takes effort
– Therefore keep it simple as possible (but no simpler)

27
The Essence of the Architecture Document
• Its very difficult to attempt to describe the
architecture after the system has been built in as
compact a form as possible - how the system has
been put together.
• Be utterly clear
• Professionals may wish to evaluate your choices

28
Documentation of a Design
• UML (Unified Modeling Language)
– Expresses Object Oriented design using diagrammatic notation
– Complete UML for a typical system is very large.
– A selection must be made for presentation
• Choose the most illuminating parts
• Simplify w.r.t. the actual code
• Divide into small sections (< 1 page)
• Add written text to describe the whys and wherefores.
• Danger of UML and code getting out of synch over time
– Automated tools to keep the two in-synch
• E.g., Rational Rose
• Strive to explain (in writing) your choices to another
programmer

29

You might also like