SlideShare uma empresa Scribd logo
1 de 33
Architectural Design
&
Patterns
Members:
Abdul Manan 1420 Areeba Riaz 1439
Junaid Majeed 1428 Allah Ditta 1419
Architectural Pattern
• An architectural pattern is a general, reusable solution to a
commonly occurring problem in software architecture.
• Architectural patterns are similar to software design pattern but
have a broader scope.
• Design patterns are medium-scale tactics that flesh out some of the
structure and behavior of entities and their relationships.
• Architectural patterns are high-level strategies that concerns large-
scale components, the global properties and mechanisms of a
system.
• The architectural patterns address various issues in software
engineering, such as computer hardware performance
limitations, high availability and minimization of a business risk.
Architectural patterns 3
Categories of architectural patterns
• From mud to structure
• Patterns: Layers, “Pipes and filters”
• Distributed systems
• Patterns: Broker, Master-Slave
• Interactive systems
• Patterns: Model-View-Controller (MVC) ,MVP,MVVM
Architectural patterns 4
Architectural Pattern - Layers
• Decompose overall system task into cooperating
subtasks Examples
• TCP/IP, and other protocol stacks
• Java application, JVM, OS, physical machine
• Upper layer asks lower layer for service
5
Architectural Pattern - Pipes and
filters
• System process a stream of data.
• Each processing step is encapsulated in a filter component.
• Examples
• A shell in an operating system, like Linux/UNIX or MS-DOS
• find “a” data.txt | sort | more
• Find all lines with “a” in data.txt | sort the lines | show the lines, one screen at a
time
• Compilation of a Java program
• Lexical analysis | syntax analysis | semantic analysis | code generation
• Reuse of filter components
6
Distributed systems
• A layered system can be distributed
• Each layer running on a separate computer
• Called “multi-tiered” system
• A “pipes and filters” system can be distributed
• Each filter running on a separate computer
• Pipes are network connections
7
Architectural Pattern - Broker
• Coordinates communication between distributed components
• Broker features
• Locate servers
• Forward messages
• Examples
• CORBA
• Common Object Request Broker Architecture
• an architecture that enables pieces of programs, called objects, to
communicate with one another regardless of what programming
language they were written in or what operating system they're running on.
CORBA was developed by an industry consortium known as the Object
Management Group (OMG).
• Some chat / messenger systems
8
Broker, consequences
• Benefits
• Location transparency
• Clients do not need to know where servers are.
• Servers can be moved to other computers.
• Changeability and extensibility
• Servers can be changed
• Keep the same interface
• Reusability
• Components can be reused in other application
• Liabilities
• Efficiency
• Fault tolerance
• Broker is not working => nothing is working
9
Architectural Pattern
– Master-Slave
• Divide and conquer
• Master functions
• Split work
• Call slaves
• Combine results
• Examples
• Parallel processing
• Fault tolerance
• Computational accuracy
10
Master-Slave, consequences
• Benefits
• Faster computation
• Split the problem over threads and machines.
• Robustness
• Slaves can be duplicated
11
Interactive systems
• Interaction with the user
• Through graphical user interfaces
• System responds to events (user inputs)
• Functional core of the system must be kept independent
of the user interface
• You must be able to add a new user interface to the system.
• A single system can have many user interfaces
• PC interface
• Web interface
• Mobil phone interface
Interactive System Architectural
Patterns
• There are the followings architectural patterns:
• MVC – Model View Controller
• MVP – Model View Presenter
• MVVM – Model View View-Model
MVC - Model View Controller
• Model View Controller or MVC as it is popularly called, is a
design pattern for developing web applications. A Model View
Controller pattern is made up of the following three parts:
• Model - The lowest level of the pattern which is responsible for
maintaining data.
• View - This is responsible for displaying all or a portion of the data
to the user.
• Controller - Software Code that controls the interactions between the
Model and View.
• MVC is popular as it separates the application logic from the
user interface layer and supports separation of concerns.
The Model
• The model is responsible for managing the data of the
application.
• It responds to the request from the view and it also responds
to instructions from the controller to update itself.
The View
• A presentation of data in a particular format, produced by
a controller's decision to present the data.
• They are script based templating systems like JSP, ASP,
PHP and very easy to integrate with AJAX technology.
The Controller
• The controller is responsible for responding to user input and
perform interactions on the data model objects.
• The controller receives the input, it validates the input and then
performs the business operation that modifies the state of the
data model.
• Struts2 is a MVC based framework.
• Apache Struts 2 is an open-source web application framework
for developing Java EE web applications. It uses and extends
the Java Servlet API to encourage developers to adopt a model–
view–controller (MVC) architecture
Implementation
• We are going to create a Student object acting as a
model.StudentView will be a view class which can
print student details on console.
• StudentController is the controller class responsible to
store data in Student object and update
viewStudentView accordingly.
• MVCPatternDemo, our demo class, will
use StudentController to demonstrate use of MVC
pattern.
Sequence Diagram
MVP – Model View Presenter
• This pattern is similar to MVC pattern in which
controller has been replaced by the presenter.
• This design pattern splits an application into three
main aspects:
• Model
• View
• Presenter
• Model and View are same as MVC.
The Presenter
• The Presenter is responsible for handling all UI events on
behalf of the view.
• This receive input from users via the View, then process the
user's data with the help of Model and passing the results back
to the View.
• view and presenter communicate to each other’s by an
interface.
• Also, presenter does not manage the incoming request traffic
as controller.
• There is one-to-one relationship between View and Presenter
means one View is mapped to only one Presenter.
Sequence Diagram
MVVM – Model View View-Model
• This design pattern splits an application into three
main aspects:
• Model
• View
• View Model
• Model and View are same as MVC.
The View Model
• The View Model is responsible for showing methods,
commands, and other properties that helps to maintain
the state of the view, manipulate the model as the result
of actions on the view, and activate events in the view
itself.
• There is many-to-one relationship between View and
ViewModel means many View can be mapped to one
ViewModel.
• the MVVM pattern allows your code to be consistently
tested through unit testing.
The View Model
• A ViewModel is a model for a view in the application as shown
by its name. It has a collection which contain the data from the
model currently needed for the view.
• The view binds to properties on a ViewModel, which, in turn,
exposes data contained in model objects and other state specific
to the view. The bindings between view and ViewModel are
simple to construct because a ViewModel object is set as the
Data Context of a view. If property values in the ViewModel
change, those new values automatically propagate to the view
via data binding. When the user clicks a button in the View, a
command on the ViewModel executes to perform the requested
action.
Sequence Diagram
Summary

