4+1 View Model of Software Architecture & Design

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 41

Software Architecture & Design

SEC3071
Lecture No. 08
Dr.Isma Hamid
Department of Computer Science
National Textile University
Last Lecture Review

 An Architect’s Tasks

 Architecture Business Cycle

 Architectural Representations

 Unified Modeling Language

 Introduction to the 4+1 View Model

2 Software Architecture & Design – SEC3071


Agenda – What will you Learn Today?

The 4+1 View Model Architecture Description


Language

3 Software Architecture & Design – SEC3071


Architectural Representations

4 Software Architecture & Design – SEC3071


Architectural Representations

 Software architecture specifies a high level of


software system abstraction by employing
decomposition, composition, architecture
styles, and quality attributes

 Every software architecture must describe its


collection of components and the connections
and interactions among these components

5 Software Architecture & Design – SEC3071


Architectural Representations

 It must also specify the deployment


configuration of all components and
connections

 Additionally, a software architecture design


must conform to the project's functional and
nonfunctional requirements

6 Software Architecture & Design – SEC3071


Box-and-Line Diagrams

 These diagrams come with descriptions of


components and connectors, as well as other
descriptions that provide common intuitive
interpretations

7 Software Architecture & Design – SEC3071


Box-and-Line Diagrams

Catalog Shopping Cart

Financial Check Check Out Inventory

Invoice/Shipping

8 Software Architecture & Design – SEC3071


UML for Software Architecture

 The Unified Modeling Language (UML) is a


graphical language for visualizing, specifying,
constructing, and documenting the artifacts of
a software-intensive system

 UML offers a standard way to draw a system's


blueprints

9 Software Architecture & Design – SEC3071


Architecture View Models

 A model is a complete, simplified description


of a system from a particular perspective or
viewpoint

 There is no single view that can present all


aspects of complex software to stakeholders

10 Software Architecture & Design – SEC3071


Architecture View Models

 View models provide partial representations


of the software architecture to specific
stakeholders such as
‒ System Users
‒ Analyst/Designer
‒ Developer/Programmer
‒ System Integrator
‒ System Engineer

 Software designers can organize description


of architecture decisions in different views
11 Software Architecture & Design – SEC3071
The 4+1 View Model

12 Software Architecture & Design – SEC3071


The 4+1 View Model

 The 4+1 view model was introduced by


Philippe Kruchten
 Philippe Kruchten has more than 16 years of
experience as a leader of the development
team in Rational corporation

 He had a good experiences in


industry (Telecom, Air traffic control
system) which he used to justify his
model
13 Software Architecture & Design – SEC3071
The 4+1 View Model

 The model provides four essential views


1) The Logical View
2) The Process View
3) The Physical View
4) The Development View
 Fifth is the Scenario View

14 Software Architecture & Design – SEC3071


The 4+1 View Model

 Multiple-view model that addresses different


aspects and concerns of the system

 Standardizes the software design documents


and makes the design easy to understand by
all stakeholders

15 Software Architecture & Design – SEC3071


The 4+1 View Model

User interface view

Logical Deployment
View View

Scenario

Process Physical
View View

16 Software Architecture & Design – SEC3071


The Scenario View

 The scenario view describes the functionality


of the system i.e. how the user employs the
system and how the system provides services
to the users

 It helps designers to discover architecture


elements during the design process and to
validate the architecture design afterward
‒ The UML use case diagram and other verbal
documents
17 Software Architecture & Design – SEC3071
The Scenario View

Check-In

Passenger
Automated
Check-In

Booking

Request
Customs Passenger Baggage
Official List Transporter

18 Software Architecture & Design – SEC3071


The Logical/Conceptual View

 The logical view is based on application


domain entities necessary to implement the
functional requirements

 The logical view specifies system


decomposition into conceptual entities (such
as objects) and connections between them
(such as associations)

19 Software Architecture & Design – SEC3071


The Logical/Conceptual View

 The logical view is typically supported by


‒ UML static diagrams including class/object
diagrams
‒ UML dynamic diagrams such as the interaction
overall diagram, sequence diagram,
communication diagram, state diagram, and
activity diagram

20 Software Architecture & Design – SEC3071


The Logical/Conceptual View

Employee Date
- cnic : string - day : integer
- name : string - month : integer
- designation : string - year : integer
- dateOfJoining : Date + Date()
- salary : integer
+ Employee()
+ AddEmployee() : void

AreaManager Accountant
- area : string - qualification: string
+ AreaManager() + Qualification()

21 Software Architecture & Design – SEC3071


The Development/Module View

 The development view derives from the


logical view and describes the static
organization of the system modules
 Modules such as namespaces, class library,
subsystem, or packages are building blocks
that group classes for further development
and implementation
 UML diagrams such as package diagrams
and component diagrams are often used to
support this view
22 Software Architecture & Design – SEC3071
The Development/Module View

