by
Ahmed Adel , Application Engineer , Intercom Enterprises
In software engineering, a design pattern is a general reusable solution to a commonly occurring problem within a given context in software design. A design pattern is not a finished design that can be transformed directly into source or machine code. It is a description or template for how to solve a problem that can be used in many different situations. Patterns are formalized best practices that the programmer must implement themselves in the application.[1] Object-oriented design patterns typically show relationships and interactions between classes or objects, without specifying the final application classes or objects that are involved. Patterns that imply object-orientation or more generally mutable state, are not as applicable in functional programming languages.
examples :
singleton design pattern
strategy design pattern
factory design pattern
abstract factory design pattern
decorate design pattern
observer design pattern
A design pattern systematically names, motivates, and explains a general design that addresses a recurring design problem in object-oriented systems. It describes the problem, the solution, when to apply the solution, and its consequences. It also gives implementation hints and examples. The solution is a general arrangement of objects and classes that solve the problem. The solution is customized and implemented to solve the problem in a particular context. - DesignPatternsBook
Wikipedia has good material on Design Patterns. If you want a book then Design Patterns: Elements of Reusable Object-Oriented Software is very good.
http://en.wikipedia.org/wiki/Design_pattern_(computer_science)
http://www.amazon.com/Design-Patterns-Elements-Object-Oriented-ebook/dp/B000SEIBB8/ref=tmm_kin_title_0
Design patterns are not limited to any specific language. They are language independent. The only condition is that the language needs to be object oriented.
by
Umar Alharaky , Senior Systems Analyst & Quality Control , StarWays IT
Design patterns are recurring solutions to software design problems you find again and again in real-world application development. Using of design patterns shouldn't decided during code writing. The decision of using such design pattern should be taken during building the architecture & detailed design of the required system. The implementation of these design patterns don't take just one style becuase they are language independent and could be implemented by every language using different techniques.
For .NET, I like using3rd party implementation of design patterns called .NET Design Pattern Framework from dofactory.
One example of design patterns is Singleton. I used to consider Singleton design pattern when I want to ensure that a specific class has only one instance and provide a global point of access to it.
For example, the PrintSpooler class and LoadBalancer class are typical examples for singleton.