James Tam Introduction To Design Patterns You will learn about design techniques that have been successfully applied to different scenarios.

Slides:



Advertisements
Similar presentations
BY MAULIK PATEL CED, GPERI Computing Architecture.
Advertisements

GoF State Pattern Aaron Jacobs State(305) Allow an object to alter its behavior when its internal state changes. The object will appear to change its class.
Introduction To Design Patterns You will learn about design techniques that have been successfully applied to different scenarios.
SE2811 Week 7, Class 2 The Gang of Four and more … Lab Thursday: Quiz SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr. Yoder.
James Tam Introduction To Design Patterns You will learn about design techniques that have been successfully applied to different scenarios.
Design Patterns Yes, they are important Robert Cotton April 23, 2009.
Introduction To System Analysis and Design
05/26/2004www.indyjug.net1 Indy Java User’s Group June Knowledge Services, Inc.
Fundamentals of Software Development 1Slide 1 Gang of Four The beginnings… The original “patterns” idea was from architecture – there are repeatable patterns.
Design of Web-based Systems IS Development: lecture 10.
1 SWE Introduction to Software Engineering Lecture 22 – Architectural Design (Chapter 13)
Introduction to Design Patterns (1). “ In software engineering, a design pattern is a general reusable solution to a commonly occurring problem in software.
OOHDM Hypermedia Research Work Designing Web-based applications with Object Oriented Hypermedia Design Method OOHDM.
Spring 2010CS 2251 Design Patterns. Spring 2010CS 2252 What is a Design Pattern? "a general reusable solution to a commonly occurring problem in software.
Adapters Presented By Zachary Dea. Definition A pattern found in class diagrams in which you are able to reuse an ‘adaptee’ class by providing a class,
Façade Design Pattern Source: Design Patterns – Elements of Reusable Object- Oriented Software; Gamma, et. al.
PRESENTED BY SANGEETA MEHTA EECS810 UNIVERSITY OF KANSAS OCTOBER 2008 Design Patterns.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
Introduction To System Analysis and design
Design Patterns Alan Shalloway, James Trott, Design Patterns Explained, Addison-Wesley, Gamma, Helm, Johnson, Vlissides, Design Patterns, Elements.
MVC pattern and implementation in java
MVC and MVP. References enter.html enter.html
Software Design Refinement Using Design Patterns Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Implementing Design Patterns Using Java St. Louis Java Special Interest Group Eric M. Burke Object Computing, Inc. Presented on July 9, 1998 (updated July.
An Introduction to Software Architecture
Introduction to Design Patterns (1). Definition: “ In software engineering, a design pattern is a general reusable solution to a commonly occurring problem.
 Chapter 6 Architecture 1. What is Architecture?  Overall Structure of system  First Stage in Design process 2.
ISP666 MVC & Design Patterns. Outline Review Event Programming Model Model-View-Controller Revisit Simple Calculator Break Design Patterns Exercise.
DaveAndAl.net Do Application Design Patterns Make Sense in ASP.NET? Alex Homer You may like to write these down now...
Aniruddha Chakrabarti
BTS430 Systems Analysis and Design using UML Design Patterns.
Patterns in programming 1. What are patterns? “A design pattern is a general, reusable solution to a commonly occurring problem in software. A design.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 27. Review UML dynamic view – State Diagrams.
CS 325: Software Engineering February 12, 2015 Applying Responsibility-Assignment Patterns Design Patterns Situation-Specific Patterns Responsibility-Assignment.
James Tam Introduction To Design Patterns You will learn about design techniques that have been successfully applied to different scenarios.
(c) University of Washington08-1 CSC 143 Models and Views Reading: Ch. 18.
Software Design Patterns (1) Introduction. patterns do … & do not … Patterns do... provide common vocabulary provide “shorthand” for effectively communicating.
05/26/2004www.indyjug.net1 Indy Java User’s Group May Knowledge Services, Inc.
CS 160: Software Engineering October 22 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
University of Toronto at Scarborough © Kersti Wain-Bantin CSCC40 system architecture 1 after designing to meet functional requirements, design the system.
Framework for Virtual Web Laboratory I. Petković M. Rajković.
12 Chapter 12: Advanced Topics in Object-Oriented Design Systems Analysis and Design in a Changing World, 3 rd Edition.
Design Patterns. 1 Paradigm4 Concepts 9 Principles23 Patterns.
Concordia University Department of Computer Science and Software Engineering Click to edit Master title style ADVANCED PROGRAMMING PRACTICES Model View.
Chapter 3 JSP Overview. The Problem with Servlets processing the request and generating the response are both handled by a single servlet class Java programming.
Game Programming Patterns From the book by Robert Nystrom
Architecture, Design Patterns and Faithful Implementation David Woollard University of Southern California Software Architecture Group NASA Jet Propulsion.
Java Programming, 3e Concepts and Techniques Chapter 1 Section 56 – An Introduction to Java.
Presented by Alexey Vedishchev Developing Web-applications with Grails framework American University of Nigeria, 2016 Intro To MVC Architecture.
Design Patterns CSCE 315 – Programming Studio Spring 2013.
Introduction To Design Patterns
Design Patterns Source: “Design Patterns”, Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides And Created.
Software Design Refinement Using Design Patterns
The Object-Oriented Thought Process Chapter 15
MPCS – Advanced java Programming
Pertemuan 08 Design Patterns & Anti-Patterns
Design Patterns Introduction
Introduction To Design Patterns
Instructor: Dr. Hany H. Ammar
#01 Client/Server Computing
Model-View-Controller Patterns and Frameworks
DESIGN PATTERNS : Introduction
System Analysis and Design
Introduction to Design Patterns
Design Patterns Imran Rashid CTO at ManiWeber Technologies.
Introduction To Design Patterns
Introduction To Design Patterns
#01 Client/Server Computing
Presentation transcript:

James Tam Introduction To Design Patterns You will learn about design techniques that have been successfully applied to different scenarios.

James Tam What Is A Design Pattern? A general and reusable solution to a commonly occurring problem in the design of software. IT IS NOT a finished algorithm that can be directly translated into program code. IT IS a template for how to solve a problem that has been used in many different situations. Object-Oriented design patterns show interactions between classes and objects without the specific the program code that implements the pattern.

James Tam Origin Of Design Patterns The foundation for design patterns come from the original patterns specified in the book “ Design Patterns: Elements of Reusable Object-Oriented Software ” Authors: “The gang of four” (Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides). Although examples of the patterns were provided in C++ and SmallTalk the patterns can be applied to any Object- Oriented language.

James Tam Monitor (Synchronization) Pattern In terms of concurrent programming a monitor is an object that can be used by more than one thread. Synchronization occurs by allowing only one thread to access the monitor (and therefore the methods of the object) at a time. The mutually exclusive nature of access to the monitor greatly simplifies the logic required.

James Tam The Model-View-Controller Pattern 1 Sometimes the same data may have to be accessed under different contexts e.g., powerful desktop, web, mobile device. Each context may require a different interface (e.g., web page on a mobile device, software on a computer). Even within an interface there may be a desire to see different views of the data e.g., financial analysts may want to see details (spreadsheet and/or financial statement) whereas the shareholders or management may focus on overview views (graphs) 1 Some additional sources that describe the model-view controller pattern: I.Sun Microsystems: II.Microsoft:

James Tam The Model-View-Controller Pattern 1 With this pattern the logic required to maintain the data is separated (database, text file) from how the data is viewed (graph, numerical) vs. how the data can be interacted with (GUI, command line). Model State (data) View Display of data Interface Controller Event handling State change State query Change notification User interaction View selection

James Tam Model-View Controller Pattern (2) With many client applications the view and the controller may be viewed as one entity. With web-based applications the view and the controller may be very well defined: –View: client browser program –Controller: the server side applications that handle the web requests

James Tam Model-View-Controller Pattern (3) Implementing different parts that are decoupled (minimized dependencies) provides many benefits: –One part may be changed independent of the other parts e.g., updates to the interface can have minimal impact on the data. –It’s seldom that one person will have a deep understanding of all parts (e.g., knowledge of Accounting to create the financial statements vs. knowledge of web design to create the web interface). Different people with different areas of expertise can work on the different parts. –One version of the data can be created and maintained and as needed different ways of interacting and viewing data can be developed.

James Tam You Should Now Know What is a design pattern How two example design patterns work