SlideShare a Scribd company logo
Chapter 6 Architectural
design
Chapter 6 – Architectural Design
Lecture 1
1
Architecting and Designing Software
The Process of Design
Finish Process + Software Architecture
Architectural Patterns
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 2
Where are we? Where are we going?
• Know some about Business Modeling, business object models,
and domain modeling
• Know about the UP – its definition = a use-case driven,
architecture-centric, iterative development process…
• Know about gathering and capturing functional user requirements
using Use Cases and the contribution of a user interface prototype
• Know about documenting non-functional requirements and their
essentials
• Know about several of the basic models and views as well as class
diagrams, activity diagrams, use case diagrams, domain modeling, a
little bit about interaction diagrams and more…
• Now it is time to get serious about design.
• We have started with looking more seriously as the User Interface
Design. Now, let’s address the architectural design – likely the
second iteration in the Elaboration Phase – or thereabouts…
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 3
The Process of Design
•Definition:
• Design is a problem-solving process whose objective is to
find and describe a way:
—To implement the system’s functional requirements...
—while respecting the constraints imposed by
non-functional requirements...
- Such as performance, maintainability, security, persistence,
cost, reliability, portability, etc…..(long list)
- including also the budget, technologies, environment, legal
issues, deadlines, ...
—and while adhering to general principles of good quality
• Consider this perspective:
4
Object-Oriented Analysis
•An investigation of the problem (rather than how a
solution is defined)
•During OO analysis, there is an emphasis on
finding and describing the objects (or concepts) in
the problem domain.
• For example, concepts in a Library Information
System include Book, and Library.
5
Object-Oriented Design
•Emphasizes a conceptual solution that fulfills the
requirements.
•Need to define software objects and how they collaborate to
fulfill the requirements.
•For example, in the Library Information System, a Book
software object may have a title attribute and a getChapter
method.
•Designs are implemented in a programming language.
•In the example, we will have a Book class in Java.
•These we refer to as ‘software classes’ or POJC (Plain Old
Java Class)
6
From Design to Implementation
Book
title
print()
public class Book {
public void print();
private String title;
}
Book
(concept)
Analysis
investigation
of the problem
Design
logical solution
Construction
code
Domain concept Representation in
analysis of concepts
Representation in an
object-oriented
programming language.
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 7
Process of Design
•Design is all about decisions.
•Approaches:
• Top down – start with the architecture
• Bottom up – start with utilities
• Are a number of very serious design principles that
lead to maintainable software that may persist for years
• Will look at satisfying functional requirements while
accommodating portability, reuse potential, performance
• There are always TRADEOFFS! There is no free lunch!!!--
• Will look at several of the tradeoffs
• Will look at (and you will develop) a software
architecture to support your high-level design
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 8
Design as a Series of Decisions
•A designer is faced with a series of design issues
• These are sub-problems of the overall design problem.
• Are always several alternative solutions: design options.
• Designer makes design decisions to resolve each issue.
—This process involves choosing the best option from
among the alternatives.
• Recognize that there may be a number of solutions – in
fact, there may be a number of good solutions for the
problem to be solved.
• We would like the ‘best’ one.
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 9
Making decisions
•To make each design decision, the software engineer uses:
• Knowledge of
—the requirements (use cases, UI prototype,
supplementary specification document, class diagrams,
interaction diagrams …)
—the design as created ‘so far’
—Available technologies (RMI, RPC, xml, jsp, servlets,
html, jdbc, etc. etc.) given a development environment
—software design principles and ‘best practices’
—what has worked well in the past
• Sometimes there is no single, best solution.
• Sometimes they conflict – each presenting pros and cons
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 10
‘Design space’ – example Consider choice of thin
client vs fat client options:
•The space of possible designs that could be
achieved by choosing different sets of alternatives is
often called the design space
• For example: (more efficient use of CPU and of network
resources) Why???
(simpler
software)
Advantages of fat client: bandwidth, networking services, reduced need for powerful server…
Advantages of thin client: simpler client devices; maintaining services; central bus logic…
Disadvantages? Know! Cost, reliability, maintenance, security, bandwidth, network
traffic; Never a single answer for all cases! è Design!
client-server
monolithic
separate
user interface
layer for
client
no
separate
user interface
layer for client
fat-client
thin-client
programmmed in Java
programmed in .Net
programmed in C++; C#?
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 11
Criticality of Certain Design Decisions
• Some design decisions are critical; others not so.
• Example: architectural design decision to separate the user
interface module from rest of system.
• Yes: easier to develop and maintain, internationalize, employ
reuse.
• No: Likely not as efficient; (disadvantage. why?)
• Recommend iterating User Interface as a part of iteration
planning!
• As increments of value are produced, so too should the
interface evolve.
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 13
Features of Top-down and Bottom-up design
•Top-down design
• First design the very high level structure of system.
• Then gradually work down to detailed decisions about
low-level constructs.
• Finally arrive at detailed decisions such as:
—the format of particular data items;
—the individual algorithms that will be used.
• Start with the software architecture and the type of
database that will be used (not ‘which’ database).
• Ultimately arrive at specific data items and detailed
algorithms.
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 14
Top-down and Bottom-Up design
•Bottom-up design
• Make decisions about reusable low-level utilities.
• Then decide how these will be put together to create high-
level constructs.
• Mix of top-down and bottom-up approaches normally used:
• Top-down design is almost always needed to give the
system a good structure (architecture).
• Bottom-up design is normally useful so that reusable
components can be created.
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 15
Different aspects of Design – Very important!!
• All kinds of ‘design’ This is where the decisions are made!!!!
• èArchitecture design:
—The division into subsystems and components,
- How these will be connected.
- How they will interact.
- Their interfaces.
• Class design:
—The various features of classes.
• User interface design
• Algorithm design:
—The design of computational mechanisms.
• Protocol design:
—The design of communications protocol.
•For a while, now, we will emphasize Architectural Design – after we discuss
class design.
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 16
Principles Leading to Good Design
•Overall goals of Good Design:
• Increase profit by reducing cost and increasing revenue
• Ensure design accommodates requirements
• Speed up development for use / competing in
marketplace
• Increase qualities such as
—Usability – learnability; ease of use; on-line help…
—Efficiency
—Reliability
—Maintainability
—Reusability to reduce cost and increase revenues
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 17
Design Principle 1: Divide and Conquer
•Trying to deal with something big all at once is normally
much more difficult than dealing with a series of smaller,
manageable, understandable things
•(hence the iterative approach to software development)
• A software engineer/software developer can specialize.
—Specialize in network, distribution, database,
algorithms, searching / sorting techniques…
• Individual components smaller, easier to understand.
• Parts can be replaced or changed without having to
replace or extensively change other parts.
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 18
Ways of dividing a software system
• A distributed system is divided up into clients and servers
• A system is divided up into subsystems
• A subsystem can be divided up into one or more
packages
• A package is divided up into classes
• A class is divided up into methods
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 19
Design Principle 2:
Increase (High) Cohesion where possible
•Divide and Conquer says split things up. Smaller parts,
easier to grasp.
•A subsystem or module has high cohesion if it keeps
together things that are related to each other, and keeps
other things out!
• Makes system as a whole easier to understand / change
• Type of cohesion:
—Functional, Layer, Communicational, Sequential,
Procedural, Temporal, Utility
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 20
Functional Cohesion
• Achieved when all the code that computes a particular result is
kept together - and everything else is kept out
• i.e. when a module only performs a single computation, and returns a result,
without having side-effects.
—No changes to anything but the computation
—Normally implemented via parameters
—Can call other methods, if cohesion is preserved.
- (Recall: Call by Value; Call by Reference… as examples)
- Avoid things like common, global data, more
• Benefits to the system:
—Easier to understand
—More reusable
—Easier to replace
—Example: pass an array of integers; sort the array and return sorted array.
Can change algorithms if interface remains unchanged…
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 21
Layer cohesion
• All facilities for providing or accessing a set of related services are kept together,
and everything else is kept out
• The layers should form a hierarchy
—(Layers – presentation (interface); business (domain) logic; application
logic; technical services…)
—Higher layers can access services of lower layers,
—Lower layers do not access higher layers
• Will talk about architectural layers a great deal very soon…
• The set of procedures through which a layer provides its services is the
application programming interface (API)
• Specification of API says how to use it.
• è You can replace a layer without having any impact on the other layers
because you know that it does not access upper layers.
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 22
Example of the use of layers
Screen display
facilities
User account
management
File
system
Kernel
(handling processes
and swapping)
Application programs
User
interface
Application
logic
Database
access
Network
communication
Transmitting
and receiving
Dealing with
packets
Dealing with
connections
Dealing with
application protocols
a) Typical layers in an
application program
b) Typical layers in an
operating system
c) Simplified view of layers
in a communication system
Operating system
access
Examples: services for computations; transmissions of messages; storage of data; managing security,
interacting with users; accessing the operating system; interacting with hardware, and more
Sometimes we have a business services
and then a domain (more general) layer
Will have a middleware layer often!
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 23
Communicational cohesion
•All the modules that access or “manipulate certain data”
are kept together (e.g. in the same class) - and everything
else is kept out
• A class would have good communicational cohesion
—if all the system’s facilities for storing and
manipulating its data are contained in this class.
—if the class does not do anything other than manage
its data.
• Main advantage: When you need to make changes to
the data, you find all the code in one place
• Keeps methods where the data is, if possible.
• Talk about this extensively in Data Structures course!!
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 24
Other measures of Cohesion
• Sequential Cohesion
•Procedures, in which one procedure provides input to the next, are kept together – and
everything else is kept out
•You should achieve sequential cohesion, only once you have already achieved the preceding
types of cohesion.
•Procedural Cohesion
•Keep together several procedures that are used one after another
•Even if one does not necessarily provide input to the next. Weaker than sequential.
•Temporal Cohesion
•Operations that are performed during the same phase of the execution of the program are kept
together, and everything else is kept out
•For example, placing together the code used during system start-up or initialization.
•Weaker than procedural cohesion.
•Utility Cohesion
•When related utilities which cannot be logically placed in other cohesive units are kept together
•A utility is a procedure or class that has wide applicability to many different subsystems and
is designed to be reusable.
•For example, the java.lang.Math class. ç
•
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 25
Design Principle 3:
Reduce (Low) Coupling where possible
•Coupling occurs when there are interdependencies
between one module and another
• When interdependencies exist, changes in one place
will require changes somewhere else.
• A network of interdependencies makes it difficult to
see at a glance how some component works.
• Type of coupling: (in decreasing order of avoidance!)
—Content, Common, Control, Stamp, Data, Routine
Call, Type use, Inclusion/Import, External
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 26
Content Coupling: The Worst of the Bad!
•Occurs when one component surreptitiously modifies data (or
instructions!) that is/are internal to another component
•To reduce content coupling you should therefore encapsulate
all instance variables
—declare them private
—and provide get and set methods
•A worse form of content coupling occurs when you directly
modify an instance variable from outside the object.
•Discuss: how easy it is to do this and how/why it has been
done in the past! (especially in non-object-oriented systems)
—Assembler; ‘Alter’ verb in Cobol
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 27
Common Coupling – also Avoid where possible
and practical!!!
•Occurs whenever you use a global variable
•All the components using global variables
become coupled to each other
•Can be acceptable for creating global variables
that represent system-wide default values
•Clearly, when a value is changed, it may be very
difficult to trace the source of the change!
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 28
Control Coupling – not as bad, but still is pretty
strong coupling! Avoid if you are able to.
•Occurs when one procedure calls another using a ‘flag’
or ‘command’ that explicitly controls what the second
procedure does (passing a switch….)
• To make a change you have to change both the calling
and called method; that is, to avoid the flags…
• The use of polymorphic operations is normally the best
way to avoid control coupling
• One way to reduce the control coupling could be to
have a look-up table
—commands are then mapped to a method that
should be called when that command is issued
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 29
Example of control coupling
public routineX(String command)
{
if (command.equals("drawCircle")
{
drawCircle();
}
else
{
drawRectangle();
}
}
See? Flag is passed (command) whose value
is used to control flow!
Can be handled better through polymorphism…
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 30
Other Forms of Coupling:
• Stamp Coupling
• Data Coupling
• Routine-call Coupling
• Type Use Coupling
• Inclusion or import Coupling
• External Coupling
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 31
Design Principle 4:
Keep level of Abstraction as high as possible
•Ensure that your designs allow you to hide or defer
consideration of details, thus reducing complexity
• A good abstraction is said to provide information hiding
• Abstractions allow you to understand the essence of a
subsystem without having to know unnecessary details
• Allows us to grasp the essential!
—Defer the less important grunt-level items until later
• Allows us to deal with complexity!
• You will be doing this when you create your
subsystems and when they are contained in layers, etc.
Remaining Slides
on your own
Chapter 6 Architectural
design
Architectural Abstraction
 Architecture in the small is concerned with the architecture of
individual programs.
 At this level, we are concerned with the way that an individual
program is decomposed into components.
 Structure charts; UML diagrams showing
 organization…
 Architecture in the large is concerned with the architecture of
complex enterprise systems that include other systems,
programs, and program components. These enterprise
systems are distributed over different computers, which may
be owned and managed by different companies.
36
Chapter 6 Architectural
design
Architectural Representations
 ==> Simple, informal block diagrams showing entities
and relationships are the most frequently used method
for documenting software architectures.
 But these have been criticized because they lack
semantics, do not show the types of relationships
between entities nor the visible properties of entities in
the architecture.
 Depends on the use of architectural models.The
requirements for model semantics depends on how the
models are used.
37
Chapter 6 Architectural
design
Architectural Design Decisions
 Is there a generic application architecture that can be
used?
 How will the system be distributed?
 What architectural styles are appropriate?
 What approach will be used to structure the system?
 How will the system be decomposed into modules?
 What control strategy should be used?
 How will the architectural design be evaluated?
 How should the architecture be documented?
40
Chapter 6 Architectural
design
Architecture Reuse
 Systems in the same domain often have similar
architectures that reflect domain concepts.
 Application product lines are built around a core architecture
with variants that satisfy particular customer requirements.
 The architecture of a system may be designed around one
of more architectural patterns or ‘styles’.
These capture the essence of an architecture and can be instantiated
in different ways.
Discussed later in this lecture.
41
Chapter 6 Architectural
design
Architectural Views
 What views or perspectives are useful when designing
and documenting a system’s architecture?
 What notations should be used for describing
architectural models?
 Each architectural model only shows one view or
perspective of the system.
It might show how a system is decomposed into modules, how the
run-time processes interact or the different ways in which system
components are distributed across a network. For both design
and documentation, you usually need to present multiple views of
the software architecture.
43
Chapter 6 Architectural
design
4 + 1 view model of software architecture
 A logical view, which shows the key abstractions in the
system as objects or object classes.
 A process view, which shows how, at run-time, the
system is composed of interacting processes.
 A development view, which shows how the software is
decomposed for development.
 A physical view, which shows the system hardware and
how software components are distributed across the
processors in the system.
 Related using use cases or scenarios (+1)
44
Representing Architecture: The 4+1 View Model
Process
View
Deployment
View
Logical
View
Implementation
View
Programmers
Software management
Performance
Scalability, Concurrency,
Throughput, Parallelism…
System Integrators
System topology
Delivery, installation
Communication
System Engineering
Use-Case
View
Structure
Analysts/
Designers End-user
Functionality
A View is a complete description (an abstraction) of a system from a particular view-
point or perspective – covering particular concerns and omitting others not
relevant to this perspective.
Different ‘views’ from different ‘stakeholders; different concerns.
A Model is a complete representation.
Functional requirements
Logical View
Functional
Requirements –
Deals with design,
packages, sub-
systems, and
classes, layers, …
Implementation
View – deals mostly
with programming
and organization of
the static software
modules & unit test

More Related Content

Similar to Chap 6 - Software Architecture Part 1.ppt

1605162990-week56.pptx
1605162990-week56.pptx1605162990-week56.pptx
1605162990-week56.pptx
SumbalIlyas1
 
The Role of the Architect
The Role of the ArchitectThe Role of the Architect
The Role of the Architect
Jonathan Holloway
 
Week 6
Week 6Week 6
Software Architecture and Architectors: useless VS valuable
Software Architecture and Architectors: useless VS valuableSoftware Architecture and Architectors: useless VS valuable
Software Architecture and Architectors: useless VS valuable
Comsysto Reply GmbH
 
Deep Dive into the Idea of Software Architecture
Deep Dive into the Idea of Software ArchitectureDeep Dive into the Idea of Software Architecture
Deep Dive into the Idea of Software Architecture
Matthew Clarke
 
Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and Consistently
Comsysto Reply GmbH
 
Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and Consistently
Comsysto Reply GmbH
 
CHAPTER12.ppt
CHAPTER12.pptCHAPTER12.ppt
CHAPTER12.ppt
CharenReposposa
 
Slides for Chapter 1: Software and Software Engineering;
Slides for Chapter 1: Software and Software Engineering;Slides for Chapter 1: Software and Software Engineering;
Slides for Chapter 1: Software and Software Engineering;
l211772
 
Object-Oriented Analysis and Design
Object-Oriented Analysis and DesignObject-Oriented Analysis and Design
Object-Oriented Analysis and Design
RiazAhmad786
 
Introduction To Agile Refresh Savannah July20 2010 V1 4
Introduction To Agile Refresh Savannah July20 2010 V1 4Introduction To Agile Refresh Savannah July20 2010 V1 4
Introduction To Agile Refresh Savannah July20 2010 V1 4
Marvin Heery
 
Software Project management
Software Project managementSoftware Project management
Software Project management
sameer farooq
 
Solutions Architect's Handbook 2nd Edition - Book Review
Solutions Architect's Handbook 2nd Edition - Book ReviewSolutions Architect's Handbook 2nd Edition - Book Review
Solutions Architect's Handbook 2nd Edition - Book Review
Ashraf Fouad
 
OOSAD Chapter 6 Object Oriented Design.pptx
OOSAD Chapter 6 Object Oriented Design.pptxOOSAD Chapter 6 Object Oriented Design.pptx
OOSAD Chapter 6 Object Oriented Design.pptx
BereketMuniye
 
Lecture 1 - Requirement Engineering.pptx
Lecture 1 - Requirement Engineering.pptxLecture 1 - Requirement Engineering.pptx
Lecture 1 - Requirement Engineering.pptx
AbdulRaheem254960
 
Component based development | what, why and how
Component based development | what, why and howComponent based development | what, why and how
Component based development | what, why and how
Rakesh Kumar Jha
 
Software engineering.pptx
Software engineering.pptxSoftware engineering.pptx
Software engineering.pptx
JAGADEESWARIS6
 
L14_DesignGoalsSubsystemDecompositionc_ch06lect1.ppt
L14_DesignGoalsSubsystemDecompositionc_ch06lect1.pptL14_DesignGoalsSubsystemDecompositionc_ch06lect1.ppt
L14_DesignGoalsSubsystemDecompositionc_ch06lect1.ppt
AronBalais1
 
L14_DesignGoalsSubsystemDecompositionc_ch06lect1.ppt
L14_DesignGoalsSubsystemDecompositionc_ch06lect1.pptL14_DesignGoalsSubsystemDecompositionc_ch06lect1.ppt
L14_DesignGoalsSubsystemDecompositionc_ch06lect1.ppt
AxmedMaxamuud6
 
5 software design
5 software design5 software design
5 software design
cherrybear2014
 

Similar to Chap 6 - Software Architecture Part 1.ppt (20)

1605162990-week56.pptx
1605162990-week56.pptx1605162990-week56.pptx
1605162990-week56.pptx
 
The Role of the Architect
The Role of the ArchitectThe Role of the Architect
The Role of the Architect
 
Week 6
Week 6Week 6
Week 6
 
Software Architecture and Architectors: useless VS valuable
Software Architecture and Architectors: useless VS valuableSoftware Architecture and Architectors: useless VS valuable
Software Architecture and Architectors: useless VS valuable
 
Deep Dive into the Idea of Software Architecture
Deep Dive into the Idea of Software ArchitectureDeep Dive into the Idea of Software Architecture
Deep Dive into the Idea of Software Architecture
 
Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and Consistently
 
Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and Consistently
 
CHAPTER12.ppt
CHAPTER12.pptCHAPTER12.ppt
CHAPTER12.ppt
 
Slides for Chapter 1: Software and Software Engineering;
Slides for Chapter 1: Software and Software Engineering;Slides for Chapter 1: Software and Software Engineering;
Slides for Chapter 1: Software and Software Engineering;
 
Object-Oriented Analysis and Design
Object-Oriented Analysis and DesignObject-Oriented Analysis and Design
Object-Oriented Analysis and Design
 
Introduction To Agile Refresh Savannah July20 2010 V1 4
Introduction To Agile Refresh Savannah July20 2010 V1 4Introduction To Agile Refresh Savannah July20 2010 V1 4
Introduction To Agile Refresh Savannah July20 2010 V1 4
 
Software Project management
Software Project managementSoftware Project management
Software Project management
 
Solutions Architect's Handbook 2nd Edition - Book Review
Solutions Architect's Handbook 2nd Edition - Book ReviewSolutions Architect's Handbook 2nd Edition - Book Review
Solutions Architect's Handbook 2nd Edition - Book Review
 
OOSAD Chapter 6 Object Oriented Design.pptx
OOSAD Chapter 6 Object Oriented Design.pptxOOSAD Chapter 6 Object Oriented Design.pptx
OOSAD Chapter 6 Object Oriented Design.pptx
 
Lecture 1 - Requirement Engineering.pptx
Lecture 1 - Requirement Engineering.pptxLecture 1 - Requirement Engineering.pptx
Lecture 1 - Requirement Engineering.pptx
 
Component based development | what, why and how
Component based development | what, why and howComponent based development | what, why and how
Component based development | what, why and how
 
Software engineering.pptx
Software engineering.pptxSoftware engineering.pptx
Software engineering.pptx
 
L14_DesignGoalsSubsystemDecompositionc_ch06lect1.ppt
L14_DesignGoalsSubsystemDecompositionc_ch06lect1.pptL14_DesignGoalsSubsystemDecompositionc_ch06lect1.ppt
L14_DesignGoalsSubsystemDecompositionc_ch06lect1.ppt
 
L14_DesignGoalsSubsystemDecompositionc_ch06lect1.ppt
L14_DesignGoalsSubsystemDecompositionc_ch06lect1.pptL14_DesignGoalsSubsystemDecompositionc_ch06lect1.ppt
L14_DesignGoalsSubsystemDecompositionc_ch06lect1.ppt
 
5 software design
5 software design5 software design
5 software design
 

Recently uploaded

Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
What is Master Data Management by PiLog Group
What is Master Data Management by PiLog GroupWhat is Master Data Management by PiLog Group
What is Master Data Management by PiLog Group
aymanquadri279
 
Odoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
Odoo ERP Vs. Traditional ERP Systems – A Comparative AnalysisOdoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
Odoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
Envertis Software Solutions
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
VALiNTRY360
 

Recently uploaded (20)

Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
What is Master Data Management by PiLog Group
What is Master Data Management by PiLog GroupWhat is Master Data Management by PiLog Group
What is Master Data Management by PiLog Group
 
Odoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
Odoo ERP Vs. Traditional ERP Systems – A Comparative AnalysisOdoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
Odoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
 

Chap 6 - Software Architecture Part 1.ppt

  • 1. Chapter 6 Architectural design Chapter 6 – Architectural Design Lecture 1 1
  • 2. Architecting and Designing Software The Process of Design Finish Process + Software Architecture Architectural Patterns
  • 3. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 2 Where are we? Where are we going? • Know some about Business Modeling, business object models, and domain modeling • Know about the UP – its definition = a use-case driven, architecture-centric, iterative development process… • Know about gathering and capturing functional user requirements using Use Cases and the contribution of a user interface prototype • Know about documenting non-functional requirements and their essentials • Know about several of the basic models and views as well as class diagrams, activity diagrams, use case diagrams, domain modeling, a little bit about interaction diagrams and more… • Now it is time to get serious about design. • We have started with looking more seriously as the User Interface Design. Now, let’s address the architectural design – likely the second iteration in the Elaboration Phase – or thereabouts…
  • 4. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 3 The Process of Design •Definition: • Design is a problem-solving process whose objective is to find and describe a way: —To implement the system’s functional requirements... —while respecting the constraints imposed by non-functional requirements... - Such as performance, maintainability, security, persistence, cost, reliability, portability, etc…..(long list) - including also the budget, technologies, environment, legal issues, deadlines, ... —and while adhering to general principles of good quality • Consider this perspective:
  • 5. 4 Object-Oriented Analysis •An investigation of the problem (rather than how a solution is defined) •During OO analysis, there is an emphasis on finding and describing the objects (or concepts) in the problem domain. • For example, concepts in a Library Information System include Book, and Library.
  • 6. 5 Object-Oriented Design •Emphasizes a conceptual solution that fulfills the requirements. •Need to define software objects and how they collaborate to fulfill the requirements. •For example, in the Library Information System, a Book software object may have a title attribute and a getChapter method. •Designs are implemented in a programming language. •In the example, we will have a Book class in Java. •These we refer to as ‘software classes’ or POJC (Plain Old Java Class)
  • 7. 6 From Design to Implementation Book title print() public class Book { public void print(); private String title; } Book (concept) Analysis investigation of the problem Design logical solution Construction code Domain concept Representation in analysis of concepts Representation in an object-oriented programming language.
  • 8. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 7 Process of Design •Design is all about decisions. •Approaches: • Top down – start with the architecture • Bottom up – start with utilities • Are a number of very serious design principles that lead to maintainable software that may persist for years • Will look at satisfying functional requirements while accommodating portability, reuse potential, performance • There are always TRADEOFFS! There is no free lunch!!!-- • Will look at several of the tradeoffs • Will look at (and you will develop) a software architecture to support your high-level design
  • 9. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 8 Design as a Series of Decisions •A designer is faced with a series of design issues • These are sub-problems of the overall design problem. • Are always several alternative solutions: design options. • Designer makes design decisions to resolve each issue. —This process involves choosing the best option from among the alternatives. • Recognize that there may be a number of solutions – in fact, there may be a number of good solutions for the problem to be solved. • We would like the ‘best’ one.
  • 10. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 9 Making decisions •To make each design decision, the software engineer uses: • Knowledge of —the requirements (use cases, UI prototype, supplementary specification document, class diagrams, interaction diagrams …) —the design as created ‘so far’ —Available technologies (RMI, RPC, xml, jsp, servlets, html, jdbc, etc. etc.) given a development environment —software design principles and ‘best practices’ —what has worked well in the past • Sometimes there is no single, best solution. • Sometimes they conflict – each presenting pros and cons
  • 11. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 10 ‘Design space’ – example Consider choice of thin client vs fat client options: •The space of possible designs that could be achieved by choosing different sets of alternatives is often called the design space • For example: (more efficient use of CPU and of network resources) Why??? (simpler software) Advantages of fat client: bandwidth, networking services, reduced need for powerful server… Advantages of thin client: simpler client devices; maintaining services; central bus logic… Disadvantages? Know! Cost, reliability, maintenance, security, bandwidth, network traffic; Never a single answer for all cases! è Design! client-server monolithic separate user interface layer for client no separate user interface layer for client fat-client thin-client programmmed in Java programmed in .Net programmed in C++; C#?
  • 12. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 11 Criticality of Certain Design Decisions • Some design decisions are critical; others not so. • Example: architectural design decision to separate the user interface module from rest of system. • Yes: easier to develop and maintain, internationalize, employ reuse. • No: Likely not as efficient; (disadvantage. why?) • Recommend iterating User Interface as a part of iteration planning! • As increments of value are produced, so too should the interface evolve.
  • 13. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 13 Features of Top-down and Bottom-up design •Top-down design • First design the very high level structure of system. • Then gradually work down to detailed decisions about low-level constructs. • Finally arrive at detailed decisions such as: —the format of particular data items; —the individual algorithms that will be used. • Start with the software architecture and the type of database that will be used (not ‘which’ database). • Ultimately arrive at specific data items and detailed algorithms.
  • 14. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 14 Top-down and Bottom-Up design •Bottom-up design • Make decisions about reusable low-level utilities. • Then decide how these will be put together to create high- level constructs. • Mix of top-down and bottom-up approaches normally used: • Top-down design is almost always needed to give the system a good structure (architecture). • Bottom-up design is normally useful so that reusable components can be created.
  • 15. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 15 Different aspects of Design – Very important!! • All kinds of ‘design’ This is where the decisions are made!!!! • èArchitecture design: —The division into subsystems and components, - How these will be connected. - How they will interact. - Their interfaces. • Class design: —The various features of classes. • User interface design • Algorithm design: —The design of computational mechanisms. • Protocol design: —The design of communications protocol. •For a while, now, we will emphasize Architectural Design – after we discuss class design.
  • 16. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 16 Principles Leading to Good Design •Overall goals of Good Design: • Increase profit by reducing cost and increasing revenue • Ensure design accommodates requirements • Speed up development for use / competing in marketplace • Increase qualities such as —Usability – learnability; ease of use; on-line help… —Efficiency —Reliability —Maintainability —Reusability to reduce cost and increase revenues
  • 17. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 17 Design Principle 1: Divide and Conquer •Trying to deal with something big all at once is normally much more difficult than dealing with a series of smaller, manageable, understandable things •(hence the iterative approach to software development) • A software engineer/software developer can specialize. —Specialize in network, distribution, database, algorithms, searching / sorting techniques… • Individual components smaller, easier to understand. • Parts can be replaced or changed without having to replace or extensively change other parts.
  • 18. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 18 Ways of dividing a software system • A distributed system is divided up into clients and servers • A system is divided up into subsystems • A subsystem can be divided up into one or more packages • A package is divided up into classes • A class is divided up into methods
  • 19. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 19 Design Principle 2: Increase (High) Cohesion where possible •Divide and Conquer says split things up. Smaller parts, easier to grasp. •A subsystem or module has high cohesion if it keeps together things that are related to each other, and keeps other things out! • Makes system as a whole easier to understand / change • Type of cohesion: —Functional, Layer, Communicational, Sequential, Procedural, Temporal, Utility
  • 20. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 20 Functional Cohesion • Achieved when all the code that computes a particular result is kept together - and everything else is kept out • i.e. when a module only performs a single computation, and returns a result, without having side-effects. —No changes to anything but the computation —Normally implemented via parameters —Can call other methods, if cohesion is preserved. - (Recall: Call by Value; Call by Reference… as examples) - Avoid things like common, global data, more • Benefits to the system: —Easier to understand —More reusable —Easier to replace —Example: pass an array of integers; sort the array and return sorted array. Can change algorithms if interface remains unchanged…
  • 21. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 21 Layer cohesion • All facilities for providing or accessing a set of related services are kept together, and everything else is kept out • The layers should form a hierarchy —(Layers – presentation (interface); business (domain) logic; application logic; technical services…) —Higher layers can access services of lower layers, —Lower layers do not access higher layers • Will talk about architectural layers a great deal very soon… • The set of procedures through which a layer provides its services is the application programming interface (API) • Specification of API says how to use it. • è You can replace a layer without having any impact on the other layers because you know that it does not access upper layers.
  • 22. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 22 Example of the use of layers Screen display facilities User account management File system Kernel (handling processes and swapping) Application programs User interface Application logic Database access Network communication Transmitting and receiving Dealing with packets Dealing with connections Dealing with application protocols a) Typical layers in an application program b) Typical layers in an operating system c) Simplified view of layers in a communication system Operating system access Examples: services for computations; transmissions of messages; storage of data; managing security, interacting with users; accessing the operating system; interacting with hardware, and more Sometimes we have a business services and then a domain (more general) layer Will have a middleware layer often!
  • 23. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 23 Communicational cohesion •All the modules that access or “manipulate certain data” are kept together (e.g. in the same class) - and everything else is kept out • A class would have good communicational cohesion —if all the system’s facilities for storing and manipulating its data are contained in this class. —if the class does not do anything other than manage its data. • Main advantage: When you need to make changes to the data, you find all the code in one place • Keeps methods where the data is, if possible. • Talk about this extensively in Data Structures course!!
  • 24. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 24 Other measures of Cohesion • Sequential Cohesion •Procedures, in which one procedure provides input to the next, are kept together – and everything else is kept out •You should achieve sequential cohesion, only once you have already achieved the preceding types of cohesion. •Procedural Cohesion •Keep together several procedures that are used one after another •Even if one does not necessarily provide input to the next. Weaker than sequential. •Temporal Cohesion •Operations that are performed during the same phase of the execution of the program are kept together, and everything else is kept out •For example, placing together the code used during system start-up or initialization. •Weaker than procedural cohesion. •Utility Cohesion •When related utilities which cannot be logically placed in other cohesive units are kept together •A utility is a procedure or class that has wide applicability to many different subsystems and is designed to be reusable. •For example, the java.lang.Math class. ç •
  • 25. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 25 Design Principle 3: Reduce (Low) Coupling where possible •Coupling occurs when there are interdependencies between one module and another • When interdependencies exist, changes in one place will require changes somewhere else. • A network of interdependencies makes it difficult to see at a glance how some component works. • Type of coupling: (in decreasing order of avoidance!) —Content, Common, Control, Stamp, Data, Routine Call, Type use, Inclusion/Import, External
  • 26. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 26 Content Coupling: The Worst of the Bad! •Occurs when one component surreptitiously modifies data (or instructions!) that is/are internal to another component •To reduce content coupling you should therefore encapsulate all instance variables —declare them private —and provide get and set methods •A worse form of content coupling occurs when you directly modify an instance variable from outside the object. •Discuss: how easy it is to do this and how/why it has been done in the past! (especially in non-object-oriented systems) —Assembler; ‘Alter’ verb in Cobol
  • 27. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 27 Common Coupling – also Avoid where possible and practical!!! •Occurs whenever you use a global variable •All the components using global variables become coupled to each other •Can be acceptable for creating global variables that represent system-wide default values •Clearly, when a value is changed, it may be very difficult to trace the source of the change!
  • 28. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 28 Control Coupling – not as bad, but still is pretty strong coupling! Avoid if you are able to. •Occurs when one procedure calls another using a ‘flag’ or ‘command’ that explicitly controls what the second procedure does (passing a switch….) • To make a change you have to change both the calling and called method; that is, to avoid the flags… • The use of polymorphic operations is normally the best way to avoid control coupling • One way to reduce the control coupling could be to have a look-up table —commands are then mapped to a method that should be called when that command is issued
  • 29. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 29 Example of control coupling public routineX(String command) { if (command.equals("drawCircle") { drawCircle(); } else { drawRectangle(); } } See? Flag is passed (command) whose value is used to control flow! Can be handled better through polymorphism…
  • 30. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 30 Other Forms of Coupling: • Stamp Coupling • Data Coupling • Routine-call Coupling • Type Use Coupling • Inclusion or import Coupling • External Coupling
  • 31. © Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software 31 Design Principle 4: Keep level of Abstraction as high as possible •Ensure that your designs allow you to hide or defer consideration of details, thus reducing complexity • A good abstraction is said to provide information hiding • Abstractions allow you to understand the essence of a subsystem without having to know unnecessary details • Allows us to grasp the essential! —Defer the less important grunt-level items until later • Allows us to deal with complexity! • You will be doing this when you create your subsystems and when they are contained in layers, etc.
  • 33. Chapter 6 Architectural design Architectural Abstraction  Architecture in the small is concerned with the architecture of individual programs.  At this level, we are concerned with the way that an individual program is decomposed into components.  Structure charts; UML diagrams showing  organization…  Architecture in the large is concerned with the architecture of complex enterprise systems that include other systems, programs, and program components. These enterprise systems are distributed over different computers, which may be owned and managed by different companies. 36
  • 34. Chapter 6 Architectural design Architectural Representations  ==> Simple, informal block diagrams showing entities and relationships are the most frequently used method for documenting software architectures.  But these have been criticized because they lack semantics, do not show the types of relationships between entities nor the visible properties of entities in the architecture.  Depends on the use of architectural models.The requirements for model semantics depends on how the models are used. 37
  • 35. Chapter 6 Architectural design Architectural Design Decisions  Is there a generic application architecture that can be used?  How will the system be distributed?  What architectural styles are appropriate?  What approach will be used to structure the system?  How will the system be decomposed into modules?  What control strategy should be used?  How will the architectural design be evaluated?  How should the architecture be documented? 40
  • 36. Chapter 6 Architectural design Architecture Reuse  Systems in the same domain often have similar architectures that reflect domain concepts.  Application product lines are built around a core architecture with variants that satisfy particular customer requirements.  The architecture of a system may be designed around one of more architectural patterns or ‘styles’. These capture the essence of an architecture and can be instantiated in different ways. Discussed later in this lecture. 41
  • 37. Chapter 6 Architectural design Architectural Views  What views or perspectives are useful when designing and documenting a system’s architecture?  What notations should be used for describing architectural models?  Each architectural model only shows one view or perspective of the system. It might show how a system is decomposed into modules, how the run-time processes interact or the different ways in which system components are distributed across a network. For both design and documentation, you usually need to present multiple views of the software architecture. 43
  • 38. Chapter 6 Architectural design 4 + 1 view model of software architecture  A logical view, which shows the key abstractions in the system as objects or object classes.  A process view, which shows how, at run-time, the system is composed of interacting processes.  A development view, which shows how the software is decomposed for development.  A physical view, which shows the system hardware and how software components are distributed across the processors in the system.  Related using use cases or scenarios (+1) 44
  • 39. Representing Architecture: The 4+1 View Model Process View Deployment View Logical View Implementation View Programmers Software management Performance Scalability, Concurrency, Throughput, Parallelism… System Integrators System topology Delivery, installation Communication System Engineering Use-Case View Structure Analysts/ Designers End-user Functionality A View is a complete description (an abstraction) of a system from a particular view- point or perspective – covering particular concerns and omitting others not relevant to this perspective. Different ‘views’ from different ‘stakeholders; different concerns. A Model is a complete representation. Functional requirements Logical View Functional Requirements – Deals with design, packages, sub- systems, and classes, layers, … Implementation View – deals mostly with programming and organization of the static software modules & unit test