Introduction to Design Patterns The history of patterns Architecture and Software.

Slides:



Advertisements
Lignende præsentationer
Social media marketing: Position of the Nordic Consumer Ombudsmen EU Consumer Summit 1 and 2 April 2014 Henrik Øe Consumer Ombudsman Denmark.
Advertisements

VIS HJÆLPELINJER SOM ER EN HJÆLP VED PLACERING AF LOGO: 1.Højreklik på den aktuelle side og vælg ’gitter og hjælpelinjer’ 2. Sæt kryds ved ’Vis’ tegnehjælpelinjer.
Indsæt nyt billede: Format: B 254 x 190,5 mm Efter indsættelse, højreklik på billedet og placér det bagerst. Delete det gamle foto Legal aid in Denmark.
Teknik og Miljø - Planlægning og Byggeri Aarhus Kommune •Flemming Meyer •Master of Law, Special Consultant •Municipality of Aarhus •Department of employment.
Indsæt nyt billede: Format: B 254 x 190,5 mm Efter indsættelse, højreklik på billedet og placér det bagerst. Delete det gamle foto New production system.
Vejledning om videregående uddannelser Studievalg.
Dagens program  Emne: Tim Berners-Lees WWW koncept og deraf følgende innovationer Forbered hver for sig Præsenter og diskutér i grupper Fremlæggelse med.
Danmarks Ishockey Union Idrættens Hus Brøndby Stadion 20 DK-2605 Brøndby Phone: Fax: website:
Head Project Management-gruppe. Stakeholder contracting & Gode rapporteringsformer.
Titel og undertitel skal stå med store bogstaver (Versaler) og skal holdes indenfor de to vandrette grå linjer. Der kan frit vælges farver fra farvepaletterne.
Overskrift her Navn på oplægsholder Navn på KU- enhed For at ændre ”Enhedens navn” og ”Sted og dato”: Klik i menulinjen, vælg ”Indsæt” > ”Sidehoved / Sidefod”.
Overskrift her Navn på oplægsholder Navn på KU- enhed For at ændre ”Enhedens navn” og ”Sted og dato”: Klik i menulinjen, vælg ”Indsæt” > ”Sidehoved / Sidefod”.
Overskrift her Navn på oplægsholder Navn på KU- enhed For at ændre ”Enhedens navn” og ”Sted og dato”: Klik i menulinjen, vælg ”Indsæt” > ”Sidehoved / Sidefod”.
Tekst starter uden punktopstilling For at få punkt- opstilling på teksten, brug forøg indrykning For at få venstre- stillet tekst uden punktopstilling,
Unit 1 English Summative Assessment, Poem
SOME eller ANY Joan Neesgaard Continue Tryk på F5-tasten for at starte! og derefter Continue…
Overskrift her Navn på oplægsholder Navn på KU- enhed For at ændre ”Enhedens navn” og ”Sted og dato”: Klik i menulinjen, vælg ”Indsæt” > ”Sidehoved / Sidefod”.
Overskrift her Navn på oplægsholder Navn på KU- enhed For at ændre ”Enhedens navn” og ”Sted og dato”: Klik i menulinjen, vælg ”Indsæt” > ”Sidehoved / Sidefod”.
Magtteori I 7. September 2005.
Indsæt nyt billede: Format: B 254 x 190,5 mm Efter indsættelse, højreklik på billedet og placér det bagerst. Delete det gamle foto Model-Driven Development.
Self-Organizing Criticality. Definition of Innovation In an abstract, systems-theoretical approach, innovation can be understood as a critical event which.
Portfolio. Portfolio – what? Portfolio is used in more ways –Product or presentation –Process –Learning –Evaluation Often we distinguish between a learning.
Medialogy Learning Spaces in Copenhagen What do we want ? What can we do ? Possibilities and concerns.
Database Normalization without Mathmatics
Design dokument Agenda Intro Guidelines for the Game Concept Guidelines for the Game Proposal Guidelines Functional specification Kilde: Ryan, Tim (1999).The.
Overskrift her Navn på oplægsholder Navn på KU- enhed For at ændre ”Enhedens navn” og ”Sted og dato”: Klik i menulinjen, vælg ”Indsæt” > ”Sidehoved / Sidefod”.
PUMA kursus - ekstern finansiering 2011 Slide 1 For at ændre ”Enhedens navn” og ”Sted og dato”: Klik i menulinjen, vælg ”Vis” > ”Sidehoved / Sidefod”.
And so this is Christmas And what have you done Another year is over And a new one just begun And so this is Christmas I hope you have fun The near and.
Microsoft Solutions for Management Peter Colsted Direktør Enterprise & Partner Group Microsoft Danmark.
02/09/2014 Sygefravær v/Jesper Johansen Director People & Organisation Europe Title slide Edit: Add presentation title and speaker(s). Editing slides in.
Kulturstudier M, KA Art Worlds Hvem skaber kunsten?
”Men hvis aftalen mellem EU og USA kommer i stand, bliver sådan en handel billigere for de danske forbrugere, siger handelsminister Pia Olsen Dyhr. - Jeg.
Overskrift her Navn på oplægsholder Navn på KU- enhed For at ændre ”Enhedens navn” og ”Sted og dato”: Klik i menulinjen, vælg ”Indsæt” > ”Sidehoved / Sidefod”.
Overskrift her Navn på oplægsholder Navn på KU- enhed For at ændre ”Enhedens navn” og ”Sted og dato”: Klik i menulinjen, vælg ”Indsæt” > ”Sidehoved / Sidefod”.
Litteratursiden / forfattere / anmeldelser / analyser / lister / temaer / læseklubber / video / brugere Digital communication of performance literature.
CUSTOMER JOURNEYS 12/9.
Delprøve 1, december 2011.
Presentation 27: Comparison of technologies Objektorienteret Middleware.
1 Welcome! The search process:  How to handle the search process (strategies)  Transform your topic into search terms  Search techniques  how to use.
Overskrift 40/42 pkt, Maks 2 linjer Underoverskrift, 14/16 pkt For at vise hjælpelinjer: 1.Højreklik på slidet og vælg “Gitter og hjælpelinjer” 2.Kryds.
Magistrenes Arbejdsløshedskasse side 1 Welcome to MA Odense.
Linking international students and Danish businesses.
Agenda 1.Informationer 1.Excel i fb.m. projekt 2 2.Reserver tid til projekt 2 3.Øvelse: a / b = c 2.Opsamling fra sidst 3.Estimation (konfidensintervaller)
LÆR FOR LIVET NORDIC FOSTER CARE ASSOCIATION Rødovre 6. september 2014.
Velkommen til Datamatikkeruddannelsen Roskilde Handelsskole Advanced Computer Study.
KLAR TIL NYE MULIGHEDER
For at ændre ”Enhedens navn” og ”Sted og dato”: Klik i menulinjen, vælg ”Indsæt” > ”Sidehoved / Sidefod”. Indføj ”Sted og dato” i feltet for dato og ”Enhedens.
Nyt tværfagligt innovations tilvalgskursus på DTU Diplom Vil du bruge din faglighed i tværdisciplinært samarbejde med ingeniørstuderende fra andre retninger?
Reliable Architecture Ved Henrik Bærbak Christensen Reflective Architectures Emne: reflective architecture overview 11 december 2009.
Stil og smag John Paulin Hansen WEB 1, ITU, marts 2000.
Tekstslide i punktform Rubrik, helst 1 linje Brug ”Forøg/Formindsk indryk” for at få de forskellige niveauer frem Danish Standards  Signe Annette Boegh.
Overskrift her Navn på oplægsholder Navn på KU- enhed For at ændre ”Enhedens navn” og ”Sted og dato”: Klik i menulinjen, vælg ”Indsæt” > ”Sidehoved / Sidefod”.
Interview service in Statistics Denmark Structure and Surveys.
OPERATIONEL ANALYSE AF WEBADFÆRD OAW – LEKTIONSGANG 4.
ANALYSE AF WEBADFÆRD - OAW OAW – LEKTIONSGANG 4. ANALYSE AF WEBADFÆRD - OAW SUMMARY, LECTURE 3 (Extended) Common Log File Format Host, Ident, Authuser,
“Planning the agenda for teaching and learning Danish - 1. And 2. grade”
Mikkel deMib Svendsen Duplicate Content & Multiple Site Issue Mikkel deMib Svendsen
Underoverskrift 17 pkt bold hvid Maks. 2 linjer med respekt for evt logo Indsæt billede >Klik på billedikonet og indsæt billede Efter indsættelse >Højreklik.
Compositional Design Principles “SemiCiv”
MaaS i Europe Rasmus Lindholm.
Designmønstre Baggrund og eksempler Michael E. Caspersen
The Effects of Depressants on the Pulse Rate of Lumbriculus Variegatus
Meet Asfiya Asfiya is a proud caregiver to her mother Adeela. Her mother lived with her before the stroke. Other than some small aches and pains, Adeela.
Physics 4: Atomic Structure
LionSpaceFIS Reports Space Manager Running Reports in Space Manager
Structure and Organization in Interpretation of Literature Essays
CS 3800 Switch/Router Lab Project Introduction
The Nested Splat! Series
A Constitutional Monarchy, Parliamentary Democracy, & Federation
Scientific Method – Steps 1-2
Præsentationens transcript:

Introduction to Design Patterns The history of patterns Architecture and Software

© Henrik Bærbak Christensen2 What is a valve? En vandhane er egentlig en ventil af den type, som benævnes en sædeventil. Figuren viser hvilke foranstaltninger man tager for at gøre den tæt. (a) er det i ventilhuset fastsiddende sæde, (b) en flad eller konisk pakning. (c) og (d) pakninger mellem spindel og ventilhus (A) Skitsen viser en sædeventil med åbning for væskepassage (1) og ventilkegle (2), der undertiden er plan som her vist. (B) er en dobbelt sædeventil, hvor en vis kompensation i sædebevægelsen kan opnås. (C) viser en Butterfly-ventil med et drejeligt spjæld, der ved åben ventil står parallel med strømningsretningen. På (D) ses en kuglehane med kugleformet told hvorigennem væsken strømmer.

© Henrik Bærbak Christensen3 Or a pump? 1. Sugepumpe med stempel (a). Ventilerne b og c åbner og lukker sig, efter som stemplet føres op eller ned. Når stemplet hæves, fortyndes luften under det, og vandet suges op i sugerøret. 2. Sugepumpe med dykkerstempel (a) og vindkedel (b). Vindkedelen forhindrer, at vandstrålen strømmer ud stødvis; luften i vindkedelen bliver sammenpresset og trykker bagefter vandet ud som en jævn strøm. 3. Tandhjulspumper anvendes mest som oliepumper. 4. Centrifugalpumpen er en strømningsmaskine, hvori et motordrevet, roterende skovlhjul (a) tilfører bevægelsesenergi til væsken, der tilledes aksialt og slynges udefter af centrifugalkraften. I et spiralformet pumpehus (b) omsættes bevægelsesenergien til tryk.

