Professional Documents
Culture Documents
CHGCJHCRT 1
CHGCJHCRT 1
Lecture 1
Chapter 6 Architectural
1
design
Architecting and Designing Software
•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 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.
•Bottom-up design
• Make decisions about reusable low-level utilities.
• Then decide how these will be put together to create high-
level constructs.
• 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
• 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.
User account
User management Dealing with
interface connections
File
Application system Dealing with
logic packets
Kernel
Operating system Database Network (handling processes Transmitting
access access communication and swapping) and receiving
Examples: services for computations; transmissions of messages; storage of data; managing security,
interacting with users; accessing the operating system; interacting with hardware, and more
• 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. ç
•
• Stamp Coupling
• Data Coupling
• Routine-call Coupling
• Type Use Coupling
• Inclusion or import Coupling
• External Coupling
Chapter 6 Architectural
36
design
Architectural Representations
Chapter 6 Architectural
37
design
Architectural Design Decisions
Chapter 6 Architectural
40
design
Architecture Reuse
Chapter 6 Architectural
41
design
Architectural Views
Chapter 6 Architectural
43
design
4 + 1 view model of software architecture
Chapter 6 Architectural
44
design
Representing Architecture: The 4+1 View Model
Logical View
Functional Logical Implementation
Requirements –
View View
Deals with design, Functional requirements
packages, sub- Analysts/
systems, and Designers End-user Programmers
classes, layers, … Structure Functionality Software management
Use-Case
Implementation
View
View – deals mostly Process
with programming
Deployment
and organization of View View
System Integrators System Engineering
the static software
Performance System topology
modules & unit test
Scalability, Concurrency, Delivery, installation
Throughput, Parallelism… Communication