Customer Cart Catalog

Shipping Item Item Inventory

Payment Catalog Update


Cart Update

Show Display
Confirmatio Shopping
n Cart

23 Software Architecture & Design – SEC3071


The Process View

 The process view focuses on the dynamic


aspects of the system i.e. its execution time
behavior
 This view maps functions, activities, and
interactions onto runtime implementation
 The process view takes care of the
concurrency and synchronization issues
between subsystems
 The UML activity diagram and interaction
diagram support this view
24 Software Architecture & Design – SEC3071
The Process View
Order Processing

Check
Credit
Declined

Make
Make Billing Make Billing
Shipping
Invoice Invoice
Order
Type

Post UPS

Save
Record

25 Activity
Software diagram in
Architecture & Process
Design –View
SEC3071
The Physical View

 The physical view describes installation,


configuration, and deployment of the software
application
 It concerns itself with how to deliver the
deployable system
 The physical view shows the mapping of
software onto hardware
 The UML deployment diagrams and other
documentation are often used to support this
view
26 Software Architecture & Design – SEC3071
The Physical View

Tables
Shopping Cart
Catalog
JDBC
Catalog
Inventory

Customer ship,
Customers
Pay, Confirmation

JSP, Servlet Container, JavaBean Database Server


Webserver (TOMCAT)

Deployment diagram in Physical View

27 Software Architecture & Design – SEC3071


The User Interface View

 The User Interface (UI) view is an extended


view that provides a clear user-computer
interface view and hides implementation
details
 This view may be provided as a series of
screen snapshots or a dynamic, interactive
prototype demo
 Any modification on this view will have direct
impact on the scenarios view

28 Software Architecture & Design – SEC3071


The User Interface View

 The 4+1 view is an architecture verification


technique for studying and documenting
software architecture design

29 Software Architecture & Design – SEC3071


Architecture Description Language

30 Software Architecture & Design – SEC3071


Architecture Description Language

 It is a modelling notation to support


architecture-based development used to
define and model system architecture prior to
detailed design and implementation

31 Software Architecture & Design – SEC3071


Architecture Description Language

 Architecture Description Languages (ADLs)


can be used to specify an architecture
 UML (OMG) – General purpose
 SADL (SRI)
 Aesop (Carnegie Mellon University)
 Acme (CMU) – and interchange format
 Rapide (Stanford University)
 Wright (CMU)
 Darwin (Imperial College London)
32 Software Architecture & Design – SEC3071
Parts of an ADL

 Architecture Style =
‒ {Component/Connector Vocabulary, Topology,
Semantic Constraints}
 Components (locus of computation),
‒ filter, data store, object, process, server
 Connectors (interactions between
components),
‒ procedure call, RPC, pipe, TCP/IP
 Key issue - tool support

33 Software Architecture & Design – SEC3071


Elements of Components & Connectors

 Components model principal run-time


elements that have a set of ports
 Ports model component’s interfaces through
which component interacts with other
components via connectors
 Connectors model the pathways of
communication between components and
have a set of roles
 Roles model the specifications of behavior
requires of the components that use a given
34 connector
Software Architecture & Design – SEC3071
Elements of Components & Connectors

 Simple-cs system consist of a single client


and a single server, interacting through rpc
based connector

 In this representation we can analyze our


C&C model to see if there are any unattached
roles or ports, name collisions and etc.

35 Software Architecture & Design – SEC3071


Elements of Components & Connectors

System simple-cs = {
Component client = { port call-rpc };
Component server = { port rpc-request };
Connector rpc = {
role client-side;
role server-side;
};
Attachements = {
client.call-rpc to rpc.client-side;
server.rpc-request to rpc-server-side;
}
}

36 Software Architecture & Design – SEC3071


Modeling Architectural Properties in ADL

 Properties are name-value pairs that can be


associated with any architectural element :
component, port, connector

37 Software Architecture & Design – SEC3071


Modeling Architectural Properties in ADL

 sync-request port property indicates if rpc-


request port is synchronous or asynchronous
 max-transactions-per-second and max-
clients-supported component properties
indicate maximum properties of server
component
 protocol property of rpc connector indicates
the name of the communication protocol

38 Software Architecture & Design – SEC3071


Modeling Architectural Properties in ADL

System simple-cs = {
...
Component server = {
port rpc-request = {
Property sync-request:boolean = true;
};
Property max-transaction-per-sec:int=5;
Property max-clients-supported:int=100;
};
Connector rpc = { ...
Property protocol:String="axis-rpc";
}; ...
};
39 Software Architecture & Design – SEC3071
Recap

 Architectural Representations
1) Unified Modeling Language
o Architecture View Models
o The 4+1 View Model
2) Architecture Description Language

40 Software Architecture & Design – SEC3071


Questions

Software Architecture & Design –


41

You might also like