Each application has different architecture to it. Architecture can vary based on functionality, extension, flexibility, and infrastructure. Programming for certain domains can require a certain approach. For instance, notice how a typical web application can be different from desktop application. Even without knowing the logic and purpose of the application, we know that they will … Continue reading Proxy Pattern
Tag: abstraction
Template Method Pattern
It’s all about algorithms, right? Ever since the word computer came to exist, word algorithm was behind it. Indeed, whenever you develop something, you define steps how to accomplish any given task. There are many ways to complete any task: a lot of poor ones, a few good, and one or two great ones. We … Continue reading Template Method Pattern
Facade Pattern
Applications reach different levels of complexity within the development time span. Some settle down with just several classes. Others make to dozens of classes and complex interrelations between them. When that happens you want to make sure that you have proper mechanisms of controlling it, and that those mechanisms are simple enough for client to … Continue reading Facade Pattern
Singleton Pattern
In every application there is a need in some kind of globally accessible element that all other components can refer to. Configuration, for instance, is one of those important elements. Multiple classes and functions can refer to it at different points in time to base their output on a certain active configuration attribute. A lot … Continue reading Singleton Pattern
Abstract Factory Pattern
There is a way to generate objects without being tied to concreteness of a certain object. That is called a Factory Pattern or a Factory Method. However, often what happens is that we need to create not one type of an object but several similar ones. Imagine running a restaurant, and needing to have several … Continue reading Abstract Factory Pattern
Strategy Pattern
Imagine that you need to create a game where a character is able to fight. Character should be able to pick a weapon. Different weapon would preform different action. We need the character to be able to use his fists, a knife, and a gun. Every weapon can have its own set of attributes and … Continue reading Strategy Pattern
