Presentation is loading. Please wait.

Presentation is loading. Please wait.

Design Patterns Introduction What is a Design Pattern? Why were they developed? Why should we use them? How important are they?

Similar presentations


Presentation on theme: "Design Patterns Introduction What is a Design Pattern? Why were they developed? Why should we use them? How important are they?"— Presentation transcript:

1 N.A.Shulver@staffs.ac.uk Design Patterns Introduction What is a Design Pattern? Why were they developed? Why should we use them? How important are they? How easy are they to use? Resources

2 N.A.Shulver@staffs.ac.uk Design Patterns What is a Design Pattern? When programming complex systems, some problems arise again and again. Programmers build up expertise and experience of solving these problems. A design pattern can be thought of as an encapsulation of programming “best practice”. Languages like Java already incorporate some design patterns into their structure.

3 N.A.Shulver@staffs.ac.uk Design Patterns What is a Design Pattern? A design pattern is not necessarily a single chunk of code (detailed implementation). It may be a style, an approach to solving a problem (architecture). It may be the “best” approach - one that experience has shown to be efficient, reliable, scalable and so on. Many patterns come with UML documentation.

4 N.A.Shulver@staffs.ac.uk Design Patterns What is a Design Pattern? “Design patterns constitute a set of rules describing how to accomplish certain tasks in the realm of software development.” (Pree, 1994) “Design patterns focus more on reuse of recurring architectural design themes, while frameworks focus on detailed design… and implementation.” (Coplien & Schmidt, 1995).

5 N.A.Shulver@staffs.ac.uk Design Patterns What is a Design Pattern? “A pattern addresses a recurring design problem that arises in specific design situations and presents a solution to it” (Buschmann, et. al. 1996) “Patterns identify and specify abstractions that are above the level of single classes and instances, or of components.” (Gamma, et al., 1993)

6 N.A.Shulver@staffs.ac.uk Design Patterns Why were they developed? Attempts to make programming into an engineering discipline rather than an art form. Can help to keep costs low. Brings reliability through good design. Speeds development cycles since no need to “reinvent the wheel”. Helps with maintenance (patterns may get updated).

7 N.A.Shulver@staffs.ac.uk Design Patterns Why should we use them? Design Patterns should help us achieve our development goals with less effort. Communities of programmers will have familiarity with common patterns. Modern languages incorporate some patterns at the API level, for example the Java media loading and event handling systems.

8 N.A.Shulver@staffs.ac.uk Design Patterns How important are they? In some areas (finance, engineering, user interface design) they are very useful and widely used. For some small, ad-hoc, single-developer projects, most of the more complex and specialised design patterns may not have much impact.

9 N.A.Shulver@staffs.ac.uk Design Patterns How easy are they to use? Some design patterns are very simple to use, others are complex solutions to specific, complex problems. You probably use some already – the Swing graphics framework is based in part on well- known design patterns. They are well documented and explained. Books of patterns exist – a limited number of patterns have been found

10 N.A.Shulver@staffs.ac.uk Design Patterns Resources Design Patterns Java Companion (free book in PDF format): http://www.patterndepot.com/put/8/JavaPatterns.htm http://www.patterndepot.com/put/8/JavaPatterns.htm Example patterns with explanatory text, Antonio García: http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/defa ult.htm http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/defa ult.htm Sun J2EE Patterns: http://java.sun.com/blueprints/patterns/http://java.sun.com/blueprints/patterns/ Java Design Patterns 201: http://www- 106.ibm.com/developerworks/edu/j-dw-javapatt2-i.htmlhttp://www- 106.ibm.com/developerworks/edu/j-dw-javapatt2-i.html Core J2EE Patterns (book on Amazon)book on Amazon Important book: Design Patterns by Gamma, Helm, Johnson and Vlissides (Addison Wesley Longman, 1995. ISBN 0-201-63361-2)Design Patterns Interesting review of the above book here.here

11 N.A.Shulver@staffs.ac.uk Design Patterns Conclusion Design patterns are worth using in many circumstances. You will have to invest some time in order to understand them and absorb the implications of this style of programming. For corporate developers, design patterns represent a resource of expertise that cannot be ignored.


Download ppt "Design Patterns Introduction What is a Design Pattern? Why were they developed? Why should we use them? How important are they?"

Similar presentations


Ads by Google