© Henrik Bærbak Christensen4 Architectural Patterns Christopher Alexander –Notes on the Synthesis of Form (1964) –The Oregon Experiment (1975) –A Pattern Language: Towns, Buildings, Constructions (1977) –The Timeless Way of Building (1979) 253 patterns for regions, cities, towns, neighborhoods, transport, home, offices, worksites, rooms, lightening, windows, gardens, waiting rooms, wall,... A quality without a name

© Henrik Bærbak Christensen5 Christopher Alexander Each pattern describes a problem which occurs over and over again in our envi- ronment, and then descri- bes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice. Christopher Alexander worked on planning towns and buildings, but the definition works just as well for object-oriented patterns. In software the solution is expressed in terms of objects, roles, interfaces, and collaboration patterns instead of windows, doors and walls, but the contents of a patter is always: A solution to a problem in a context

© Henrik Bærbak Christensen6 ‘Alcoves’: One of Alexander’s patterns 179. Alcoves **... many large rooms are not complete unless they have smaller rooms and alcoves opening off them.  No homogeneous room, or homogeneous height, can serve a group of people well. To give a group a chance to be together, as a group, a room must also give them the chance to be alone, in one’s and two’s in the same space. This problem is felt most acutely in the common rooms of a house – the kitchen, the family room, the living room. In fact it is so critical there, that the house can drivee the family apart when it remains unsolved... In modern life, the main function of a family is emotional; it is a source of security and love. But these qualities will only come into existence if the members of the house are physically able to be together as a family. This is often difficult. The various members of the family come and go at different times of day; even when they are in the house, each has his own private interests... To solve the problem, there must be some way in which the members of the family can be together, even when they are doing different things. Therefore: Make small places at the edge of any room, usually no more than 6 feet wide and 3 to 6 feet deep and possibly much smaller. These alcoves should be large enough for two people to sit, chat, or play and sometimes large enougf to contain a desk or table.  Give the alcove a ceiling which is markedly lower than the ceiling height in the main room... (Alexander, 1977)