Mais conteúdo relacionado

Mais procurados

Architectural views
Architectural viewsArchitectural views
Architectural views
Saleem Khan
 
Pressman ch-3-prescriptive-process-models
Pressman ch-3-prescriptive-process-modelsPressman ch-3-prescriptive-process-models
Pressman ch-3-prescriptive-process-models
saurabhshertukde
 
Architectural styles and patterns
Architectural styles and patternsArchitectural styles and patterns
Architectural styles and patterns
Himanshu
 
Design patterns ppt
Design patterns pptDesign patterns ppt
Design patterns ppt
Aman Jain
 
Software architecture Unit 1 notes
Software architecture Unit 1 notesSoftware architecture Unit 1 notes
Software architecture Unit 1 notes
Sudarshan Dhondaley
 

Mais procurados (20)

Introduction to SOFTWARE ARCHITECTURE
Introduction to SOFTWARE ARCHITECTUREIntroduction to SOFTWARE ARCHITECTURE
Introduction to SOFTWARE ARCHITECTURE
 
Software architecture design ppt
Software architecture design pptSoftware architecture design ppt
Software architecture design ppt
 
Software Architecture Design Decisions
Software Architecture Design DecisionsSoftware Architecture Design Decisions
Software Architecture Design Decisions
 
Requirement analysis and specification, software engineering
Requirement analysis and specification, software engineeringRequirement analysis and specification, software engineering
Requirement analysis and specification, software engineering
 
Software Architecture
Software ArchitectureSoftware Architecture
Software Architecture
 
Architectural views
Architectural viewsArchitectural views
Architectural views
 
Software Engineering chapter 19
Software Engineering chapter 19Software Engineering chapter 19
Software Engineering chapter 19
 
Web Engineering
Web EngineeringWeb Engineering
Web Engineering
 
