DesignPatterns1

DesignPatterns1 - Design Patterns Part I (TIC+V2:C10)...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Design Patterns Part I (TIC++V2:C10) Yingcai Xiao 09/10/08
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Outline  What  For  How  Examples
Background image of page 2
Design Patterns (What?) Design Patterns (DP) are devices that allow designers to share knowledge about their design. Design patterns identify and abstract common themes in object-oriented design. idea reuse => code reuse. UML, C++, DP are used to show, implement, share designs.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Design Patterns (When, Where) Started in 70’ by Christopher Alexander with two books: A Pattern Language [1977] and A Timeless Way of Building [1979] “Design patterns describe a problem which occurs over and over again in our environment, and then describe 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” Popularized by the OOPSLA (ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications) Popular reference book by GoF. Design Patterns: Elements of Reusable Object-Oriented Software http://www.amazon.com/gp/product/0201633612/qid=1133912822/sr=8- 1/ref=pd_bbs_1/102-2596010-5604154?n=507846&s=books&v=glance
Background image of page 4
Design Patterns (When, Where) The original paper by GoF http://www.cse.msu.edu/~cse870/Materials/Patterns/Docs/orig-patterns-paper.pdf Tutorials http://www.patterndepot.com/put/8/JavaPatterns.htm http://www.csc.calpoly.edu/~dbutler/tutorials/winter96/patterns/ http://www.cs.wustl.edu/~schmidt/patterns.html
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Characteristics of Good Design Patterns Enforce standards Encapsulate changes Prefer composition to inheritance Do the simplest thing that could possibly work.
Background image of page 6
Enforcing Standards Using Interfaces
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Enforcing Standards Using Interfaces Interface: a group of headers of public methods of a class; it defines a standardized way of interacting with the class. There are could be more than one interfaces of a class. Interfaces are commonly used to enforce coding patterns/standards. Interfaces in Java and C# can not be instantiated. (why?) Any class implementing an interface guarantees to provide the public methods in the interface for others to use. Any program uses the interface to interact with the class can be reused to interact with other classes implementing the same interface.
Background image of page 8
Enforcing Standards Using Interfaces There is no “Interface” in C++. The workaround is to define
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/21/2011 for the course CS 547 taught by Professor Dr.hungngo during the Spring '10 term at SUNY Buffalo.

Page1 / 32

DesignPatterns1 - Design Patterns Part I (TIC+V2:C10)...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online