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 →