Requirement Analysis
Requirement AnalysisRequirement Analysis
Requirement Analysis
 
Software requirements
Software requirementsSoftware requirements
Software requirements
 
Unit iii-Architecture in the lifecycle
Unit iii-Architecture in the lifecycleUnit iii-Architecture in the lifecycle
Unit iii-Architecture in the lifecycle
 
Pressman ch-3-prescriptive-process-models
Pressman ch-3-prescriptive-process-modelsPressman ch-3-prescriptive-process-models
Pressman ch-3-prescriptive-process-models
 
Software development life cycle (SDLC)
Software development life cycle (SDLC)Software development life cycle (SDLC)
Software development life cycle (SDLC)
 
Architectural styles and patterns
Architectural styles and patternsArchitectural styles and patterns
Architectural styles and patterns
 
Traditional Process Models
Traditional Process ModelsTraditional Process Models
Traditional Process Models
 
Design patterns ppt
Design patterns pptDesign patterns ppt
Design patterns ppt
 
Unit iii(part b - architectural design)
Unit   iii(part b - architectural design)Unit   iii(part b - architectural design)
Unit iii(part b - architectural design)
 
Hierarchical architecture
Hierarchical architectureHierarchical architecture
Hierarchical architecture
 
4+1 View Model of Software Architecture
4+1 View Model of Software Architecture4+1 View Model of Software Architecture
4+1 View Model of Software Architecture
 
Software architecture Unit 1 notes
Software architecture Unit 1 notesSoftware architecture Unit 1 notes
Software architecture Unit 1 notes
 

Destaque

Project 1 brief design studio 1 march 2015
Project 1 brief design studio 1 march 2015Project 1 brief design studio 1 march 2015
Project 1 brief design studio 1 march 2015
aswadtheman
 
Architectural design studio 1 project 2 brief march 2015
Architectural design studio 1 project 2 brief march 2015Architectural design studio 1 project 2 brief march 2015
Architectural design studio 1 project 2 brief march 2015
Arvindhan Balasingam
 
Design studio 1 project 3a brief march 2015_updated
Design studio 1 project 3a brief march 2015_updatedDesign studio 1 project 3a brief march 2015_updated
Design studio 1 project 3a brief march 2015_updated
Arvindhan Balasingam
 
Studio 1 Project 2 presentation board
Studio 1 Project 2 presentation boardStudio 1 Project 2 presentation board
Studio 1 Project 2 presentation board
Dexter Ng
 
86. FALLING WATER HOUSE. FRANK LLOYD WRIGHT
86. FALLING WATER HOUSE. FRANK LLOYD WRIGHT86. FALLING WATER HOUSE. FRANK LLOYD WRIGHT
86. FALLING WATER HOUSE. FRANK LLOYD WRIGHT
Assumpció Granero
 
Unit 3 3 architectural design
Unit 3 3 architectural designUnit 3 3 architectural design
Unit 3 3 architectural design
Hiren Selani
 

Destaque (18)

Project 1 brief design studio 1 march 2015
Project 1 brief design studio 1 march 2015Project 1 brief design studio 1 march 2015
Project 1 brief design studio 1 march 2015
 
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 4 - Program
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 4 - ProgramArchitectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 4 - Program
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 4 - Program
 
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 9 Styles
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 9 StylesArchitectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 9 Styles
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 9 Styles
 
Architectural design studio 1 project 2 brief march 2015
Architectural design studio 1 project 2 brief march 2015Architectural design studio 1 project 2 brief march 2015
Architectural design studio 1 project 2 brief march 2015
 
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Process
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - ProcessArchitectural Design 1 Lectures by Dr. Yasser Mahgoub - Process
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Process
 
Design studio 1 project 3a brief march 2015_updated
Design studio 1 project 3a brief march 2015_updatedDesign studio 1 project 3a brief march 2015_updated
Design studio 1 project 3a brief march 2015_updated
 
Architectural design project project 1a brief august 2016
Architectural design project project 1a brief august 2016Architectural design project project 1a brief august 2016
Architectural design project project 1a brief august 2016
 
