Design Patterns http://www.flickr.com/photos/ajari/2287240221/sizes/l/

Slides:



Advertisements
Similar presentations
1 Dynamic Proxies Explained Simply. 2 Dynamic Proxies License Copyright © 2008 Ciaran McHale. Permission is hereby granted, free of charge, to any person.
Advertisements

B USINESS I MPROVEMENT S TRATEGY O VERVIEW Chris Coles V1.04 provided by
IMPORTANT READ CAREFULLY BEFORE USING THIS PRODUCT LICENSE AGREEMENT AND LIMITED WARRANTY BY INSTALLING OR USING THE SOFTWARE, FILES OR OTHER ELECTRONIC.
Design Patterns
Jul The New Geant4 License J. Perl The New Geant4 License Makes clear the user’s wide- ranging freedom to use, extend or redistribute Geant4, even.
3/5/2007 Copyright Notice COPYRIGHT © 2007 THE REGENTS OF THE UNIVERSITY OF MICHIGAN ALL RIGHTS RESERVED PERMISSION IS GRANTED TO USE, COPY, CREATE DERIVATIVE.
BIAF Print Label software setup
Education’s Value Proposition MARK ZANDI, CHIEF ECONOMIST FROM MOODY’S ECONOMY.COM.
Content Management Systems …mostly Umbraco ALL ABOUT.
FPGA and ASIC Technology Comparison - 1 © 2009 Xilinx, Inc. All Rights Reserved How do I Get Started with PlanAhead?
Design Patterns.
STATUS UPDATE EM SUBCOMMITTEE Friedrich Roth, EM subcommittee chairman SEG 2012, Las Vegas Technical Standards Committee meeting.
Using HTML/JavaScript/AJAX in Workflow Presented by: Mike Gostomski & Alison Nimura Portland State University March 21, 2011 Session ID 3742.
X3D Graphics for Web Authors X3D-Edit Update SIGGRAPH 2008 Don Brutzman Naval Postgraduate School Monterey California USA.
17-1 JXTA Developer and Business Resources Module Objectives ● Understand JXTA's Open Source Model ● Learn how to get involved at jxta.org ● Learn.
Blue Diamond Scott Auge Amduus Information Works, Inc.
Digital Intuition Cluster, Smart Geometry 2013, Stylianos Dritsas, Mirco Becker, David Kosdruy, Juan Subercaseaux Setup Instructions Overview 1. License.
Andrew McNab - License issues - 10 Apr 2002 License issues for EU DataGrid (on behalf of Anders Wannanen) Andrew McNab, University of Manchester
Hayabusa K2-K7 ECU Reflashing and Engine data Interfaces
Resume Builder Todd Abel, Microsoft Copyright Notice © 2003 Microsoft Corporation. All rights reserved.
Permission to reprint or distribute any content from this presentation requires the prior written approval of Standard & Poor’s. Copyright © 2014 by Standard.
Design Patterns CSCI 5801: Software Engineering. Design Patterns.
Design Patterns
Software Design Patterns (1) Introduction. patterns do … & do not … Patterns do... provide common vocabulary provide “shorthand” for effectively communicating.
Design Patterns
International Telecommunication Union New Delhi, India, December 2011 ITU Workshop on Standards and Intellectual Property Rights (IPR) Issues Philip.
Design Patterns CSIS 3701: Advanced Object Oriented Programming.
Changing Databases This presentation gives a quick overview on how to change databases in Osprey.
National Alliance for Medical Image Computing Licensing in NAMIC 3 requirements from NCBC RFA (paraphrased)
Legal Disclaimers Accuracy Every effort is made to provide information that is accurate. However any information contained in this website or the “article.
Design Patterns
Digital Intuition Cluster, Smart Geometry 2013, Stylianos Dritsas, Mirco Becker, David Kosdruy, Juan Subercaseaux Search Basics – Templates Tutorial Overview.
1 Certification Program User Management 01 - Roles.
Android Storage MAY 2013 Hu.Cai. NAME OF PRESENTATION [CHANGE IN SLIDE MASTER] MONTH, YEAR [CHANGE IN SLIDE MASTER] Outline 1.Storage In General 2.SharedPreferences.
Ideas about Evolution. Activity 14: Ideas about Evolution LIMITED LICENSE TO MODIFY. These PowerPoint® slides may be modified only by teachers currently.
Permission to reprint or distribute any content from this presentation requires the prior written approval of Standard & Poor’s. Copyright © 2011 Standard.
The secure site rendering issue (all navigation crushed together as a list at the top of the page) is a compatibility issue with Internet Explorer only.
1 Designing and using normalization rules Yoel Kortick Senior Librarian, Ex Libris.
1 Export E-Inventory Job. 2 Copyright Statement All of the information and material inclusive of text, images, logos, product names is either the property.
1 Combining two subject areas in an Alma Analytics Report Yoel Kortick Senior Librarian.
Evidence from the Fossil Record. Activity 6: Evidence from the Fossil Record LIMITED LICENSE TO MODIFY. These PowerPoint® slides may be modified only.
Connectivity to bank and sample account structure
Schedule & effort
To synchronize subtitles in linear time!
Chapter 10 Design Patterns.
Chapter 5:Design Patterns
Design Patterns Lecture part 2.
Evaluating Requirements
Introduction to Design Patterns
Continuous improvement
Presenter: Yoel Kortick
Evaluating Architectures
Agile
Comparative Law of Licenses and Contracts in the US, UK and EU
5) Debugging and error trapping
Design Patterns
Automation in an XML Authoring Environment
Self-Registration walk-through
ARC – מחולל הדוחות של Aleph
Motivation for 36OU Open Rack
Diagram Notations
Paper Prototyping
Software Architecture
Individuals and interactions
Customer collaboration
Chapter 5 Architectural Design.
Requirements
BEMS user Manual Fundación cartif.
2019 MEDICARE AGE-IN STUDY SENIOR MARKET INSIGHTS SERVICE Part IV
Presentation transcript:

Design Patterns http://www.flickr.com/photos/ajari/2287240221/sizes/l/

<Patterns> You need to hang a poster on the wall… What do you do? You need to write a term paper… How should it be organized?

Design Patterns Design patterns (DPs) are… Design patterns are not… Strategies for your “toolkit of ideas” Templates for solutions Codified best practices Design patterns are not… Architectural styles (DPs are too low level) Code libraries (DPs are ideas, not code)

Design Patterns Primary goals of DPs To aid maintainability, flexibility, other quality attributes To help system designers make good decisions There are a few dozen very common OO patterns Patterns exist for other kinds of non-OO systems. Patterns are recognizable based on their structure and their purpose.

Example system Kiva system to connect lenders with borrowers How could we use DPs to implement Kiva? How could we use DPs to implement a better Kiva???

Builder TeamReviewScreenBuilder +generateHtml() Knows how to create a complex object Use when instantiating an object requires filling it with parts or otherwise lengthy configuration TeamReviewScreen SearchSection CategoryFilterSection TeamTable TeamHeading TeamRow + image + name + creation date + # members + # loans + total loaned + Join button TeamInfo + link + category

Adapter PaymentProcessor + pay($ amount) Converts one interface to another by wrapping Use to overcome incompatibility CreditCardPaymentAdapter + pay($ amount) .netCharge component + issueCharge($ amount, timeout) Remote credit card gateway

Facade PaymentProcessor + pay($ amount) Object that provides a unified, high-level interface to a subsystem Use when calling a subsystem requires a frequent series of complex lines of code CreditCardPaymentAdapter + pay($ amount) .netCharge component + issueCharge($ amount, timeout) GatewayProxy ComponentLicense GatewayRequest Remote server RequestConfiguration + timeout + URL + HTTP client certificate

Memento Encapsulate state in an object Use if you might want to return to a certain state later BlogEntryEditor UndoRedoManager BlogEntry + StoreToHtmlMemento() + ReloadFromHtmlMemento() HtmlMemento + html

Interpreter Parses and acts on instructions written in a certain syntax Use to add scriptability LoanRequestServer + listAll() + makeLoan() AutoLoanInterpreter + interpret(script) AutoLoanScript + instructions

Observer Loan + RegisterForRepayEvent() + RegisterForDefaultEvent() + UnregisterForRepayEvent() + UnregisterForDefaultEvent() FireRepayEvent() FireDefaultEvent() Watching for another object to change state Use in any event-driven design LoanListener + OnRepayEvent() + OnDefaultEvent() AutoLoanInterpreter + interpret(script) LoanRequestServer + listAll() + makeLoan() AutoLoanScript + instructions

Which pattern would you use? You are building a cool 3D game. Your company licenses a big, ugly library that implements the 3D mathematics. Builder Memento Adapter Interpreter Façade Observer

Which pattern would you use? Your application might crash at any time. You want your application to save its state so that if it crashes, then it can auto-recover. Builder Memento Adapter Interpreter Façade Observer

Which pattern would you use? Your application should run after any student uploads a homework to Blackboard. Builder Memento Adapter Interpreter Façade Observer

Which pattern would you use? Your application needs to generate PDF files (from scratch). Builder Memento Adapter Interpreter Façade Observer

Which pattern would you use? You want to let users create and run macros inside your application. Builder Memento Adapter Interpreter Façade Observer

Which pattern would you use? Your company already implemented a component that almost implements the interface that you need, but not quite. Builder Memento Adapter Interpreter Façade Observer

Which pattern would you use? You have a component that needs to implement three very slightly different interfaces. Builder Memento Adapter Interpreter Façade Observer

Which pattern would you use? Your program has to create some big, ugly record objects before inserting them into a database. Builder Memento Adapter Interpreter Façade Observer

Which pattern would you use? Your program has to support replication. You need a way for the program to save its state so the program can be copied to other servers. Builder Memento Adapter Interpreter Façade Observer

Which pattern would you use? Your program generates various outputs. You need a way to notify Facebook users when certain outputs are generated. Builder Memento Adapter Interpreter Façade Observer

Which pattern would you use? Sending a message to Facebook requires lots of big, ugly code. Builder Memento Adapter Interpreter Façade Observer

For more info Your textbook discusses seven other patterns Template method Factory method Strategy Decorator Observer Composite Visitor

Next for you If you have questions… Finish HW4 Start HW5 Your textbook discusses a few DPs in detail Wikipedia has good articles on all 23 primary DPs Finish HW4 Start HW5 Revise your vision statement! (due in 1 week) Or write a new one!!!

Copyright (c) Christopher Scaffidi 2009 All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of Oregon State University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Modified by Scott D. Fleming <Scott.Fleming@memphis.edu> 2011.