In: Computer Science
What are design patterns in object oriented programming?
Minimum 200 words
Software Design Patterns are used in software engineering to provide reusable solutions to the commonly occuring problems. It provides a way or template to write code in such a way that the code can be used in many other different situations. Design patterns are formalized best practices that the programmer can use to solve common problems when designing an application or system.
Object oriented design patterns are focused on the object oriented concepts of the programming language such as classes, objects. Design patterns typically show the relationship and interaction between classes and objects, without even specifying the final application classes or objects.
Design patterns are looked as the structured approach to computer programming. Design patterns got popular during 1994 after the publishing of the book Design Patterns: Elements of Reusable Object-Oriented Software.
Use of design patterns:
1.) Speed up development process by providing tested, proven development paradigms.
2.) Make the maintainance process easier.
They are classified as follows:
Creational patterns : Abstract factory, builder, Factory Method, Object pool, prototype, singleton.
Structural patterns : Adapter, bridge, composite, Decorator, facade, flyweight, private class data, proxy.
Behavioral patterns : Chain of responsibility, Command, Interpreter, Iterator, Mediator, Memento, Null Object, Observer, State, Strategy, Template Mediator, Visitor.
Concurrency patterns : Active Object, Balking, Binding, Compute Kernel, Double-checked locking, Event-based asynchronous, Guarded Suspension, Join, Lock, Message design pattern, Monitor Object, Reactor, Read-write lock, Scheduler, Thread pool, Thread-specific Storage.