TDDB84 Design Patterns
The course literature consists of online resources and scientific papers, as well as a reference textbook on Design Patterns:
Below is a list literature you can read in order to prepare for the seminars. During the course you might also need to search for additional information on your own. For this you could use the online search engines of LiU , Google Scholar or other search tools for scientific papers that you are familiar with.
Exam seminars have a number of required reading material that you need to read in order to prepare for the seminar. In the list below this material is marked in red text. For lab seminars the only requirement is that you have done the labs.
Understanding design patterns
No required reading material
Mainly the course book, see above.
History of design patterns:
- Kent Beck and Ward Cunningham. Using pattern languages for object-oriented programs . Technical Report CR-87-43, Tektronix, Inc., September 17, 1987. Presented at the OOPSLA'87 workshop on Specification and Design for Object-Oriented Programming.
- E. Gamma, R. Helm, R. Johnson, J. Vlissides. Design Patterns: Abstraction and Reuse of Object-Oriented Design . European Conference on Object Oriented Programming ECOOP 97 LNCS 707, Springer, 1993
- Christopher Alexander's talk at the 1996 ACM Conference on Object-Oriented Programs, Systems, Languages and Applications (OOPSLA). The Origins of Pattern Theory the Future of the Theory, And The Generation of a Living World.
To prepare for the seminar you need to do the labs
See Understanding design patterns
Design patterns and software qualities
SOLID is an acronym for a set of design principles in object-oriented design of software. The Wikipedia description of SOLID is good, but you might also need to find examples of violations of these principles, in order to understand how they are to be applied.
- Example of a violation of the Open-Closed Principle
- Example of a violation of Liskov's Substition Principle
Justification for design:
- Software Quality , definitions and metrics.
- F. Brito e Abreu and W. Melo. Evaluating the impact of object-oriented design on software quality. In Software Metrics Symposium, 1996., Proceedings of the 3rd International, pages 90-99, Mar 1996.
- Cheng Zhang; Budgen, D., "What Do We Know about the Effectiveness of Software Design Patterns?" , IEEE Transactions on Software Engineering, vol.38, no.5, pp.1213,1231, Sept.-Oct. 2012
- L. C. Briand, J. WÃ¼st, J. W. Daly, and D. V. Porter. Exploring the relationships between design measures and software quality in object-oriented systems. Journal of Systems and Software, 51(3):245-273, 2000.
- Basili, Victor R., Lionel C. Briand, and WalcÃ©lio L. Melo. A validation of object-oriented design metrics as quality indicators. IEEE Transactions on Software Engineering, 22.10 (1996): 751-761.
- L. Briand, J. Daly, and J. Wust. A unified framework for coupling measurement in object-oriented systems. IEEE Transactions on Software Engineering, 25(1):91â€“121, Jan 1999.
- Chidamber, Shyam R., and Chris F. Kemerer. "A metrics suite for object oriented design." IEEE Transactions on Software Engineering 20.6 (1994): 476-493.
- Harrison, Rachel, Steve J. Counsell, and Reuben V. Nithi. "An evaluation of the MOOD set of object-oriented software metrics." Software Engineering, IEEE Transactions on 24.6 (1998): 491-496.
- MOOD Metrics plugin in Eclipse
- Metrics plugin in Eclipse, with cohesion metrics included
Design and testing
To prepare for the seminar you need to do the labs
Mainly the lectures, see Scalable learning
Design patterns, paradigms and languages
- On the Interaction of Object-Oriented Design Patterns and Programming Languages
- A debate on language and tool support for design patterns
- I. Maier, T. Rompf, and M. Odersky. Deprecating the observer pattern. Technical report, Ecole Polytechnique FÃ©dÃ©rale de Lausanne, 2010.
- J. Gil and D. Lorenz. Design patterns and language design. IEEE Computer, 31(3):118-120, March 1998.
- G. Baumgartner, K. LÃ¤ufer, and V. F. Russo. On the interaction of object-oriented design patterns and programming languages. Computer Science Technical Reports 96-020, Purdue University, Department of Computer Science, 1996.
- J. Bosch. Design patterns as language constructs. Journal of Object-Oriented Programming, 11:18-32, 1998.
- D. Spinellis. Notable design patterns for domain-specific languages. Journal of Systems and Software, 56(1):91 - 99, 2001.
Some design patterns in different languages. For example Proxy:
In Java, most often implemented dynamically using an
InvocationHandleror a third-party class generation package such as CGLIB .
- In C#, proxies can be created as dynamic objects using the class DynamicObject , or using a third-party class generation package such as Castle Project .
In Ruby, you typically catch method calls to non-existing methods
method_missingto create a Proxy.
- In Objective-C, forwarding unknown messages (method calls) is used to create dynamic proxies.
- In Common Lisp, you can define a custom dispatch mechanism for methods that are are proxy methods by using the Meta-Object Protocol to declare that they are a special kind of methods, which means that they can be made into proxy methods.
Programming paradigms and design patterns:
- E. Bainomugisha, A. L. Carreton, T. v. Cutsem, S. Mostinckx, and W. d. Meuter. A survey on reactive programming . ACM Comput. Surv., 45(4):52:1-52:34, Aug. 2013.
- Z. Wan and P. Hudak. Functional reactive programming from first principles . In Proceedings of the ACM SIGPLAN 2000 Conference on Programming Language Design and Implementation, PLDI '00, pages 242-252, New York, NY, USA, 2000. ACM.
- Resources on Parallel Patterns
Design patterns and application frameworks
- M. Fayad and D. C. Schmidt. Object-oriented application frameworks. Communications of the ACM, 40(10), October 1997.
- R. E. Johnson. Frameworks = (Components + Patterns). Communications of the ACM, 40(10):39-42, 1997.
- S. MacDonald, J. Anvik, S. Bromling, J. Schaeffer, D. Szafron, and K. Tan. From patterns to frameworks to parallel programs. Parallel Computing, 28(12):1663 - 1683, 2002.
- J. Hannemann and G. Kiczales. Design pattern implementation in Java and AspectJ. SIGPLAN Notices, 37(11):161-173, Nov. 2002.
Some design patterns are implemented using more or less standardized components or techniques. Here is a list to external resources for some of them. More references are in the lecture material and will be moved here for easier reference.
Abstract Factory, implemented using Dependency Injection (Inversion of
- In Java Enterprise Edition, Dependency Injection is part of the standard as CDI
- In Java, there are also third-party dependency injection frameworks such as Spring
- The Open Source frameworkNinject in .Net (C#/VB)
- The Open Source framework StructureMap in .Net (C#/VB).
- The Open Source framework Castle Project in .Net (C#/VB).
- Microsoft's DI framework Unity in .Net (C#/VB)
- In Java, all classes in the standard library called something with Listener are typically observers. To implement your very own, with no no connection to existing event sources, you would probably start with the class Observable
- In C#, you typically observe events in sequences of items, and implement IObservable
Below you will find topics which might not nessacarily concern a specific seminar.
Critique and reflections
These are some of the critiques usually found against the (over-)use of design patterns in software.
- On the use of an Inversion of Control (IoC) container for Dependency Injection in Spring , an application framework for Java.
- On the harmful effects of using the Singleton pattern .
- On the underspecified Visitor pattern .
- On the difficult-to-understand-and-debug Template Method design pattern .
- On the absence of Design patterns in dynamic languages, Peter Norvig. Object World 1996.
- Critique against Dependency Injection when using open languages like Ruby
Design Patterns in specific domainsGame Design Patterns by Jussi Holopainen and Staffan BjÃ¶rk, Lecture notes from the Game Developers' Conference 2003.
Page responsible: Ola Leifler
Last updated: 2015-03-03