Sunday, December 10, 2017

J2EE Design Patterns



Creational Design Pattern

Creational: Singleton



when to use :
Used in Logging, Cache, Session, Drivers 


Creational: Factory 
When to use :


Implementation :

Factory chooses the objects, DAO, Abstract DAO factory 



Creational:builder  
Defines essiential parameter in constructor & optional in setters & add build method .Call build method at the end.







Creational: Prototype






  

Creational:AbstractFactory 
Structural 

improves  the structure of code
Structural: prototype 

Clone method 

Structural: proxy 

Structural: Facade 





Structural: Composite Design Pattern

 
Structural: Flyweight Design Pattern



Structural: Adapter



 

Structural: Bridge 



Behavioural

Behavioural:template 

Subclass defines behvaiour , order of exectution can be defined in superclass  

Behavioural:Observer 

Subclass defines behvaiour , order of exectution can be defined in superclass 


Concurrency Patterns


Thread pool Pattern is special case of Object pool design pattern 







No comments:

Post a Comment