Spring til indhold

Design pattern

Fra Wikipedia, den frie encyklopædi
(Omdirigeret fra Design patterns)

Software Design Pattern eller designmønster er en generel løsning på en problemtype, der ofte opstår i softwareudvikling. Et design pattern er ikke et endeligt design, der kan programmeres direkte; det er en beskrivelse eller skabelon for, hvordan man løser et problem i mange forskellige situationer. En algoritme betragtes ikke som et design pattern, eftersom den løser et beregningsproblem og ikke et designproblem.[1][2]

Ideen om Design patterns menes at skyldes Christopher Alexander, der i 1973 beskrev 274 mønstre, der var nyttige inden for arkitektur. I 1987 begyndte Kent Beck og Ward Cunningham at eksperimentere med at anvende mønstre i forbindelse med programmering og fremlagde deres resultater på OOPSLA, der er en årlig konference om objektorienteret softwareudvikling.[3][4]

Design patterns blev for alvor populære, efter at bogen Design Patterns: Elements of Reusable Object-Oriented Software udkom i 1994 på forlaget Addison-Wesley Professional.[5]

  1. ^ cs.lmu.edu: Ray Toal: Design Patterns Citat: "...Design Patterns are not analysis patterns, are not descriptions of common structures like linked lists, nore are they detailed application or framework designs. Design Patterns are "descriptions of communicating objects and classes that are customized to solve a general design problem in a particular context." -- Gamma et al. [ Design Patterns: Elements of Reusable Object-Oriented Software ISBN 978-0201633610 ]..."Each pattern describes a problem which occurs over and over again ... and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without doing it the same way twice." -- Christopher Alexander [ en:Christopher Alexander ]...", backup
  2. ^ July 24, 2019, freecodecamp.org: #Design Patterns The 3 Types of Design Patterns All Developers Should Know (with code examples of each)Citat: "...Design patterns are design level solutions for recurring problems that we software engineers come across often. It’s not code - I repeat, ❌CODE. It is like a description on how to tackle these problems and design a solution. Using these patterns is considered good practice, as the design of the solution is quite tried and tested, resulting in higher readability of the final code. Design patterns are quite often created for and used by OOP Languages, like Java, in which most of the examples from here on will be written...There are about 26 Patterns currently discovered (I hardly think I will do them all…). These 26 can be classified into 3 types:...", backup
  3. ^ Smith, Reid (oktober 1987). Panel on design methodology. OOPSLA '87 Addendum to the Proceedings. doi:10.1145/62138.62151. Ward cautioned against requiring too much programming at, what he termed, 'the high level of wizards.' He pointed out that a written 'pattern language' can significantly improve the selection and application of abstractions. He proposed a 'radical shift in the burden of design and implementation' basing the new methodology on an adaptation of Christopher Alexander's work in pattern languages and that programming-oriented pattern languages developed at Tektronix has significantly aided their software development efforts.
  4. ^ Beck, Kent; Cunningham, Ward (september 1987). Using Pattern Languages for Object-Oriented Program. OOPSLA '87 workshop on Specification and Design for Object-Oriented Programming. Hentet 2006-05-26.
  5. ^ Gamma, Erich; Helm, Richard; Johnson, Ralph; Vlissides, John (1995). Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley. ISBN 978-0-201-63361-0.


Spire
Denne artikel om software og programmering er en spire som bør udbygges. Du er velkommen til at hjælpe Wikipedia ved at udvide den.