GoV Patterns Design-Patterns in Software Engineering-Lecture 9 Slides-Computer Engineering, Slides of Software Engineering

GoV Patterns Design, Structural Decomposition, Organization of Work, Master Slave Structure, Access Control, Management, Command Processor, View Handler, Communication, Forwarder Receiver, Client Dispatcher Server, Raman Ramsin, Lecture Slides, Patterns in Software Engineering, Department of Computer Engineering, Sharif University of Technology, Iran.

Typology: Slides

2011/2012

Uploaded on 02/19/2012

hester
hester 🇮🇷

4.5

(13)

84 documents

1 / 22

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Patterns in
Software Engineering
Lecturer: Raman Ramsin
Lecture 9
Lecture
9
GoV Patterns: Design
Department of Computer Engineering 1Sharif University of Technology
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16

Partial preview of the text

Download GoV Patterns Design-Patterns in Software Engineering-Lecture 9 Slides-Computer Engineering and more Slides Software Engineering in PDF only on Docsity!

Patterns in Software Engineering Lecturer: Raman Ramsin^ Lecture 9Lecture 9^ GoV Patterns: Design

Department of Computer Engineering

1

Sharif University of Technology

Patterns in Software Engineering – Lecture 9 GoV Design Patterns: CategoriesGoV^ Design Patterns: Categories „ Structural Decomposition^

^ Support a suitable decomposition of subsystems and complex components into ^ Support^ a suitable decomposition of subsystems and complex components intocooperating parts.^ ^ Whole-Part „ Organization of Work „ Organization^ of Work^ ^ Define how components collaborate together to solve a complex problem.^ ^ Master-Slave^ Access Control „ Access^ Control^ ^ Guard and control access to services or components.^ ^ Proxy „ Management^ ^ Handle homogenous collections of objects, services and components in their entirety.^ ^ Command Processor

andView Handler „^ Communication^ ^ Help to organize communication between components.^ ^ Forwarder-Receiver

Client-Dispatcher-Server

andPublisher-Subscriber Department of Computer Engineering

2

Sharif University of Technology

^ Forwarder-Receiver

,Client-Dispatcher-Server, and

Publisher-Subscriber

Patterns in Software Engineering – Lecture 9 Design: Organization of WorkDesign:^ Organization of Work „ Master-Slave:

supports fault tolerance, parallel computationpp^

, p^

p

and computational accuracy. A

master component:

^ distributes work to identical

slave^ components, and

^ computes a final result from the results these slaves return. „ The^ Chain of Responsibility

,^ Command^

and^ Mediator

patterns also belong to this category.Department of Computer Engineering

4

Sharif University of Technology

Patterns in Software Engineering – Lecture 9 Organization of Work: Master

-Slave – Structure

Organization of Work: Master Slave

Structure

„^ Amaster^ component

p distributes work to identicalslave

components;

^ computes a final result from the results these slaves return.The master component provides a service that can be solved by applying„ The^ master component provides a service that can be solved by applyingthe 'divide and conquer' principle. Department of Computer Engineering

5

Sharif University of Technology

Patterns in Software Engineering – Lecture 9 Design: Access ControlDesign:^ Access Control „ Proxy:^ makes the clients of a component communicate with arepresentative rather than to the component itself. „ The^ Facade

and^ Iterator

patterns also belong to this tcategory. Department of Computer Engineering

7

Sharif University of Technology

Patterns in Software Engineering – Lecture 9 Design: ManagementDesign:^ Management „ Command Processor:

separates the request for a service from itsp^

q

execution. A command processor component:^

^ manages requests as separate objects,h d l^ th^

ti^ f th^

t^ d

^ schedules the execution of the requests, and ^ provides additional services such as the storing of request objects for later undo. „ View Handler:

helps to manage views in a software system. A view

handler component:^

^ allows clients to open, manipulate and dispose of views,^ ^ coordinates dependencies between views, and^ ^ organizes the update of the views.g^

p

„^ The^ Memento

pattern also belongs to this category.

Department of Computer Engineering

8

Sharif University of Technology

Patterns in Software Engineering – Lecture 9 Management: Command Processor

-^ Dynamics

Management:

Command Processor

Dynamics

Department of Computer Engineering

10

Sharif University of Technology

Patterns in Software Engineering – Lecture 9 Management: View HandlerManagement:

View Handler

„^ A^ view handler

component

„^ A^ view handler

component

manages all views that the software system provides, allows clients to open^ manipulate and dispose of views

and

^ allows clients to open, manipulate and dispose of views, and ^ coordinates dependencies between views and organizes their update. „ Specific views, together with functionality for their presentation andcontrol^ are encapsulated within separate

view components

one for

control, are encapsulated within separate

view components - one for

each kind of view. „ Suppliers^ provide views with the data they must present.Department of Computer Engineering

11

Sharif University of Technology

Patterns in Software Engineering – Lecture 9 Management: View Handler

-^ Dynamics (1)

Management:

View Handler

Dynamics (1)

„^ Scenario I:

The view handler creates a new view. Scenario I: The^ view handler creates a new view. Department of Computer Engineering

13

Sharif University of Technology

Patterns in Software Engineering – Lecture 9 Management: View Handler

-^ Dynamics (2)

Management:

View Handler

Dynamics (2)

„^ Scenario II:

The view handler organizes the tiling of views. Scenario II: The^ view handler organizes the tiling of views. Department of Computer Engineering

14

Sharif University of Technology

Patterns in Software Engineering – Lecture 9 Communication: Forwarder

-Receiver

Communication: Forwarder Receiver^ „^ Peer^ components:

ibl^ f^ li^ i^

k

^ are responsible for application tasks, ^ know the names of the remote peers with which they need to communicate, and ^ use aforwarder

to send messages to other peers and a

receiver^ to receive

g^ p

messages from other peers. „ Forwarder^ components:

send messages across process boundaries, provide a general interface for sending messages, marshal and deliver messages to remote receivers, and

g^

^ map names to physical addresses. „ Receiver^ components: ^ are responsible for receiving messages, ^ provide a general interface for receiving messages, and ^ receive and unmarshal messages from remote forwardersDepartment of Computer Engineering

16

Sharif University of Technology

^ receive^ and unmarshal messages from remote forwarders.

Patterns in Software Engineering – Lecture 9 Communication: Forwarder

-Receiver^

  • Structure

Communication: Forwarder Receiver

Structure

Department of Computer Engineering

17

Sharif University of Technology

Patterns in Software Engineering – Lecture 9 Communication: Client

-Dispatcher-Server

Communication: Client Dispatcher Server^ „^ Provides adispatcher

component to act as an intermediate layer betweenp p^

y

clients^ andservers. The dispatcher^ ^ implements a name service that allows clients to refer to servers by namesinstead of physical locations, thus providing location transparency, andinstead of physical locations, thus providing location transparency, and^ ^ is responsible for establishing the communication channel between a client anda server. „ Before sending a request to a server, the client

asks the dispatcher for a

communication channel.^ ^ The client uses this channel to communicate with the server.A^ id^

t^ f^ ti^ t

li^ t „^ A^ server provides a set of operations to clients.^ ^ It either registers itself or is registered with the dispatcher by its name andaddress.Department of Computer Engineering

19

Sharif University of Technology

Patterns in Software Engineering – Lecture 9 Communication: Client-Dispatcher-Server – Structure

p Department of Computer Engineering

20

Sharif University of Technology