Provide a surrogate or placeholder for another object to control access to it.
Use an extra level of indirection to support distributed, controlled, or intelligent access.
Add a wrapper and delegation to protect the real component from undue complexity.
You need to support resource-hungry objects, and you do not want to instantiate such objects unless and until they … Read More →
1. Mapping Objects to Databases
2. Active Record
3. Data Mapper
4. Using a Repository
5. Identity Map
6. Lazy And Eager Loading
7. Virtual Proxy Pattern
8. Taking the Next Step
Data access is a popular subject among developers. No doubt you've heard plenty of opinions on specific data access technologies and persistence frameworks, but what's the best way to consume these … Read More →
This article aims at understanding when we could find the Adapter pattern useful and how can we have a rudimentary implementation of the Adapter pattern using C# and C++.
It was almost 6 years back, at the very beginning of my career, that one of my clients told me to write an adapter. Back then I … Read More →
Design Patterns are names we give code constructs. We’re not usually inventing anything new, we’re just giving a name for things we’ve always done. You’ve probably been doing it this way forever, but you never knew what to call it, it was just “the way it’s done”. Giving it a name … Read More →
Design Pattern History
The term “design pattern” was originally coined in the field of architecture. Christopher Alexander, in his 1977 work, “A Pattern Language: Towns/Building/Construction,” describes common issues of architectural design and explains how new, effective designs can be created through the aggregation of existing, well-known patterns. Alexander’s concepts translate well into software development, where it’s … Read More →
In software engineering, a design patterns are general reusable solutions to a software design problems you find again and again in a real life software development. Patterns are not a finished design that can be transformed directly into your code. They are only formal description or template how to solve specific problem. Patterns are best … Read More →
About the Builder
In the Builder Pattern a director and a builder work together to build an object. The director controls the building and specifies what parts and variations will go into an object. The builder knows how to assemble the object given specification.In this example we have a director, HTMLPageDirector, which is given a builder, … Read More →
About the Abstract Factory
In the Abstract Factory Pattern, an abstract factory defines what objects the non-abstract or concrete factory will need to be able to create. The concrete factory must create the correct objects for it's context, insuring that all objects created by the concrete factory have been chosen to be able to work correctly … Read More →