Architecture design studio 1 project 1 brief march 2016
Architecture design studio 1 project 1 brief march 2016Architecture design studio 1 project 1 brief march 2016
Architecture design studio 1 project 1 brief march 2016
 
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 10 Aesthetics
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 10 AestheticsArchitectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 10 Aesthetics
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 10 Aesthetics
 
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 7 Drawing
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 7 DrawingArchitectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 7 Drawing
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 7 Drawing
 
Draft Brief - West Vancouver Centre for Art Architecture Design
Draft Brief - West Vancouver Centre for Art Architecture DesignDraft Brief - West Vancouver Centre for Art Architecture Design
Draft Brief - West Vancouver Centre for Art Architecture Design
 
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 8 Structure
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 8 StructureArchitectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 8 Structure
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 8 Structure
 
Studio 1 Project 2 presentation board
Studio 1 Project 2 presentation boardStudio 1 Project 2 presentation board
Studio 1 Project 2 presentation board
 
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 5 Concept
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 5 ConceptArchitectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 5 Concept
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 5 Concept
 
Teaching Architectural design
Teaching Architectural design Teaching Architectural design
Teaching Architectural design
 
86. FALLING WATER HOUSE. FRANK LLOYD WRIGHT
86. FALLING WATER HOUSE. FRANK LLOYD WRIGHT86. FALLING WATER HOUSE. FRANK LLOYD WRIGHT
86. FALLING WATER HOUSE. FRANK LLOYD WRIGHT
 
Casestudy of falling water
Casestudy of falling waterCasestudy of falling water
Casestudy of falling water
 
Unit 3 3 architectural design
Unit 3 3 architectural designUnit 3 3 architectural design
Unit 3 3 architectural design
 

Semelhante a Architectural Design & Patterns

Mvc pattern and implementation in java fair
Mvc   pattern   and implementation   in   java fairMvc   pattern   and implementation   in   java fair
Mvc pattern and implementation in java fair
Tech_MX
 
Mvc 130330091359-phpapp01
Mvc 130330091359-phpapp01Mvc 130330091359-phpapp01
Mvc 130330091359-phpapp01
Jennie Gajjar
 

Semelhante a Architectural Design & Patterns (20)

MVC architecture
MVC architectureMVC architecture
MVC architecture
 
Mvc pattern and implementation in java fair
Mvc   pattern   and implementation   in   java fairMvc   pattern   and implementation   in   java fair
Mvc pattern and implementation in java fair
 
MVC Seminar Presantation
MVC Seminar PresantationMVC Seminar Presantation
MVC Seminar Presantation
 
Web engineering - MVC
Web engineering - MVCWeb engineering - MVC
Web engineering - MVC
 
MVC.pptx
MVC.pptxMVC.pptx
MVC.pptx
 
Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelines
 
Interaction-Oriented Architecture.pptx
Interaction-Oriented Architecture.pptxInteraction-Oriented Architecture.pptx
Interaction-Oriented Architecture.pptx
 
MVP Clean Architecture
MVP Clean  Architecture MVP Clean  Architecture
MVP Clean Architecture
 
Mvc 130330091359-phpapp01
Mvc 130330091359-phpapp01Mvc 130330091359-phpapp01
Mvc 130330091359-phpapp01
 
MVC Framework
MVC FrameworkMVC Framework
MVC Framework
 
MVC
MVCMVC
MVC
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
 
Asp 1-mvc introduction
Asp 1-mvc introductionAsp 1-mvc introduction
Asp 1-mvc introduction
 
J2EE Patterns
J2EE PatternsJ2EE Patterns
J2EE Patterns
 
Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013
 
MVVM and Prism
MVVM and PrismMVVM and Prism
MVVM and Prism
 
Patterns
PatternsPatterns
Patterns
 
Model View Controller (MVC)
Model View Controller (MVC)Model View Controller (MVC)
Model View Controller (MVC)
 
Design Pattern
Design PatternDesign Pattern
Design Pattern
 
Design pattern
Design patternDesign pattern
Design pattern
 

Mais de Inocentshuja Ahmad

Mais de Inocentshuja Ahmad (20)

Bottom up parser
Bottom up parserBottom up parser
Bottom up parser
 
7th lec overview - latest
7th lec   overview - latest7th lec   overview - latest
7th lec overview - latest
 
6th lec infrared slides
6th lec   infrared slides6th lec   infrared slides
6th lec infrared slides
 