© Henrik Bærbak Christensen7 From architecture to software OOPSLA Ward Cunningham & Kent Beck: Using Pattern Languages for Object-Oriented Programs (1987) Bruce Andersen, GoF, Jim Coplien, Doug Lea, Desmond D’Souza, Norm Kerth, Wolfgang Pree (Workshops, ) The Hillside Group (Colorado, August 1993, April 1994) Kent Beck and Grady Booch,..., PLoP GoF: Design Patterns (1994)... and the ball got rolling...

Contents of a pattern

© Henrik Bærbak Christensen9 A Pattern is really just a writing template – a particular style of literature Name Problem Solution Consequences

© Henrik Bærbak Christensen10 Name A name is a handle that allows us in a simple word or two to describe the whole idea: a design problem, its solution and consequences of using it. Naming a pattern augments our vocabulary and allow us to design at a higher level of abstraction Naming allows communication: discussing the appropriateness of some design solution with colleagues as well as referring to it in documents. NameProblemSolutionConsequences

© Henrik Bærbak Christensen11 Problem The problem describes situations where the pattern may be used, and describes the problem in its context. Often there are some conditions that must be fulfilled before the pattern is relevant. GoF crystallized the problem in a single or two short sentences denoted the pattern’s intent NameProblemSolutionConsequences

© Henrik Bærbak Christensen12 Solution The solution describes the elements in the design, their relations and collaboration patterns. Usually described using UML, pseudo code, prose... It does not describe a specific, concrete design or implementation but rather how certain roles are structured and/or interact with each other. Thus the solution is general. A pattern is a template that may be applied in many different situations. “... you can use this solution a million times over, without ever doing it the same way twice.” NameProblemSolutionConsequences

© Henrik Bærbak Christensen13 Consequences Consequences describes the result of using a pattern: benefits and liabilities. These are very important to consider when evaluating design alternatives. That a pattern can be applied is not necessarily the same as it should! Applying any patterns will almost always influence the architecture’s quality attributes: Performance, usability, modifiability, cost, roll- out-schedule, etc. NameProblemSolutionConsequences

© Henrik Bærbak Christensen14 Example: Strategy from RFSE More elements are usually present, but the basic four literary elements are present.

© Henrik Bærbak Christensen15 Two Definitions Software view: “what it is + why” Prose view: “how it is captured”

© Henrik Bærbak Christensen16 Example: Dating Patterns Fifth Position Break –You want to easily find women and create sessions by exposing desirable services and attributes. Pan-Dimensional Renaissance Differentiator –You want women to admire and notice you Jini Singles Bar –You want to create stateful session with a designated peer but you don’t know the name or address for suitable contenders of peer-to-peer networking Half Bad Boy Plus Protocol –You want to compete with dangerous, nonsecure Bad Boy implementations whose services are viewed as more desirable.

© Henrik Bærbak Christensen17 Summary Patterns are (name, problem, solution, consequence) writing templates. Provides –language –best practices