What are design patterns
What are design patterns ?
Design patterns are recurring solution to recurring problems in software architecture.
(A) Can you list down all patterns and their classification ?
Note :- This is advanced question because anyone who asks to list down all patterns can only be crazy for what he is asking. But it is always a win-win situation for the interviewer. There are three basic classification of patterns Creational, Structural and Behavioral patterns.
ã Abstract Factory:- Creates an instance of several families of classes
ã Builder :- Separates object construction from its representation
ã Factory Method:- Creates an instance of several derived classes
ã Prototype:- A fully initialized instance to be copied or cloned
ã Singleton:- A class in which only a single instance can exist
Note :- The best way to remember Creational pattern is by ABFPS (Abraham Became First President of States).
ã Adapter:-Match interfaces of different classes. ã Bridge:-Separates an objectfs interface from its implementation.
ã Composite:-A tree structure of simple and composite objects.
ã Decorator :-Add responsibilities to objects dynamically.
ã Facade:-A single class that represents an entire subsystem.
ã Flyweight:-A fine-grained instance used for efficient sharing.
ã Proxy:-An object representing another object.
Note : To remember structural pattern best is (ABCDFFP)
ã Mediator:-Defines simplified communication between classes.
ã Memento:-Capture and restore an object's internal state.
ã Interpreter:-A way to include language elements in a program.
ã Iterator:-Sequentially access the elements of a collection.
ã Chain of Resp:-A way of passing a request between a chain of objects.
ã Command:-Encapsulate a command request as an object.
ã State:-Alter an object's behavior when its state changes.
ã Strategy:-Encapsulates an algorithm inside a class.
ã Observer:-A way of notifying change to a number of classes.
ã Template Method:-Defer the exact steps of an algorithm to a subclass.
ã Visitor:-Defines a new operation to a class without change.
Note :- Just remember Music....... 2 MICS On TV (MMIICCSSOTV).
Note:- No source code is provided for architecture section as much of the things can be clear from good UML diagrams.
2007-10-24, 5360👍, 0💬
Once I have developed the COM wrapper do I have to still register the COM in registry? Yes.
How To Add Column Headers to a Table? - XHTML 1.0 Tutorials - Understanding Tables and Table Cells I...
How To Select All Columns of All Rows from a Table? - MySQL FAQs - SQL SELECT Query Statements with ...
Give me the example of SRS and FRS SRS :- Software Requirement Specification BRS :- Basic Requiremen...
What Information Is Needed to Connect SQL*Plus an Oracle Server? - Oracle DBA FAQ - Introduction to ...