Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
What are design patterns
What are design patterns ?
✍: Guest
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.
Creational 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).
Structural Patterns
ã 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)
Behavioral Patterns
ã 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, 5979👍, 0💬
Popular Posts:
.NET INTERVIEW QUESTIONS - What are types of compatibility in VB6? There are three possible project ...
How can you implement MVC pattern in ASP.NET? The main purpose using MVC pattern is to decouple the ...
What is the difference between strings and character arrays? A major difference is: string will have...
What Is a LABEL Tag/Element? - XHTML 1.0 Tutorials - Understanding Forms and Input Fields A "label" ...
Can you have virtual functions in Java? Yes, all functions in Java are virtual by default. This is a...