6635d2d618e87d35cf80a810 Slide3 SystemDesign
6635d2d618e87d35cf80a810 Slide3 SystemDesign
Software Design
Guides
Agenda
• General Introduction
• Analysis Modeling
• Software Architecture
2 / 24
General Introduction
3 / 24
4 / 24
Intro: Incremental Development Model
5 / 24
Intro: General Model of Design Process
6 / 24
OO Concepts: Objects & Classes 1/2
7 / 24
OO Concepts: Objects & Classes 2/2
• An object groups both data & procedures that operate on the data
o The procedures are usually called operations or methods.
o Some approaches, including the UML notation, refer to the operation as the specification of a
function performed by an object and the method as the implementation of the function
• An attribute is a data value held by an object in a class (account number, balance,…).
Each object has a specific value of an attribute.
• An operation is the specification of a function performed by an object
o An object has one or more operations.
o The operations manipulate the values of the attributes maintained by the object.
o Operations may have input and output parameters.
o All objects in the same class have the same operations.
8 / 24
OO Concepts: Information Hiding 1/2
Information hiding is used in designing the object: decide what information should be visible,
what should be hidden
• Hidden parts of an object need not be visible to other objects
• If the internals of the object change -> affect this object only
Encapsulation: the potential change to the hidden information that could potentially change is
encapsulated inside an object
• Other objects may only indirectly access the encapsulated data structure by calling the operations
of the object.
• The specification of the operations (i.e., the name and the params of the operations) is called the
interface of the object.
If the data structure changes, the only object affected is the one containing the data structure,
not the calling object. This form of information hiding is called data abstraction.
9 / 24
OO Concepts: Information Hiding 2/2
Stack class with a set of operations is defined to manipulate the data structure
(array or linked list)
10 / 24
Intro: Object Oriented Methods 1/2
11 / 24
Intro: Object Oriented Methods 2/2
Modern object-oriented analysis and design methods are model-based and use a
combination of use case modeling, static modeling, state machine modeling, and
object interaction modeling.
• In use case modeling, the functional requirements of the system are defined in
terms of use cases and actors.
• Static modeling provides a structural view of the system. Classes are defined in
terms of their attributes, as well as their relationships with other classes.
• Dynamic modeling provides a behavioral view of the system. The use cases are
realized to show the interaction among participating objects. Object interaction
diagrams are developed to show how objects communicate with each other to
realize the use case. The state-dependent aspects of the system are defined with
state charts
12 / 24
Agenda
• General Introduction
• Analysis Modeling
• Context Modelling
• Software Architecture • Static Modelling of Entity Classes
• Object & Class Structuring Categories
• Object Oriented Design • Dynamic Modelling: Comm Diagrams
13 / 24
Analysis Modeling: Context Modelling 1/5
System Context Diagram: A diagram that explicitly shows the border between
the system (hardware and software), which is treated as a black box, and the
external environment
14 / 24
Analysis Modeling: Context Modelling 2/5
Software System Context Diagram: shows the border between the software
system, also treated as a black box, & the external environment (which now
includes the hardware)
System Context
Diagram
15 / 24
Analysis Modeling: Context Modelling 3/5
16 / 24
Analysis Modeling: Context Modelling 4/5
18 / 24
Analysis Modeling: Static Modeling of Entity Classes 1/3
19 / 24
Analysis Modeling: Static Modeling of Entity Classes 2/3
Entity class
model for
online
shopping
system
20 / 24
Analysis Modeling: Static Modeling of Entity Classes 3/3
21 / 24
Analysis Modeling: Object & Class Structuring Categories 1/3
22 / 24
23 / 24
Analysis Modeling: Object & Class Structuring Categories 2/3
24 / 24
Analysis Modeling: Object & Class Structuring Categories 3/3
Application logic object. Software object that contains the details of the application
logic. Needed when it is desirable to hide the application logic separately from the data
being manipulated because it is considered likely that the application logic could
change independently of the data.
• For information systems: usually business logic objects
• For real-time, scientific, or engineering applications: usually algorithm objects.
• For service-oriented architectures and applications: service objects, which provide
services for client objects
25 / 24
Analysis Modeling: Dynamic Modeling – Communication Diagrams
Communication diagrams show the layout of the objects, particularly how the objects
are connected to each other (object interaction & sequence of messages passed among
objects). The interaction sequence among the objects needs to reflect the interaction
sequence between the actor and the system, as described in the UC.
• The UC description (step 1) indicates that the customer requests to create an order
=> M1, M2
• In step 2 of the UC, the system retrieves the account information => M3, M4
• In step 3 of the UC, the system checks the customer’s credit card => M5, M6
• In step 4 of the UC, the system creates a delivery order => M7, M8
• Next in the UC, the system confirms the order to the user (M9, M10) and sends a
confirmation email via the email service (M9a)
26 / 24
27 / 24
Agenda
• General Introduction
• Analysis Modeling
• Software Architecture
• MVC Pattern
• Object Oriented Design • Layered Architecture
• Client-Server Architecture
• Package Diagrams
28 / 24
Software Architecture
The design process for identifying the sub-systems making up a system and the
framework for sub-system control and communication is architectural design.
Architectural Design
• An early stage of the system design process.
• Represents the link between specification and design processes.
• Often carried out in parallel with some specification activities.
• It involves identifying major system components and their communications.
29 / 24
Software Architecture: Architectural Design Decisions
30 / 24
Software Architecture: The MVC Pattern 1/3
Name MVC (Model-View-Controller)
Description Separates presentation and interaction from the system data. The system is structured into three
logical components that interact with each other.
• The Model component manages the system data and associated operations on that data.
• The View component defines and manages how the data is presented to the user.
• The Controller component manages user interaction (e.g., key presses, mouse clicks, etc.)
and passes these interactions to the View and the Model.
Example Figure in the next slide shows the architecture of a web-based application system organized
using the MVC pattern.
When used Used when there are multiple ways to view and interact with data. Also used when the future
requirements for interaction and presentation of data are unknown.
Advantages Allows the data to change independently of its representation and vice versa. Supports
presentation of the same data in different ways with changes made in one representation shown
in all of them.
Disadvantages Can involve additional code and code complexity when the data model and interactions are
simple.
31 / 24
Software Architecture: The MVC Pattern 2/3
32 / 24
Software Architecture: The MVC Pattern 3/3
33 / 24
Software Architecture: The Layered Architecture 1/3
34 / 24
Software Architecture: The Layered Architecture 2/3
Example A layered model of a system for a web system (an online shop, a management system, etc.)
Used when building new facilities on top of existing systems; when the development is
When used spread across several teams with each team responsibility for a layer of functionality; when
there is a requirement for multi-level security.
Allows replacement of entire layers so long as the interface is maintained. Redundant
Advantages facilities (e.g., authentication) can be provided in each layer to increase the dependability of
the system.
In practice, providing a clean separation between layers is often difficult and a high-level
layer may have to interact directly with lower-level layers rather than through the layer
Disadvantages
immediately below it. Performance can be a problem because of multiple levels of
interpretation of a service request as it is processed at each layer.
35 / 24
Software Architecture: The Layered Architecture 3/3
36 / 24
Software Architecture: The Client-Server Architecture 1/3
• Distributed system model which shows how data and processing is distributed
across a range of components.
oCan be implemented on a single computer.
• Set of stand-alone servers which provide specific services such as printing,
data management, etc.
• Set of clients which call on these services.
• Network which allows clients to access servers.
37 / 24
Software Architecture: The Client-Server Architecture 2/3
Name Client-server
38 / 24
Software Architecture: The Client-Server Architecture 3/3
39 / 24
Software Architecture: Package Diagrams
40 / 24
Agenda
• General Introduction
• Analysis Modeling
• Software Architecture
• MVC Pattern
• Object Oriented Design • Layered Architecture
• Client-Server Architecture
• Dynamic Modelling: Comm Diagrams
41 / 24
Object Oriented Design
42 / 24
Object Oriented Design: Designing Information Hiding Classes
43 / 24
Object Oriented Design : Data Abstraction Classes 1/2
45 / 24
Object Oriented Design
Graphical User Interaction Classes
• A GUI class hides from other classes the details of the interface to the user.
• In a given application, the user interface might be a simple command line
interface or a sophisticated GUI
• A command line interface is typically handled by one user interaction class.
46 / 24
Object Oriented Design
Business Logic Classes
47 / 24
Object Oriented Design: Designing Class Interface & Operations 1/2
49 / 24
Object Oriented Design: Information Hiding Classes Design 1/4
50 / 24
Object Oriented Design: Information Hiding Classes Design 2/4
51 / 24
Object Oriented Design: Information Hiding Classes Design 3/4
52 / 24
Object Oriented Design: Information Hiding Classes Design 4/4
53 / 24
Object Oriented Design: Class Relationships 1/3
Class diagrams are used to model and help understand the problem domain. Each UC
is modelled as a diagram.
55 / 24
Object Oriented Design: Class Relationships 3/3
56 / 24
Object Oriented Design: Inheritance in Design
• Inheritance can be used when designing two similar, but not identical, classes
(share many, but not all, characteristics).
• A mechanism for sharing and reusing
code between classes
• A child class inherits the properties
(encapsulated data and operations) of a
parent class
o Super class or Base class
o Subclass or derived class
o Specialization: parent -> child
o Generalization: child -> parent
57 / 24
Object Oriented Design: Inheritance in Design - Abstract Classes
59 / 24
Object Oriented Design: Polymorphism & Dynamic Binding 2/2
60 / 24
61 / 24