CSC/ECE 517 Fall 2012/ch2b 2w53 iv: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:
==Singleton, directory of sites Pattern==
==Singleton, directory of sites Pattern==


1. http://en.wikipedia.org/wiki/Singleton_pattern
    Topics Covered : Common uses, UML, Implementation, Example, Prototype based singleton, Example of use with factory method pattern
    Summary :
    This link firstly provides the basic definition of the singleton pattern as a design pattern that restricts the instantiation of a class to one object. Singleton patters are mostly used in Abstract Factory, Builder, and Prototype, and Facade patterns.
    Both the UML representation of singleton where the same single instance is always returned and the implementation concerning the mechanism to access the singleton class member without creating a class object and a mechanism to persist the value of class members among the class objects. The link also points out that if a class has to realize a contract expressed by an interface, it really has to be a singleton.
    A lazy and Eager initialization in java
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/


<references />
<references />
*[http://catalog.lib.ncsu.edu/record/NCSU1994709 Head First Design Patterns]
*[http://catalog.lib.ncsu.edu/record/NCSU1994709 Head First Design Patterns]

Revision as of 21:46, 17 November 2012

Singleton, directory of sites

Singleton, directory of sites Pattern

1. http://en.wikipedia.org/wiki/Singleton_pattern

   Topics Covered : Common uses, UML, Implementation, Example, Prototype based singleton, Example of use with factory method pattern
   Summary : 
   This link firstly provides the basic definition of the singleton pattern as a design pattern that restricts the instantiation of a class to one object. Singleton patters are mostly used in Abstract Factory, Builder, and Prototype, and Facade patterns. 
   Both the UML representation of singleton where the same single instance is always returned and the implementation concerning the mechanism to access the singleton class member without creating a class object and a mechanism to persist the value of class members among the class objects. The link also points out that if a class has to realize a contract expressed by an interface, it really has to be a singleton.
   A lazy and Eager initialization in java 

\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

<references />