5th lec ofdm
5th lec   ofdm5th lec   ofdm
5th lec ofdm
 
3rd lec fcss
3rd lec   fcss3rd lec   fcss
3rd lec fcss
 
2nd lec wireless terminologies
2nd lec   wireless terminologies2nd lec   wireless terminologies
2nd lec wireless terminologies
 
1st lec generations
1st lec   generations1st lec   generations
1st lec generations
 
4rth lec dsss
4rth lec   dsss4rth lec   dsss
4rth lec dsss
 
Mcq's
Mcq'sMcq's
Mcq's
 
Long questions
Long questionsLong questions
Long questions
 
Lecture notes on mobile communication
Lecture notes on mobile communicationLecture notes on mobile communication
Lecture notes on mobile communication
 
Gsm
GsmGsm
Gsm
 
Lecture5 mobile communication_short
Lecture5 mobile communication_short Lecture5 mobile communication_short
Lecture5 mobile communication_short
 
8th lec flow and error control
8th lec   flow and error control8th lec   flow and error control
8th lec flow and error control
 
Chapter 10:Risk and Refinements In Capital Budgeting
Chapter 10:Risk and Refinements In Capital BudgetingChapter 10:Risk and Refinements In Capital Budgeting
Chapter 10:Risk and Refinements In Capital Budgeting
 
Chapter 9:Capital Budgeting Techniques
Chapter 9:Capital Budgeting TechniquesChapter 9:Capital Budgeting Techniques
Chapter 9:Capital Budgeting Techniques
 
Chapter 5:Risk and Return
Chapter 5:Risk and ReturnChapter 5:Risk and Return
Chapter 5:Risk and Return
 
Question and answer Programming
Question and answer ProgrammingQuestion and answer Programming
Question and answer Programming
 
Email security & threads
Email security & threadsEmail security & threads
Email security & threads
 
Chapter03 Top Down Design with Function
Chapter03 Top Down Design with FunctionChapter03 Top Down Design with Function
Chapter03 Top Down Design with Function
 

Último

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 

Último (20)

How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 

