Course Description :
Design Patterns are proven solutions to recurring problems in object-oriented software systems. This course covers sixteen design patterns and includes detailed programming exercises to allow students to practice implementing selected patterns.
Programming experience in Java or C++ and some familiarity with object-oriented concepts.
Who Should Attend? :
This course is for system architects, designers and programmers working on or preparing for a software project using an object-oriented design.
Training Design Patterns in C++,
When we think of Design Patterns following are the Questions that cross our mind,
What is a Design Pattern?
Why do we need to study Design Patterns?
How important it is in today industry?
How do we implement it in our projects?
Its role of importance in projects..
What is the background needed to study design patterns?
How vast is the subject?
Patterns for software development are one of the latest "hot topics" to emerge from the object-oriented community. They are a literary form of software engineering problem-solving discipline that has its roots in a design movement of the same name in contemporary architecture, literate programming, and the documentation of best practices and lessons learned in all vocations.
Fundamental to any science or engineering discipline is a common vocabulary for expressing its concepts, and a language for relating them together. The goal of patterns within the software community is to create a body of literature to help software developers resolve recurring problems encountered throughout all of software development. Patterns help create a shared language for communicating insight and experience about these problems and their solutions. The primary focus is not so much on technology as it is on creating a culture to document and support sound engineering architecture and design.
What is a Design Pattern?
• A design pattern names, abstracts and identifies the key aspects of a common design structure that make it useful for creating a reusable object-oriented design.
• A pattern is the abstraction from a concrete form which keeps recurring in specific non-arbitrary contexts.
• A pattern is a named nugget of insight that conveys the essence of a proven solution to a recurring problem within a certain context amidst competing concerns.
• A pattern is where theory and practice meet to reinforce and complement one another, by showing that the structure it describes is useful, useable, and used!
Why do we need to study Design Patterns ?
Design patterns have two major benefits. First, they provide you with a way to solve issues related to software development using a proven solution. The solution facilitates the development of highly cohesive modules with minimal coupling. They isolate the variability that may exist in the system requirements, making the overall system easier to understand and maintain. Second, design patterns make communication between designers more efficient. Software professionals can immediately picture the high-level design in their heads when they refer the name of the pattern used to solve a particular issue when discussing system design
To paraphrase Christopher Alexander:
Patterns are used as operators which differentiates space: creating distinctions where no distinction was before. In other words, they allow us to begin our design at a conceptual view and work down. The patterns we use define the architecture and relationship of the classes involved for us.
How do we implement it in our projects ?
• Solutions to problems that recur with variations
• No need for reuse if the problem only arises in one context
• Solutions that require several steps..
• Not all problems need all steps.
• Patterns can be overkill if solution is simple linear set of instructions
• Solutions where the solver is more interested in the existence of the solution than its complete derivation.
• Patterns leave out too much to be useful to someone who really wants to understand.
• They can be a temporary bridge, however
Its role of importance in projects :
Design patterns enable large-scale reuse of software architectures
They also help document systems to enhance understanding
Patterns explicitly capture expert knowledge and design tradeoffs, and make this expertise more widely available
Patterns help improve developer communication
Pattern names form a vocabulary
Patterns help ease the transition to object-oriented technology
How vast is the subject ?
Begin with Factory Method. This pattern is used by a number of patterns in the book and throughout the patterns literature.
Strategy is used frequently throughout the book, and an early knowledge of it helps in understanding other patterns.
For an early dose of elegance, nothing is better than the Decorator. The discussion of "skin" vs. "guts" is a great way to differentiate Decorator from the previous pattern, Strategy.
The Composite pattern appears everywhere and is often used with Iterator, Chain of Responsibility, Interpreter, and Visitor patterns.
Reenforce the reader's understanding of Composite by studying Iterator.
Template Method :
The author's footnote to Iterator explains that a method called "Traverse" in the Iterator example code is an example of a Template Method. This pattern also reenforces Strategy and Factory Method.
Abstract Factory :
The reader now returns to the second-easiest creational pattern, the Abstract Factory. This pattern also helps reenforce Factory Method.
The reader now may compare another creational pattern, the Builder, with the Abstract Factory.
Singleton is often used to model Abstract Factories, as the "Related Patterns" section of Singleton describes.
The reader now has a chance to learn how Proxy is used to control access to an object. This pattern leads directly into the next pattern, Adapter.
The Adapter pattern may be compared with what the reader understands about Decorator, Proxy, and later, Bridge.
Finally, the reader learns how the Bridge pattern differs from both the Adapter and Proxy patterns.
Now the reader learns the Mediator pattern, in preparation for understanding Observer and the Model-View-Controller design.
Discover how the Mediator is used by the Observer to implement the classic Model-View-Controller design.
Chain of Responsibility :
After exploring how messages are passed using the Observer and Mediator patterns, the reader now may contrast how messages are handled by the Chain of Responsibility pattern.
The reader now moves on to Memento. This pattern leads directly into a discussion of undo and redo, which is related to the next pattern, Command.
The Command pattern is used in a number of ways, one of which relates to the previous pattern, Mediator.
Perhaps the most complex creational pattern, Prototype is often used with the Command pattern.
The reader may now study State to understand another way an object's behavior changes.
Visitor is often combined with the Composite and/or Iterator patterns.
The Flyweight pattern is one of the more complex patterns. An examples use of this pattern is described in the next pattern, Interpreter.
The Interpreter pattern is complex. It makes reference to and helps reenforce one's understanding of Flyweight and Visitor.
The final pattern to read is Facade. Facade is relatively straightforward and follows nicely after Interpreter since the example code is similar in theme to example code in the Interpreter.
What is the background needed to study design patterns ?
C, C++ or Java
How important it is in todays industry ?
Design Patterns exist as a means to capture best practices and to pass along time-tested solutions to commonly recurring problems in software development. Design patterns are an amazing resource that should be used to your advantage. While design patterns provide reusable concepts, the challenges come in determining which design patterns to use and working towards a reusable implementation
The current popularity of software patterns has spurred numerous activities to broaden their use and support within the software development community. It may not be long before some programming languages introduce special syntax for representing design patterns as explicit programming constructs.
The ability to codify patterns as generic software components may be important, even more important is the knowledge of how/when to apply and combine patterns, in conjunction with the ability to use a shared vocabulary of pattern names to communicate the nuggets of insight they represent. Because patterns capture knowledge that is primarily intended for humans, it is the social impact of patterns which largely shapes their technological impact.