Mohammad Riad Katby
Alef Information Solutions
Software Architect
http://www.alef-tech.com
DESIGN PATTERN-
ORIENTED
SOFTWARE
ARCHITECTURE
Content
What is Design Pattern
Different Level of Abstraction
An introduction to the Object-Orientation.
An introduction to the Object-Oriented
Methodology.
Class diagram tools and notation guild.
Object-Oriented analysis and design.
Object-Oriented Implementation.
What is Design Pattern ?
A patterns for software architecture
describe a particular design problem
that arises in specific design contexts,
and present a well-proven generic
scheme for its solution. The solution
scheme is specified by describing its
consistent components, their
responsibilities and relationships, and
the ways in which they collaborate.
DIFFERENT LEVEL
OF ABSTRACTION
Architecture Pattern
An architectural pattern expresses a fundamental
structural organization schema for software
systems. It provides a set of predefined
subsystems, specifies their responsibilities, and
includes rules and guidelines for organizing the
relationships between them.
These patterns describe how to structure an
application at the highest level. For example,
the Layered Application pattern is an
architecture pattern.
Design Patterns
A design pattern provides a scheme for refining
the subsystems or components of a software
system, or the relationships between them. It
describes a commonly recurring structure of
communicating components that solves a
general design problem within a particular
context
Design pattern provide the next level of
refinement. Many of the iconic patterns, such as
MVC or Singleton, are in this layer.
Implementation Pattern
An implementation pattern (Idioms) is a
low-level pattern specific to a particular
platform. An implementation pattern
describes how to implement particular
aspects of components or the
relationships between them, using the
features of a given platform.
We will use C# and .Net Framework
AN INTRODUCTION
TO THE OBJECT-
ORIENTATION
What is Object-
Orientation ?
A technology based on objects and
classes.
A way of thinking to organize software as
a collection of discrete objects that
incorporate both data structure and
behavior.
An abstraction of the real word based on
objects and their interactions with other
objects
Three characteristics of
OO
Three characteristics of
OO
Abstraction and classification:
Focusing on essential, inherent aspect of an
entity and ignore its accidental.
The idea of grouping software ideas into
classes of things.
Encapsulation and Information hiding:
Separation the external aspects of an object,
which are accessible to other objects, from
the internal implementation details of object,
which are hidden from other objects
Polymorphism and Inheritance:
Ability of abstraction to share properties by
inheritance hierarchy.
Object and Classes
Object
An object is a thing or concept. It can be a real-word
thing or concept, or an abstraction of a thing or
concept expressed as a software representation.
An object has state (Attribute) and behavior
(method).
Individual objects, also called instances, have
identity and are distinct things and can be
distinguished from other objects.
Classes
A class is a description of a collection of objects with
common attributes and behavior.
In Practice, the definition or specification of a class
includes the definitions of the attributes comprising
the state, the methods implementing the behavior,
and how to handle creation and destruction of an
object
AN INTRODUCTION
TO THE OBJECT-
ORIEANTED
METHODOLOGY
Development Process
What are analysis and
design for
Testing a physical entity before building
system.
Communicating with customers.
Visualization.
Reeducation of Complexity.
CLASS DIAGRAM
TOOLS AND
NOTATION GUIED.
OBJECT-ORIENTED
ANALYSIS AND
DESIGN
Analysis and Design
Process
Problem statement
System Architecture
Object Modeling
Identifying object classes
Preparing a Data dictionary for classes
Identifying Associations
Identifying Attributes
Refining with inheritance
Grouping Classes into module
Dynamic Modeling
Problem statement
Requirements Statement
Problem scope
What is needed
Application Context
Performance Needs
Example: ATM Network
Cashier Station
Account
ATM
Bank Computer
Account
ATM Central Computer
ATM Bank Computer
Account
Account
System Architecture Consortium
ATM Station Computer Bank Computer
Cashier
ATM Consortium
Phone
Line Cashier Station
Phone
Cash Card Line
Station Code Database
User Account
Bank
User Code Customer
Interface
Card Authorization
Transaction
Transaction Transaction
Transaction
Transaction
Identifying Object
Classes
Extract Nouns Eliminate Spurious Classes
Requirements Tentative
Object Classes Object
Statement Classes
Redundant classes
Irrelevant classes
Discard Vague classes
Unnecessary Attributes
And Incorrect Operations
Roles
Classes
Implementation constructs
Example: IOC for ATM
Network
Preparing a Data
Dictionary
Isolatedword have many interpretations,
so prepare a data dictionary for all
modeling entities.
Describe the scope of the class within the
current problem, including
assumptions or restrictions on its
membership or use
The data dictionary also describe
associations, attributes, and operations
Example: DD for ATM
Network
Identifying Associations
Extract Verbs Eliminate spurious
Object Tentative associations
Associations
Classes associations
Associations between eliminated
classes
Discard Irrelevant or implementation
Unnecessary associations
Action
and Incorrect Ternary associations
Associations Derived associations
Misnamed associations
Multiplicity
Example: IAs for ATM
Network
Identifying Attributes
Extract Object Properties Eliminate spurious
Attribute
Object Tentative Attributes
Classes attribute
Object
Names
Discard
Unnecessary Identifiers
and Incorrect Link attributes
Attributes Internal values
Fine detail
Discordant attributes
Example: IAT for ATM
Network
Refining With
Inheritance
This step is to organize classes by using
inheritance to share common structure
Inheritance can be added in two directions:
Bottom Up: By generalizing common aspect
of existing classes into a superclasses
○ By searching for classes with similar attributes,
associations, or operations
○ For each generalization, define a superclass to
share common features
Top Down: By refining existing classes into
specialized subclasses
Example: RWI for ATM
Network
Grouping Classes into
Modules
A module is a set of classes that captures
some logical subset of entire model
For example: a model of computer
operating system might contain
modules for process control, device
control, file maintenance, and memory
management
Example: GCIM for ATM
Network
Tellers:Cashier, Entry Station, Cashier
Station, ATM
Account: Account, Cash Card, Card
Authorization, Customer, Transaction,
Update, Cashier Transaction, Remote
Transaction
Banks: Consortium, Bank
Dynamic Model
The dynamic model shows the time-
dependent behavior of the system and
the objects in it.
Begin dynamic analysis by looking for
event, externally visible stimuli and
responses.
The dynamic model is important for
interactive systems, but insignificant for
purely static data repository, such as
database.
Dynamic Model
Thefollowing steps are performed in
constructing a dynamic model
Prepare scenarios of typical interaction
sequences
Identify events between objects
Prepare an event trace for each
scenario
Build a state diagram
Match events between objects to verify
consistency
OBJECT-ORIENTED
IMPLEMENTATION
Implementation Process
Class Definition
Creating Objects
Calling Operations
Using Inheritance
Implementing Association