google.com, pub-4617457846989927, DIRECT, f08c47fec0942fa0 Learn to enjoy every minute of your life.Only I can change my life.: Design pattern

Sunday, November 2, 2014

Design pattern


Why design pattern?
To make project new libraries are created.
New classes can be used for further program i.e. Classes are reusable.
Thus the problem which is reusable is design pattern.


Definition Design Pattern
Each pattern describes a problem which occurs over and over again in our environment and then describes the code of the solution to that problem in such a way that you can use this solution a million times over without ever doing it the same way twice.

Elements of design pattern :-
1) Pattern name
2) Problem
3) Solution
4) Consequences

The person requires documentation for design pattern i.e. Describing design pattern.
For this there are as follows:-
1) Pattern name and classification
2) Intent
3) Also known as ( different names for them e.g. Abstract class has user class name )
4) Motivation ( why person problem to motivate for design pattern )
5) Applicability ( Real life situations where used )
6) Structure ( data structures )
7) Participants ( objects and components )
8 ) Collaboration (collaborate)
9) Consequences ( Advantage and disadvantages) also drawbacks
10) Implementation
11) Sample code( code of any object oriented language )
12) Known Uses
13) Related Patterns .( relationship with other design pattern)
14) Factory methods ( only methods used for design pattern)

The catalog of design pattern :-
1) Abstract factory
2) Prototype
3) Singleton ( means single object )
4) Adaptor
5) Decorator
6) Proxy
7) Command
8) Observer
9) Strategy

अच्छे विचार करे विचार

  पहचान की नुमाईश, जरा कम करें... जहाँ भी "मैं" लिखा है, उसे "हम" करें... हमारी "इच्छाओं" से ज़्यादा "सुन...