Skip to main content

Gang of Four Design Patterns


Gang of Four(GOF) Design Patterns are divided in to 3 categories.


Creational Design Patterns ( 5 Patterns )


AbstractFactory


Builder Method


Factory Method



Prototype



Singleton


Singleton pattern is used when there is only one instance of the object need to be created per JVM instance. This pattern is used internally by the Connection Pooling to create the objects only on demand.





Structural Design Patterns ( 7 Patterns )


Adapter



Bridge Pattern



Composite Pattern




Decorator Pattern




Facade




FlyWeight


FlyWeight Pattern is used when there are a large number of objects to be created, and they need to be created efficiently. This pattern is used by many frame works to create the objects using configuration.



Proxy




Behavioral Design Patterns ( 11 Patterns )



Chain Of Responsibility Pattern



Command



Interpreter



Iterator



Mediator



Memento

Memento is used internally by Text Editor Applications, where ctr+Z or cmd+Z operations are used to remember the snap shot of the data.


State


State Design Pattern is used where ever the Behavior of the System, as a result of change in the State.



Strategy


Strategy Pattern is used when there a set of Algorithms, and one needs to be chosen dynamically at run time.




Template


Visitor

Comments

Popular posts from this blog

Running Multiple Operating Systems(Windows and Ubuntu Linux) on the same machine

VMWare Player is a freely downloadable VMWare. Download VMWare player software and install it on your windows OS download an image of the Ubuntu Linux Desktop version called Ubuntu from http://www.ubuntu.com/getubuntu/download that in iso image format. Then download VMWare configuration bundle that contains a list of files, extract those file to some folder like C:\OS\. Then edit the file" os.vmx file and give the path of the .iso image in that file in the line like below. ide1:0.fileName = C:\OS\ubuntu-8.10-desktop-i386.iso" Now open the file os.vmx file using the vmware player, that will open the Ubuntu OS. You will get a list of options in that select the option install Ubuntu without changing your current configuration of the system Now that will start the Ubuntu OS in a window inside your windows OS. Now you have a browser and all the applications inside the Ubuntu OS, you can start working on that. Double click on this window/expand it to show in full screen. To switch ...