Each design pattern describes a problem which occurs over and over again in our environment, 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 ever doing it the same way twice. This tutorial is for a programmer who is […]
Abstract Factory design pattern provides an interface for creating families of related or dependent objects without specifying their concrete classes. In normal usage, the client software creates a concrete implementation of the abstract factory and then uses the generic interfaces to create the concrete objects that are part of the theme.
The prototype pattern is a creational design pattern used in software development when the type of objects to create is determined by a prototypical instance, which is cloned to produce new objects. This pattern is used to specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.
Factory Method design pattern defines an interface for creating an object, but let subclasses decide which class to instantiate. Like other creational patterns, it deals with the problem of creating objects (products) without specifying the exact class of object that will be created.
Null Object design pattern is also known as Stub and Active Nothing. It provides an object as a surrogate for the lack of an object of a given type. The Null Object provides intelligent do nothing behavior, hiding the details from its collaborators. In object-oriented languages such as Java references may be null and needs to be checked to ensure they are not null before invoking any methods.
Strategy design pattern defines a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it. In computer programming, the strategy pattern is also known as the policy pattern.
Observer design pattern (also known as Dependants and Publish-subscribe) is a behavioral pattern. Behavioral patterns are those patterns that are most specifically concerned with communication between objects. Intent of Observer pattern is to define one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
Intent of Singleton design pattern is to ensure that a class only has one instance, and provide a global point of access to it. Use the Singleton pattern when there must be only one instance of a class, and it must be accessible to clients from a well-known access point. Use Singleton when the sole instance should be extensible by subclassing, and clients should be able to use an extended instance without modifying their code.
It is Craig Larman’s methodical approach to OO design. In essence, it is a tool to help apply responsibilities to OOD design. These are designed (and meant to be used as) methodical, rational, explainable techniques. They are “patterns of assigning responsibilities”. Note that use of “pattern” here is slightly different from some that intended by the GoF book. “Patterns” […]
Popular Posts (last 30 days)
- Circular Linked Lists 1361 view(s)
- Attendance Management Sys… 1092 view(s)
- Applications of Stack in … 1090 view(s)
- Graph Implementation in C… 911 view(s)
- Implementing Stack Data S… 791 view(s)
- Simple Currency Converter… 714 view(s)
- GRASP Design Patterns 511 view(s)
- Recursive Factorial funct… 505 view(s)
- Finding Minimum, Maximum … 394 view(s)
- Implementation of Priorit… 331 view(s)
TagsAndroid C-Sharp C/C++ language Classes Data structures Design Pattern Eclipse Game Development Graphics Design Books HTML iPhone JAVA JAVA GUI MIPS Assembly Mobile Programming Books Object Oriented PDF PHP Programming Programming Books Programming Languages Books Python RaphaelJS REST Source Code Threads Tutorial Web Development Books