Architectural Design & Patterns

  • 1. Architectural Design & Patterns Members: Abdul Manan 1420 Areeba Riaz 1439 Junaid Majeed 1428 Allah Ditta 1419
  • 2. Architectural Pattern • An architectural pattern is a general, reusable solution to a commonly occurring problem in software architecture. • Architectural patterns are similar to software design pattern but have a broader scope. • Design patterns are medium-scale tactics that flesh out some of the structure and behavior of entities and their relationships. • Architectural patterns are high-level strategies that concerns large- scale components, the global properties and mechanisms of a system. • The architectural patterns address various issues in software engineering, such as computer hardware performance limitations, high availability and minimization of a business risk.
  • 3. Architectural patterns 3 Categories of architectural patterns • From mud to structure • Patterns: Layers, “Pipes and filters” • Distributed systems • Patterns: Broker, Master-Slave • Interactive systems • Patterns: Model-View-Controller (MVC) ,MVP,MVVM
  • 4. Architectural patterns 4 Architectural Pattern - Layers • Decompose overall system task into cooperating subtasks Examples • TCP/IP, and other protocol stacks • Java application, JVM, OS, physical machine • Upper layer asks lower layer for service
  • 5. 5 Architectural Pattern - Pipes and filters • System process a stream of data. • Each processing step is encapsulated in a filter component. • Examples • A shell in an operating system, like Linux/UNIX or MS-DOS • find “a” data.txt | sort | more • Find all lines with “a” in data.txt | sort the lines | show the lines, one screen at a time • Compilation of a Java program • Lexical analysis | syntax analysis | semantic analysis | code generation • Reuse of filter components
  • 6. 6 Distributed systems • A layered system can be distributed • Each layer running on a separate computer • Called “multi-tiered” system • A “pipes and filters” system can be distributed • Each filter running on a separate computer • Pipes are network connections
  • 7. 7 Architectural Pattern - Broker • Coordinates communication between distributed components • Broker features • Locate servers • Forward messages • Examples • CORBA • Common Object Request Broker Architecture • an architecture that enables pieces of programs, called objects, to communicate with one another regardless of what programming language they were written in or what operating system they're running on. CORBA was developed by an industry consortium known as the Object Management Group (OMG). • Some chat / messenger systems
  • 8. 8 Broker, consequences • Benefits • Location transparency • Clients do not need to know where servers are. • Servers can be moved to other computers. • Changeability and extensibility • Servers can be changed • Keep the same interface • Reusability • Components can be reused in other application • Liabilities • Efficiency • Fault tolerance • Broker is not working => nothing is working
  • 9. 9 Architectural Pattern – Master-Slave • Divide and conquer • Master functions • Split work • Call slaves • Combine results • Examples • Parallel processing • Fault tolerance • Computational accuracy
  • 10. 10 Master-Slave, consequences • Benefits • Faster computation • Split the problem over threads and machines. • Robustness • Slaves can be duplicated
  • 11. 11 Interactive systems • Interaction with the user • Through graphical user interfaces • System responds to events (user inputs) • Functional core of the system must be kept independent of the user interface • You must be able to add a new user interface to the system. • A single system can have many user interfaces • PC interface • Web interface • Mobil phone interface
  • 12. Interactive System Architectural Patterns • There are the followings architectural patterns: • MVC – Model View Controller • MVP – Model View Presenter • MVVM – Model View View-Model
  • 13. MVC - Model View Controller • Model View Controller or MVC as it is popularly called, is a design pattern for developing web applications. A Model View Controller pattern is made up of the following three parts: • Model - The lowest level of the pattern which is responsible for maintaining data. • View - This is responsible for displaying all or a portion of the data to the user. • Controller - Software Code that controls the interactions between the Model and View. • MVC is popular as it separates the application logic from the user interface layer and supports separation of concerns.
  • 14. The Model • The model is responsible for managing the data of the application. • It responds to the request from the view and it also responds to instructions from the controller to update itself. The View • A presentation of data in a particular format, produced by a controller's decision to present the data. • They are script based templating systems like JSP, ASP, PHP and very easy to integrate with AJAX technology.
  • 15. The Controller • The controller is responsible for responding to user input and perform interactions on the data model objects. • The controller receives the input, it validates the input and then performs the business operation that modifies the state of the data model. • Struts2 is a MVC based framework. • Apache Struts 2 is an open-source web application framework for developing Java EE web applications. It uses and extends the Java Servlet API to encourage developers to adopt a model– view–controller (MVC) architecture
  • 16.
  • 17. Implementation • We are going to create a Student object acting as a model.StudentView will be a view class which can print student details on console. • StudentController is the controller class responsible to store data in Student object and update viewStudentView accordingly. • MVCPatternDemo, our demo class, will use StudentController to demonstrate use of MVC pattern.
  • 18.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24. MVP – Model View Presenter • This pattern is similar to MVC pattern in which controller has been replaced by the presenter. • This design pattern splits an application into three main aspects: • Model • View • Presenter • Model and View are same as MVC.
  • 25.
  • 26. The Presenter • The Presenter is responsible for handling all UI events on behalf of the view. • This receive input from users via the View, then process the user's data with the help of Model and passing the results back to the View. • view and presenter communicate to each other’s by an interface. • Also, presenter does not manage the incoming request traffic as controller. • There is one-to-one relationship between View and Presenter means one View is mapped to only one Presenter.
  • 28. MVVM – Model View View-Model • This design pattern splits an application into three main aspects: • Model • View • View Model • Model and View are same as MVC.
  • 29.
  • 30. The View Model • The View Model is responsible for showing methods, commands, and other properties that helps to maintain the state of the view, manipulate the model as the result of actions on the view, and activate events in the view itself. • There is many-to-one relationship between View and ViewModel means many View can be mapped to one ViewModel. • the MVVM pattern allows your code to be consistently tested through unit testing.
  • 31. The View Model • A ViewModel is a model for a view in the application as shown by its name. It has a collection which contain the data from the model currently needed for the view. • The view binds to properties on a ViewModel, which, in turn, exposes data contained in model objects and other state specific to the view. The bindings between view and ViewModel are simple to construct because a ViewModel object is set as the Data Context of a view. If property values in the ViewModel change, those new values automatically propagate to the view via data binding. When the user clicks a button in the View, a command on the ViewModel executes to perform the requested action.