<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Apurush</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Apurush"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Apurush"/>
	<updated>2026-08-23T17:03:05Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28891</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 AD</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28891"/>
		<updated>2009-11-18T23:50:28Z</updated>

		<summary type="html">&lt;p&gt;Apurush: /* Examples of Factory Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Definition ==&lt;br /&gt;
&lt;br /&gt;
Factory Method is a creational pattern. This pattern helps to model an interface for creating an object which at creation time can let its subclasses decide which class to instantiate.It is called as Factory Pattern as it is responsible for &amp;quot;Manufacturing&amp;quot; an Object. It helps instantiate the appropriate Subclass by creating the right Object from a group of related classes. The Factory Pattern encourages loose coupling by eliminating the need to bind application-specific classes into the code.It Provide an interface for creating families of related or dependent objects without specifying their concrete classes.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This topic deals with the Factory method design pattern.It explains Factory design pattern and compares with other creational pattern to highlight the uniqueness and distinguishing features of the pattern.It also gives examples of where factory design pattern is used and scenarios wherein its more suitable than other creational patterns.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== In Depth Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Factory Patterns Insight ===&lt;br /&gt;
&lt;br /&gt;
The essence of a pattern is a reusable solution for a recurring problem.The type of object needed depends on the contents of the external data or event. It defines an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.It means that Creator class is written without knowing what actual ConcreteProduct class will be instantiated. The ConcreteProduct class which is instantiated is determined solely by which ConcreteCreator subclass is instantiated and used by the application.&lt;br /&gt;
&lt;br /&gt;
[[Image:facuml.jpg]]&lt;br /&gt;
&lt;br /&gt;
Benefits&lt;br /&gt;
Code is made more flexible and reusable by the elimination of instantiation of application-specific classes,Code deals only with the interface of the Factory class and can work with any sub class that supports this interface&lt;br /&gt;
&lt;br /&gt;
=== Applicants of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
Use the Factory Method pattern in any of the following situations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;A class can't anticipate the class of objects it must create&lt;br /&gt;
&amp;lt;br&amp;gt;A class wants its subclasses to specify the objects it creates&lt;br /&gt;
&amp;lt;br&amp;gt;Classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclasses is the delegate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sometimes, you need to create an object to represent external data or process an external event. The type of object needed depends on the contents of the external data or event. You don’t want the source of the data or event nor object’s clients to need to be aware of the actual type of object created. You accomplish that by encapsulating the decision of the class of object to create in its own class.This is when factory method design can be put in to to best use.&lt;br /&gt;
&lt;br /&gt;
=== Application examples of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
Factory design pattern can be explained by the following example. This example involves factory class called Mammals and it involves calling objects cat and dog with out actually creating an object for cat and dog class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 public class MammalsFactory {&lt;br /&gt;
    public static Mammals getMammalObject(String name) {&lt;br /&gt;
       if (name.equalsIgnoreCase(&amp;quot;Cat&amp;quot;)){&lt;br /&gt;
          return new Cat();&lt;br /&gt;
       } else {&lt;br /&gt;
          return new Dog();&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Here we will be passing an argument to the getMammalObject function based on the argument passed we return the Mammals object of the class.&lt;br /&gt;
&lt;br /&gt;
Abstract class is created so that dog ans cat can implement this class&lt;br /&gt;
&lt;br /&gt;
 public abstract class Mammals {&lt;br /&gt;
       public abstract String doWalking();&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The cat and dog class can be created to implement the abstract class as follows&lt;br /&gt;
&lt;br /&gt;
 public class Cat extends Mammals {&lt;br /&gt;
 public String doWalking() {&lt;br /&gt;
 return &amp;quot;Cats has been Informed to perform Walk Operation&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Dog class&lt;br /&gt;
&lt;br /&gt;
 public class Dog extends Mammals {&lt;br /&gt;
 public String doWalking() {&lt;br /&gt;
 return &amp;quot;Dogs has been Informed to perform Walk Operation&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Now without creating object for dog and cat but we are instantiating the object for Mammals Factory class.&lt;br /&gt;
&lt;br /&gt;
 public class FactoryClient {&lt;br /&gt;
   public static void main(String args[]) {&lt;br /&gt;
       MammalsFactory mf = new MammalsFactory();&lt;br /&gt;
       System.out.println(mf.getMammalObject(&amp;quot;Dog&amp;quot;).doWalking());&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Comparison with other Creational Patterns ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Builder Pattern ===&lt;br /&gt;
In Factory pattern, the factory is in charge of creating various subtypes of an object depending on the needs.&lt;br /&gt;
 &lt;br /&gt;
Where as in Builder pattern, the composition of the objects might differ within the same subclass.&lt;br /&gt;
&lt;br /&gt;
An example of a Factory method CarCreate might return a Audi or a Toyota where as in the same scenario if we are using a Builder pattern, it allows us to create objects with finer granularity like specifying different engine specifications (a 4 cylinder engine or a 6 cylinder engine)for the objects.&lt;br /&gt;
As seen from the above example the Factory pattern is a simpler version of the Builder Pattern.&lt;br /&gt;
&lt;br /&gt;
UML diagram of Builder Pattern&lt;br /&gt;
&lt;br /&gt;
[[Image:Builder2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Prototype Pattern ===&lt;br /&gt;
The Prototype pattern creates a new object by cloning an existing object. The client using the prototype object does not need to know what kind of object it is dealing with as long as the concrete prototype extends or implements the prototype interface/class. The concrete prototype object is responsible for cloning itself and returning the cloned object.&lt;br /&gt;
The pattern enables a client to create the kind of object required at runtime by selecting the appropriate prototype. The prototype classes are created generically by the client without the client knowing the exact type of the concrete prototype. New concrete prototypes can be added at runtime as long as they conform to the abstract prototype.&lt;br /&gt;
&lt;br /&gt;
[[Image:prototype.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Abstract Factory Pattern ===&lt;br /&gt;
Abstract pattern is one level of abstraction higher than the factory pattern.&lt;br /&gt;
A Factory pattern is one that returns an instance of one of several possible classes depending on the data provided to it.&lt;br /&gt;
Usually all of the classes it returns have a common parent class and common methods, but each of them performs a task differently and is optimized for different kinds of data.&lt;br /&gt;
&lt;br /&gt;
There are several similar variations on the factory pattern:&lt;br /&gt;
  1. The base class is abstract and the pattern must return a complete working class. &lt;br /&gt;
  2. The base class contains default methods and is only sub-classed for cases where the default methods are insufficient.&lt;br /&gt;
  3. Parameters are passed to the factory telling it which of several class types to return. In this case the classes may share&lt;br /&gt;
     the same method names but may do something quite different.&lt;br /&gt;
&lt;br /&gt;
[[Image:abstractfactory.gif]]&lt;br /&gt;
&lt;br /&gt;
== External Links and References ==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Factory Design Pattern [http://en.wikipedia.org/wiki/Factory_method_pattern] &amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt; Abstract Factory Method[http://www.apwebco.com/gofpatterns/creational/AbstractFactory.html] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Factory v/s Abstract Factory Pattern[http://www.coderanch.com/t/99780/OO-Patterns-UML-Refactoring/Factory-Vs-Abstract-Factory-Pattern] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Builder Design Pattern v/s Factory Design Pattern[http://stackoverflow.com/questions/757743/what-is-the-difference-between-builder-design-pattern-and-factory-design-pattern]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Abstract Factory Method [http://userpages.umbc.edu/~tarr/dp/lectures/Factory.pdf]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; UML Diagram of Builder Pattern [http://en.wikipedia.org/wiki/Builder_pattern]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; UML Diagram of Prototype Design Pattern [http://www.apwebco.com/gofpatterns/creational/Prototype.html] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; UML Diagram of Abstract Factory Design Pattern [http://www.apwebco.com/gofpatterns/creational/AbstractFactory.html] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Factory Design Pattern Usage [http://www.developer.com/java/other/article.php/618421/Pattern-Summaries-Factory-Method.htm] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Examples of Factory Design Pattern [http://www.hiteshagrawal.com/java/factory-design-pattern-in-java] &amp;lt;/li&amp;gt;&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28883</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 AD</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28883"/>
		<updated>2009-11-18T23:44:36Z</updated>

		<summary type="html">&lt;p&gt;Apurush: /* External Links and References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Definition ==&lt;br /&gt;
&lt;br /&gt;
Factory Method is a creational pattern. This pattern helps to model an interface for creating an object which at creation time can let its subclasses decide which class to instantiate.It is called as Factory Pattern as it is responsible for &amp;quot;Manufacturing&amp;quot; an Object. It helps instantiate the appropriate Subclass by creating the right Object from a group of related classes. The Factory Pattern encourages loose coupling by eliminating the need to bind application-specific classes into the code.It Provide an interface for creating families of related or dependent objects without specifying their concrete classes.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This topic deals with the Factory method design pattern.It explains Factory design pattern and compares with other creational pattern to highlight the uniqueness and distinguishing features of the pattern.It also gives examples of where factory design pattern is used and scenarios wherein its more suitable than other creational patterns.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== In Depth Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Factory Patterns Insight ===&lt;br /&gt;
&lt;br /&gt;
The essence of a pattern is a reusable solution for a recurring problem.The type of object needed depends on the contents of the external data or event. It defines an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.It means that Creator class is written without knowing what actual ConcreteProduct class will be instantiated. The ConcreteProduct class which is instantiated is determined solely by which ConcreteCreator subclass is instantiated and used by the application.&lt;br /&gt;
&lt;br /&gt;
[[Image:facuml.jpg]]&lt;br /&gt;
&lt;br /&gt;
Benefits&lt;br /&gt;
Code is made more flexible and reusable by the elimination of instantiation of application-specific classes,Code deals only with the interface of the Factory class and can work with any sub class that supports this interface&lt;br /&gt;
&lt;br /&gt;
=== Applicants of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
Use the Factory Method pattern in any of the following situations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;A class can't anticipate the class of objects it must create&lt;br /&gt;
&amp;lt;br&amp;gt;A class wants its subclasses to specify the objects it creates&lt;br /&gt;
&amp;lt;br&amp;gt;Classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclasses is the delegate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sometimes, you need to create an object to represent external data or process an external event. The type of object needed depends on the contents of the external data or event. You don’t want the source of the data or event nor object’s clients to need to be aware of the actual type of object created. You accomplish that by encapsulating the decision of the class of object to create in its own class.This is when factory method design can be put in to to best use.&lt;br /&gt;
&lt;br /&gt;
=== Examples of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
Factory design pattern can be explained by the following example. This example involves factory class called Mammals and it involves calling objects cat and dog with out actually creating an object for cat and dog class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 public class MammalsFactory {&lt;br /&gt;
    public static Mammals getMammalObject(String name) {&lt;br /&gt;
       if (name.equalsIgnoreCase(&amp;quot;Cat&amp;quot;)){&lt;br /&gt;
          return new Cat();&lt;br /&gt;
       } else {&lt;br /&gt;
          return new Dog();&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Here we will be passing an argument to the getMammalObject function based on the argument passed we return the Mammals object of the class.&lt;br /&gt;
&lt;br /&gt;
Abstract class is created so that dog ans cat can implement this class&lt;br /&gt;
&lt;br /&gt;
 public abstract class Mammals {&lt;br /&gt;
       public abstract String doWalking();&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The cat and dog class can be created to implement the abstract class as follows&lt;br /&gt;
&lt;br /&gt;
 public class Cat extends Mammals {&lt;br /&gt;
 public String doWalking() {&lt;br /&gt;
 return &amp;quot;Cats has been Informed to perform Walk Operation&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Dog class&lt;br /&gt;
&lt;br /&gt;
 public class Dog extends Mammals {&lt;br /&gt;
 public String doWalking() {&lt;br /&gt;
 return &amp;quot;Dogs has been Informed to perform Walk Operation&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Now without creating object for dog and cat but we are instantiating the object for Mammals Factory class.&lt;br /&gt;
&lt;br /&gt;
 public class FactoryClient {&lt;br /&gt;
   public static void main(String args[]) {&lt;br /&gt;
       MammalsFactory mf = new MammalsFactory();&lt;br /&gt;
       System.out.println(mf.getMammalObject(&amp;quot;Dog&amp;quot;).doWalking());&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Comparison with other Creational Patterns ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Builder Pattern ===&lt;br /&gt;
In Factory pattern, the factory is in charge of creating various subtypes of an object depending on the needs.&lt;br /&gt;
 &lt;br /&gt;
Where as in Builder pattern, the composition of the objects might differ within the same subclass.&lt;br /&gt;
&lt;br /&gt;
An example of a Factory method CarCreate might return a Audi or a Toyota where as in the same scenario if we are using a Builder pattern, it allows us to create objects with finer granularity like specifying different engine specifications (a 4 cylinder engine or a 6 cylinder engine)for the objects.&lt;br /&gt;
As seen from the above example the Factory pattern is a simpler version of the Builder Pattern.&lt;br /&gt;
&lt;br /&gt;
UML diagram of Builder Pattern&lt;br /&gt;
&lt;br /&gt;
[[Image:Builder2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Prototype Pattern ===&lt;br /&gt;
The Prototype pattern creates a new object by cloning an existing object. The client using the prototype object does not need to know what kind of object it is dealing with as long as the concrete prototype extends or implements the prototype interface/class. The concrete prototype object is responsible for cloning itself and returning the cloned object.&lt;br /&gt;
The pattern enables a client to create the kind of object required at runtime by selecting the appropriate prototype. The prototype classes are created generically by the client without the client knowing the exact type of the concrete prototype. New concrete prototypes can be added at runtime as long as they conform to the abstract prototype.&lt;br /&gt;
&lt;br /&gt;
[[Image:prototype.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Abstract Factory Pattern ===&lt;br /&gt;
Abstract pattern is one level of abstraction higher than the factory pattern.&lt;br /&gt;
A Factory pattern is one that returns an instance of one of several possible classes depending on the data provided to it.&lt;br /&gt;
Usually all of the classes it returns have a common parent class and common methods, but each of them performs a task differently and is optimized for different kinds of data.&lt;br /&gt;
&lt;br /&gt;
There are several similar variations on the factory pattern:&lt;br /&gt;
  1. The base class is abstract and the pattern must return a complete working class. &lt;br /&gt;
  2. The base class contains default methods and is only sub-classed for cases where the default methods are insufficient.&lt;br /&gt;
  3. Parameters are passed to the factory telling it which of several class types to return. In this case the classes may share&lt;br /&gt;
     the same method names but may do something quite different.&lt;br /&gt;
&lt;br /&gt;
[[Image:abstractfactory.gif]]&lt;br /&gt;
&lt;br /&gt;
== External Links and References ==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Factory Design Pattern [http://en.wikipedia.org/wiki/Factory_method_pattern] &amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt; Abstract Factory Method[http://www.apwebco.com/gofpatterns/creational/AbstractFactory.html] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Factory v/s Abstract Factory Pattern[http://www.coderanch.com/t/99780/OO-Patterns-UML-Refactoring/Factory-Vs-Abstract-Factory-Pattern] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Builder Design Pattern v/s Factory Design Pattern[http://stackoverflow.com/questions/757743/what-is-the-difference-between-builder-design-pattern-and-factory-design-pattern]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Abstract Factory Method [http://userpages.umbc.edu/~tarr/dp/lectures/Factory.pdf]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; UML Diagram of Builder Pattern [http://en.wikipedia.org/wiki/Builder_pattern]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; UML Diagram of Prototype Design Pattern [http://www.apwebco.com/gofpatterns/creational/Prototype.html] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; UML Diagram of Abstract Factory Design Pattern [http://www.apwebco.com/gofpatterns/creational/AbstractFactory.html] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Factory Design Pattern Usage [http://www.developer.com/java/other/article.php/618421/Pattern-Summaries-Factory-Method.htm] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Examples of Factory Design Pattern [http://www.hiteshagrawal.com/java/factory-design-pattern-in-java] &amp;lt;/li&amp;gt;&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28882</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 AD</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28882"/>
		<updated>2009-11-18T23:44:00Z</updated>

		<summary type="html">&lt;p&gt;Apurush: /* External Links and References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Definition ==&lt;br /&gt;
&lt;br /&gt;
Factory Method is a creational pattern. This pattern helps to model an interface for creating an object which at creation time can let its subclasses decide which class to instantiate.It is called as Factory Pattern as it is responsible for &amp;quot;Manufacturing&amp;quot; an Object. It helps instantiate the appropriate Subclass by creating the right Object from a group of related classes. The Factory Pattern encourages loose coupling by eliminating the need to bind application-specific classes into the code.It Provide an interface for creating families of related or dependent objects without specifying their concrete classes.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This topic deals with the Factory method design pattern.It explains Factory design pattern and compares with other creational pattern to highlight the uniqueness and distinguishing features of the pattern.It also gives examples of where factory design pattern is used and scenarios wherein its more suitable than other creational patterns.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== In Depth Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Factory Patterns Insight ===&lt;br /&gt;
&lt;br /&gt;
The essence of a pattern is a reusable solution for a recurring problem.The type of object needed depends on the contents of the external data or event. It defines an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.It means that Creator class is written without knowing what actual ConcreteProduct class will be instantiated. The ConcreteProduct class which is instantiated is determined solely by which ConcreteCreator subclass is instantiated and used by the application.&lt;br /&gt;
&lt;br /&gt;
[[Image:facuml.jpg]]&lt;br /&gt;
&lt;br /&gt;
Benefits&lt;br /&gt;
Code is made more flexible and reusable by the elimination of instantiation of application-specific classes,Code deals only with the interface of the Factory class and can work with any sub class that supports this interface&lt;br /&gt;
&lt;br /&gt;
=== Applicants of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
Use the Factory Method pattern in any of the following situations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;A class can't anticipate the class of objects it must create&lt;br /&gt;
&amp;lt;br&amp;gt;A class wants its subclasses to specify the objects it creates&lt;br /&gt;
&amp;lt;br&amp;gt;Classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclasses is the delegate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sometimes, you need to create an object to represent external data or process an external event. The type of object needed depends on the contents of the external data or event. You don’t want the source of the data or event nor object’s clients to need to be aware of the actual type of object created. You accomplish that by encapsulating the decision of the class of object to create in its own class.This is when factory method design can be put in to to best use.&lt;br /&gt;
&lt;br /&gt;
=== Examples of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
Factory design pattern can be explained by the following example. This example involves factory class called Mammals and it involves calling objects cat and dog with out actually creating an object for cat and dog class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 public class MammalsFactory {&lt;br /&gt;
    public static Mammals getMammalObject(String name) {&lt;br /&gt;
       if (name.equalsIgnoreCase(&amp;quot;Cat&amp;quot;)){&lt;br /&gt;
          return new Cat();&lt;br /&gt;
       } else {&lt;br /&gt;
          return new Dog();&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Here we will be passing an argument to the getMammalObject function based on the argument passed we return the Mammals object of the class.&lt;br /&gt;
&lt;br /&gt;
Abstract class is created so that dog ans cat can implement this class&lt;br /&gt;
&lt;br /&gt;
 public abstract class Mammals {&lt;br /&gt;
       public abstract String doWalking();&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The cat and dog class can be created to implement the abstract class as follows&lt;br /&gt;
&lt;br /&gt;
 public class Cat extends Mammals {&lt;br /&gt;
 public String doWalking() {&lt;br /&gt;
 return &amp;quot;Cats has been Informed to perform Walk Operation&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Dog class&lt;br /&gt;
&lt;br /&gt;
 public class Dog extends Mammals {&lt;br /&gt;
 public String doWalking() {&lt;br /&gt;
 return &amp;quot;Dogs has been Informed to perform Walk Operation&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Now without creating object for dog and cat but we are instantiating the object for Mammals Factory class.&lt;br /&gt;
&lt;br /&gt;
 public class FactoryClient {&lt;br /&gt;
   public static void main(String args[]) {&lt;br /&gt;
       MammalsFactory mf = new MammalsFactory();&lt;br /&gt;
       System.out.println(mf.getMammalObject(&amp;quot;Dog&amp;quot;).doWalking());&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Comparison with other Creational Patterns ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Builder Pattern ===&lt;br /&gt;
In Factory pattern, the factory is in charge of creating various subtypes of an object depending on the needs.&lt;br /&gt;
 &lt;br /&gt;
Where as in Builder pattern, the composition of the objects might differ within the same subclass.&lt;br /&gt;
&lt;br /&gt;
An example of a Factory method CarCreate might return a Audi or a Toyota where as in the same scenario if we are using a Builder pattern, it allows us to create objects with finer granularity like specifying different engine specifications (a 4 cylinder engine or a 6 cylinder engine)for the objects.&lt;br /&gt;
As seen from the above example the Factory pattern is a simpler version of the Builder Pattern.&lt;br /&gt;
&lt;br /&gt;
UML diagram of Builder Pattern&lt;br /&gt;
&lt;br /&gt;
[[Image:Builder2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Prototype Pattern ===&lt;br /&gt;
The Prototype pattern creates a new object by cloning an existing object. The client using the prototype object does not need to know what kind of object it is dealing with as long as the concrete prototype extends or implements the prototype interface/class. The concrete prototype object is responsible for cloning itself and returning the cloned object.&lt;br /&gt;
The pattern enables a client to create the kind of object required at runtime by selecting the appropriate prototype. The prototype classes are created generically by the client without the client knowing the exact type of the concrete prototype. New concrete prototypes can be added at runtime as long as they conform to the abstract prototype.&lt;br /&gt;
&lt;br /&gt;
[[Image:prototype.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Abstract Factory Pattern ===&lt;br /&gt;
Abstract pattern is one level of abstraction higher than the factory pattern.&lt;br /&gt;
A Factory pattern is one that returns an instance of one of several possible classes depending on the data provided to it.&lt;br /&gt;
Usually all of the classes it returns have a common parent class and common methods, but each of them performs a task differently and is optimized for different kinds of data.&lt;br /&gt;
&lt;br /&gt;
There are several similar variations on the factory pattern:&lt;br /&gt;
  1. The base class is abstract and the pattern must return a complete working class. &lt;br /&gt;
  2. The base class contains default methods and is only sub-classed for cases where the default methods are insufficient.&lt;br /&gt;
  3. Parameters are passed to the factory telling it which of several class types to return. In this case the classes may share&lt;br /&gt;
     the same method names but may do something quite different.&lt;br /&gt;
&lt;br /&gt;
[[Image:abstractfactory.gif]]&lt;br /&gt;
&lt;br /&gt;
== External Links and References ==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Factory Design Pattern [http://en.wikipedia.org/wiki/Factory_method_pattern] &amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt; Abstract Factory Method[http://www.apwebco.com/gofpatterns/creational/AbstractFactory.html] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Factory v/s Abstract Factory Pattern[http://www.coderanch.com/t/99780/OO-Patterns-UML-Refactoring/Factory-Vs-Abstract-Factory-Pattern] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Builder Design Pattern v/s Factory Design Pattern[http://stackoverflow.com/questions/757743/what-is-the-difference-between-builder-design-pattern-and-factory-design-pattern]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Abstract Factory Method [http://userpages.umbc.edu/~tarr/dp/lectures/Factory.pdf]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; UML Diagram of Builder Pattern [http://en.wikipedia.org/wiki/Builder_pattern]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; UML Diagram of Prototype Design Pattern [http://www.apwebco.com/gofpatterns/creational/Prototype.html] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; UML Diagram of Abstract Factory Design Pattern [http://www.apwebco.com/gofpatterns/creational/AbstractFactory.html] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Factory Design Pattern Usage [http://www.developer.com/java/other/article.php/618421/Pattern-Summaries-Factory-Method.htm] &amp;lt;/li&amp;gt;&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28881</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 AD</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28881"/>
		<updated>2009-11-18T23:43:43Z</updated>

		<summary type="html">&lt;p&gt;Apurush: /* External Links and References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Definition ==&lt;br /&gt;
&lt;br /&gt;
Factory Method is a creational pattern. This pattern helps to model an interface for creating an object which at creation time can let its subclasses decide which class to instantiate.It is called as Factory Pattern as it is responsible for &amp;quot;Manufacturing&amp;quot; an Object. It helps instantiate the appropriate Subclass by creating the right Object from a group of related classes. The Factory Pattern encourages loose coupling by eliminating the need to bind application-specific classes into the code.It Provide an interface for creating families of related or dependent objects without specifying their concrete classes.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This topic deals with the Factory method design pattern.It explains Factory design pattern and compares with other creational pattern to highlight the uniqueness and distinguishing features of the pattern.It also gives examples of where factory design pattern is used and scenarios wherein its more suitable than other creational patterns.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== In Depth Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Factory Patterns Insight ===&lt;br /&gt;
&lt;br /&gt;
The essence of a pattern is a reusable solution for a recurring problem.The type of object needed depends on the contents of the external data or event. It defines an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.It means that Creator class is written without knowing what actual ConcreteProduct class will be instantiated. The ConcreteProduct class which is instantiated is determined solely by which ConcreteCreator subclass is instantiated and used by the application.&lt;br /&gt;
&lt;br /&gt;
[[Image:facuml.jpg]]&lt;br /&gt;
&lt;br /&gt;
Benefits&lt;br /&gt;
Code is made more flexible and reusable by the elimination of instantiation of application-specific classes,Code deals only with the interface of the Factory class and can work with any sub class that supports this interface&lt;br /&gt;
&lt;br /&gt;
=== Applicants of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
Use the Factory Method pattern in any of the following situations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;A class can't anticipate the class of objects it must create&lt;br /&gt;
&amp;lt;br&amp;gt;A class wants its subclasses to specify the objects it creates&lt;br /&gt;
&amp;lt;br&amp;gt;Classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclasses is the delegate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sometimes, you need to create an object to represent external data or process an external event. The type of object needed depends on the contents of the external data or event. You don’t want the source of the data or event nor object’s clients to need to be aware of the actual type of object created. You accomplish that by encapsulating the decision of the class of object to create in its own class.This is when factory method design can be put in to to best use.&lt;br /&gt;
&lt;br /&gt;
=== Examples of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
Factory design pattern can be explained by the following example. This example involves factory class called Mammals and it involves calling objects cat and dog with out actually creating an object for cat and dog class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 public class MammalsFactory {&lt;br /&gt;
    public static Mammals getMammalObject(String name) {&lt;br /&gt;
       if (name.equalsIgnoreCase(&amp;quot;Cat&amp;quot;)){&lt;br /&gt;
          return new Cat();&lt;br /&gt;
       } else {&lt;br /&gt;
          return new Dog();&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Here we will be passing an argument to the getMammalObject function based on the argument passed we return the Mammals object of the class.&lt;br /&gt;
&lt;br /&gt;
Abstract class is created so that dog ans cat can implement this class&lt;br /&gt;
&lt;br /&gt;
 public abstract class Mammals {&lt;br /&gt;
       public abstract String doWalking();&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The cat and dog class can be created to implement the abstract class as follows&lt;br /&gt;
&lt;br /&gt;
 public class Cat extends Mammals {&lt;br /&gt;
 public String doWalking() {&lt;br /&gt;
 return &amp;quot;Cats has been Informed to perform Walk Operation&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Dog class&lt;br /&gt;
&lt;br /&gt;
 public class Dog extends Mammals {&lt;br /&gt;
 public String doWalking() {&lt;br /&gt;
 return &amp;quot;Dogs has been Informed to perform Walk Operation&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Now without creating object for dog and cat but we are instantiating the object for Mammals Factory class.&lt;br /&gt;
&lt;br /&gt;
 public class FactoryClient {&lt;br /&gt;
   public static void main(String args[]) {&lt;br /&gt;
       MammalsFactory mf = new MammalsFactory();&lt;br /&gt;
       System.out.println(mf.getMammalObject(&amp;quot;Dog&amp;quot;).doWalking());&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Comparison with other Creational Patterns ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Builder Pattern ===&lt;br /&gt;
In Factory pattern, the factory is in charge of creating various subtypes of an object depending on the needs.&lt;br /&gt;
 &lt;br /&gt;
Where as in Builder pattern, the composition of the objects might differ within the same subclass.&lt;br /&gt;
&lt;br /&gt;
An example of a Factory method CarCreate might return a Audi or a Toyota where as in the same scenario if we are using a Builder pattern, it allows us to create objects with finer granularity like specifying different engine specifications (a 4 cylinder engine or a 6 cylinder engine)for the objects.&lt;br /&gt;
As seen from the above example the Factory pattern is a simpler version of the Builder Pattern.&lt;br /&gt;
&lt;br /&gt;
UML diagram of Builder Pattern&lt;br /&gt;
&lt;br /&gt;
[[Image:Builder2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Prototype Pattern ===&lt;br /&gt;
The Prototype pattern creates a new object by cloning an existing object. The client using the prototype object does not need to know what kind of object it is dealing with as long as the concrete prototype extends or implements the prototype interface/class. The concrete prototype object is responsible for cloning itself and returning the cloned object.&lt;br /&gt;
The pattern enables a client to create the kind of object required at runtime by selecting the appropriate prototype. The prototype classes are created generically by the client without the client knowing the exact type of the concrete prototype. New concrete prototypes can be added at runtime as long as they conform to the abstract prototype.&lt;br /&gt;
&lt;br /&gt;
[[Image:prototype.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Abstract Factory Pattern ===&lt;br /&gt;
Abstract pattern is one level of abstraction higher than the factory pattern.&lt;br /&gt;
A Factory pattern is one that returns an instance of one of several possible classes depending on the data provided to it.&lt;br /&gt;
Usually all of the classes it returns have a common parent class and common methods, but each of them performs a task differently and is optimized for different kinds of data.&lt;br /&gt;
&lt;br /&gt;
There are several similar variations on the factory pattern:&lt;br /&gt;
  1. The base class is abstract and the pattern must return a complete working class. &lt;br /&gt;
  2. The base class contains default methods and is only sub-classed for cases where the default methods are insufficient.&lt;br /&gt;
  3. Parameters are passed to the factory telling it which of several class types to return. In this case the classes may share&lt;br /&gt;
     the same method names but may do something quite different.&lt;br /&gt;
&lt;br /&gt;
[[Image:abstractfactory.gif]]&lt;br /&gt;
&lt;br /&gt;
== External Links and References ==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Factory Design Pattern [http://en.wikipedia.org/wiki/Factory_method_pattern] &amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt; Abstract Factory Method[http://www.apwebco.com/gofpatterns/creational/AbstractFactory.html] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Factory v/s Abstract Factory Pattern[http://www.coderanch.com/t/99780/OO-Patterns-UML-Refactoring/Factory-Vs-Abstract-Factory-Pattern] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Builder Design Pattern v/s Factory Design Pattern[http://stackoverflow.com/questions/757743/what-is-the-difference-between-builder-design-pattern-and-factory-design-pattern]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Abstract Factory Method [http://userpages.umbc.edu/~tarr/dp/lectures/Factory.pdf]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; UML Diagram of Builder Pattern [http://en.wikipedia.org/wiki/Builder_pattern]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; UML Diagram of Prototype Design Pattern [http://www.apwebco.com/gofpatterns/creational/Prototype.html] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; UML Diagram of Abstract Factory Design Pattern [http://www.apwebco.com/gofpatterns/creational/AbstractFactory.html] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Factory Design Pattern Usage [http://www.developer.com/java/other/article.php/618421/Pattern-Summaries-Factory-Method.htm&lt;br /&gt;
]&amp;lt;/li&amp;gt;&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28850</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 AD</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28850"/>
		<updated>2009-11-18T23:24:56Z</updated>

		<summary type="html">&lt;p&gt;Apurush: /* External Links and References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Definition ==&lt;br /&gt;
&lt;br /&gt;
Factory Method is a creational pattern. This pattern helps to model an interface for creating an object which at creation time can let its subclasses decide which class to instantiate.It is called as Factory Pattern as it is responsible for &amp;quot;Manufacturing&amp;quot; an Object. It helps instantiate the appropriate Subclass by creating the right Object from a group of related classes. The Factory Pattern encourages loose coupling by eliminating the need to bind application-specific classes into the code.It Provide an interface for creating families of related or dependent objects without specifying their concrete classes.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This topic deals with the Factory method design pattern.It explains Factory design pattern and compares with other creational pattern to highlight the uniqueness and distinguishing features of the pattern.It also gives examples of where factory design pattern is used and scenarios wherein its more suitable than other creational patterns.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== In Depth Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Factory Patterns Insight ===&lt;br /&gt;
&lt;br /&gt;
Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.It means that Creator class is written without knowing what actual ConcreteProduct class will be instantiated. The ConcreteProduct class which is instantiated is determined solely by which ConcreteCreator subclass is instantiated and used by the application.&lt;br /&gt;
&lt;br /&gt;
[[Image:facuml.jpg]]&lt;br /&gt;
&lt;br /&gt;
Benefits&lt;br /&gt;
Code is made more flexible and reusable by the elimination of instantiation of application-specific classes,Code deals only with the interface of the Factory class and can work with any sub class that supports this interface&lt;br /&gt;
&lt;br /&gt;
=== Applicants of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
Use the Factory Method pattern in any of the following situations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;A class can't anticipate the class of objects it must create&lt;br /&gt;
&amp;lt;br&amp;gt;A class wants its subclasses to specify the objects it creates&lt;br /&gt;
&amp;lt;br&amp;gt;Classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclasses is the delegate.&lt;br /&gt;
&lt;br /&gt;
=== Examples of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
Factory design pattern can be explained by the following example. This example involves factory class called Mammals and it involves calling objects cat and dog with out actually creating an object for cat and dog class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 public class MammalsFactory {&lt;br /&gt;
    public static Mammals getMammalObject(String name) {&lt;br /&gt;
       if (name.equalsIgnoreCase(&amp;quot;Cat&amp;quot;)){&lt;br /&gt;
          return new Cat();&lt;br /&gt;
       } else {&lt;br /&gt;
          return new Dog();&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Here we will be passing an argument to the getMammalObject function based on the argument passed we return the Mammals object of the class.&lt;br /&gt;
&lt;br /&gt;
Abstract class is created so that dog ans cat can implement this class&lt;br /&gt;
&lt;br /&gt;
 public abstract class Mammals {&lt;br /&gt;
       public abstract String doWalking();&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The cat and dog class can be created to implement the abstract class as follows&lt;br /&gt;
&lt;br /&gt;
 public class Cat extends Mammals {&lt;br /&gt;
 public String doWalking() {&lt;br /&gt;
 return &amp;quot;Cats has been Informed to perform Walk Operation&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Dog class&lt;br /&gt;
&lt;br /&gt;
 public class Dog extends Mammals {&lt;br /&gt;
 public String doWalking() {&lt;br /&gt;
 return &amp;quot;Dogs has been Informed to perform Walk Operation&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Now without creating object for dog and cat but we are instantiating the object for Mammals Factory class.&lt;br /&gt;
&lt;br /&gt;
 public class FactoryClient {&lt;br /&gt;
   public static void main(String args[]) {&lt;br /&gt;
       MammalsFactory mf = new MammalsFactory();&lt;br /&gt;
       System.out.println(mf.getMammalObject(&amp;quot;Dog&amp;quot;).doWalking());&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Comparison with other Creational Patterns ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Builder Pattern ===&lt;br /&gt;
In Factory pattern, the factory is in charge of creating various subtypes of an object depending on the needs.&lt;br /&gt;
 &lt;br /&gt;
Where as in Builder pattern, the composition of the objects might differ within the same subclass.&lt;br /&gt;
&lt;br /&gt;
An example of a Factory method CarCreate might return a Audi or a Toyota where as in the same scenario if we are using a Builder pattern, it allows us to create objects with finer granularity like specifying different engine specifications (a 4 cylinder engine or a 6 cylinder engine)for the objects.&lt;br /&gt;
As seen from the above example the Factory pattern is a simpler version of the Builder Pattern.&lt;br /&gt;
&lt;br /&gt;
UML diagram of Builder Pattern&lt;br /&gt;
&lt;br /&gt;
[[Image:Builder2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Prototype Pattern ===&lt;br /&gt;
The Prototype pattern creates a new object by cloning an existing object. The client using the prototype object does not need to know what kind of object it is dealing with as long as the concrete prototype extends or implements the prototype interface/class. The concrete prototype object is responsible for cloning itself and returning the cloned object.&lt;br /&gt;
The pattern enables a client to create the kind of object required at runtime by selecting the appropriate prototype. The prototype classes are created generically by the client without the client knowing the exact type of the concrete prototype. New concrete prototypes can be added at runtime as long as they conform to the abstract prototype.&lt;br /&gt;
&lt;br /&gt;
[[Image:prototype.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Abstract Factory Pattern ===&lt;br /&gt;
Abstract pattern is one level of abstraction higher than the factory pattern.&lt;br /&gt;
A Factory pattern is one that returns an instance of one of several possible classes depending on the data provided to it.&lt;br /&gt;
Usually all of the classes it returns have a common parent class and common methods, but each of them performs a task differently and is optimized for different kinds of data.&lt;br /&gt;
&lt;br /&gt;
There are several similar variations on the factory pattern:&lt;br /&gt;
  1. The base class is abstract and the pattern must return a complete working class. &lt;br /&gt;
  2. The base class contains default methods and is only sub-classed for cases where the default methods are insufficient.&lt;br /&gt;
  3. Parameters are passed to the factory telling it which of several class types to return. In this case the classes may share&lt;br /&gt;
     the same method names but may do something quite different.&lt;br /&gt;
&lt;br /&gt;
[[Image:abstractfactory.gif]]&lt;br /&gt;
&lt;br /&gt;
== External Links and References ==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Factory Design Pattern [http://en.wikipedia.org/wiki/Factory_method_pattern] &amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt; Abstract Factory Method[http://www.apwebco.com/gofpatterns/creational/AbstractFactory.html] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Factory v/s Abstract Factory Pattern[http://www.coderanch.com/t/99780/OO-Patterns-UML-Refactoring/Factory-Vs-Abstract-Factory-Pattern] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Builder Design Pattern v/s Factory Design Pattern[http://stackoverflow.com/questions/757743/what-is-the-difference-between-builder-design-pattern-and-factory-design-pattern]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Abstract Factory Method [http://userpages.umbc.edu/~tarr/dp/lectures/Factory.pdf]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; UML Diagram of Builder Pattern [http://en.wikipedia.org/wiki/Builder_pattern]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; UML Diagram of Prototype Design Pattern [http://www.apwebco.com/gofpatterns/creational/Prototype.html] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; UML Diagram of Abstract Factory Design Pattern [http://www.apwebco.com/gofpatterns/creational/AbstractFactory.html] &amp;lt;/li&amp;gt;&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28849</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 AD</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28849"/>
		<updated>2009-11-18T23:24:42Z</updated>

		<summary type="html">&lt;p&gt;Apurush: /* External Links and References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Definition ==&lt;br /&gt;
&lt;br /&gt;
Factory Method is a creational pattern. This pattern helps to model an interface for creating an object which at creation time can let its subclasses decide which class to instantiate.It is called as Factory Pattern as it is responsible for &amp;quot;Manufacturing&amp;quot; an Object. It helps instantiate the appropriate Subclass by creating the right Object from a group of related classes. The Factory Pattern encourages loose coupling by eliminating the need to bind application-specific classes into the code.It Provide an interface for creating families of related or dependent objects without specifying their concrete classes.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This topic deals with the Factory method design pattern.It explains Factory design pattern and compares with other creational pattern to highlight the uniqueness and distinguishing features of the pattern.It also gives examples of where factory design pattern is used and scenarios wherein its more suitable than other creational patterns.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== In Depth Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Factory Patterns Insight ===&lt;br /&gt;
&lt;br /&gt;
Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.It means that Creator class is written without knowing what actual ConcreteProduct class will be instantiated. The ConcreteProduct class which is instantiated is determined solely by which ConcreteCreator subclass is instantiated and used by the application.&lt;br /&gt;
&lt;br /&gt;
[[Image:facuml.jpg]]&lt;br /&gt;
&lt;br /&gt;
Benefits&lt;br /&gt;
Code is made more flexible and reusable by the elimination of instantiation of application-specific classes,Code deals only with the interface of the Factory class and can work with any sub class that supports this interface&lt;br /&gt;
&lt;br /&gt;
=== Applicants of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
Use the Factory Method pattern in any of the following situations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;A class can't anticipate the class of objects it must create&lt;br /&gt;
&amp;lt;br&amp;gt;A class wants its subclasses to specify the objects it creates&lt;br /&gt;
&amp;lt;br&amp;gt;Classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclasses is the delegate.&lt;br /&gt;
&lt;br /&gt;
=== Examples of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
Factory design pattern can be explained by the following example. This example involves factory class called Mammals and it involves calling objects cat and dog with out actually creating an object for cat and dog class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 public class MammalsFactory {&lt;br /&gt;
    public static Mammals getMammalObject(String name) {&lt;br /&gt;
       if (name.equalsIgnoreCase(&amp;quot;Cat&amp;quot;)){&lt;br /&gt;
          return new Cat();&lt;br /&gt;
       } else {&lt;br /&gt;
          return new Dog();&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Here we will be passing an argument to the getMammalObject function based on the argument passed we return the Mammals object of the class.&lt;br /&gt;
&lt;br /&gt;
Abstract class is created so that dog ans cat can implement this class&lt;br /&gt;
&lt;br /&gt;
 public abstract class Mammals {&lt;br /&gt;
       public abstract String doWalking();&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The cat and dog class can be created to implement the abstract class as follows&lt;br /&gt;
&lt;br /&gt;
 public class Cat extends Mammals {&lt;br /&gt;
 public String doWalking() {&lt;br /&gt;
 return &amp;quot;Cats has been Informed to perform Walk Operation&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Dog class&lt;br /&gt;
&lt;br /&gt;
 public class Dog extends Mammals {&lt;br /&gt;
 public String doWalking() {&lt;br /&gt;
 return &amp;quot;Dogs has been Informed to perform Walk Operation&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Now without creating object for dog and cat but we are instantiating the object for Mammals Factory class.&lt;br /&gt;
&lt;br /&gt;
 public class FactoryClient {&lt;br /&gt;
   public static void main(String args[]) {&lt;br /&gt;
       MammalsFactory mf = new MammalsFactory();&lt;br /&gt;
       System.out.println(mf.getMammalObject(&amp;quot;Dog&amp;quot;).doWalking());&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Comparison with other Creational Patterns ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Builder Pattern ===&lt;br /&gt;
In Factory pattern, the factory is in charge of creating various subtypes of an object depending on the needs.&lt;br /&gt;
 &lt;br /&gt;
Where as in Builder pattern, the composition of the objects might differ within the same subclass.&lt;br /&gt;
&lt;br /&gt;
An example of a Factory method CarCreate might return a Audi or a Toyota where as in the same scenario if we are using a Builder pattern, it allows us to create objects with finer granularity like specifying different engine specifications (a 4 cylinder engine or a 6 cylinder engine)for the objects.&lt;br /&gt;
As seen from the above example the Factory pattern is a simpler version of the Builder Pattern.&lt;br /&gt;
&lt;br /&gt;
UML diagram of Builder Pattern&lt;br /&gt;
&lt;br /&gt;
[[Image:Builder2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Prototype Pattern ===&lt;br /&gt;
The Prototype pattern creates a new object by cloning an existing object. The client using the prototype object does not need to know what kind of object it is dealing with as long as the concrete prototype extends or implements the prototype interface/class. The concrete prototype object is responsible for cloning itself and returning the cloned object.&lt;br /&gt;
The pattern enables a client to create the kind of object required at runtime by selecting the appropriate prototype. The prototype classes are created generically by the client without the client knowing the exact type of the concrete prototype. New concrete prototypes can be added at runtime as long as they conform to the abstract prototype.&lt;br /&gt;
&lt;br /&gt;
[[Image:prototype.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Abstract Factory Pattern ===&lt;br /&gt;
Abstract pattern is one level of abstraction higher than the factory pattern.&lt;br /&gt;
A Factory pattern is one that returns an instance of one of several possible classes depending on the data provided to it.&lt;br /&gt;
Usually all of the classes it returns have a common parent class and common methods, but each of them performs a task differently and is optimized for different kinds of data.&lt;br /&gt;
&lt;br /&gt;
There are several similar variations on the factory pattern:&lt;br /&gt;
  1. The base class is abstract and the pattern must return a complete working class. &lt;br /&gt;
  2. The base class contains default methods and is only sub-classed for cases where the default methods are insufficient.&lt;br /&gt;
  3. Parameters are passed to the factory telling it which of several class types to return. In this case the classes may share&lt;br /&gt;
     the same method names but may do something quite different.&lt;br /&gt;
&lt;br /&gt;
[[Image:abstractfactory.gif]]&lt;br /&gt;
&lt;br /&gt;
== External Links and References ==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Factory Design Pattern [http://en.wikipedia.org/wiki/Factory_method_pattern] &amp;lt;li&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt; Abstract Factory Method[http://www.apwebco.com/gofpatterns/creational/AbstractFactory.html] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Factory v/s Abstract Factory Pattern[http://www.coderanch.com/t/99780/OO-Patterns-UML-Refactoring/Factory-Vs-Abstract-Factory-Pattern] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Builder Design Pattern v/s Factory Design Pattern[http://stackoverflow.com/questions/757743/what-is-the-difference-between-builder-design-pattern-and-factory-design-pattern]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Abstract Factory Method [http://userpages.umbc.edu/~tarr/dp/lectures/Factory.pdf]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; UML Diagram of Builder Pattern [http://en.wikipedia.org/wiki/Builder_pattern]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; UML Diagram of Prototype Design Pattern [http://www.apwebco.com/gofpatterns/creational/Prototype.html] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; UML Diagram of Abstract Factory Design Pattern [http://www.apwebco.com/gofpatterns/creational/AbstractFactory.html] &amp;lt;/li&amp;gt;&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28839</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 AD</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28839"/>
		<updated>2009-11-18T23:16:09Z</updated>

		<summary type="html">&lt;p&gt;Apurush: /* External Links and References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Definition ==&lt;br /&gt;
&lt;br /&gt;
Factory Method is a creational pattern. This pattern helps to model an interface for creating an object which at creation time can let its subclasses decide which class to instantiate.It is called as Factory Pattern as it is responsible for &amp;quot;Manufacturing&amp;quot; an Object. It helps instantiate the appropriate Subclass by creating the right Object from a group of related classes. The Factory Pattern encourages loose coupling by eliminating the need to bind application-specific classes into the code.It Provide an interface for creating families of related or dependent objects without specifying their concrete classes.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This topic deals with the Factory method design pattern.It explains Factory design pattern and compares with other creational pattern to highlight the uniqueness and distinguishing features of the pattern.It also gives examples of where factory design pattern is used and scenarios wherein its more suitable than other creational patterns.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== In Depth Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Factory Patterns Insight ===&lt;br /&gt;
&lt;br /&gt;
Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.It means that Factory is written without knowing what actual sub class will be instantiated. The subclass which is instantiated is determined solely by which subclass is instantiated and used by the application.&lt;br /&gt;
&lt;br /&gt;
Factory method framework can be shown in the figure below.In the below figure the createDocument() method is a factory method.  &lt;br /&gt;
[[Image:facuml.jpg]]&lt;br /&gt;
&lt;br /&gt;
Benefits&lt;br /&gt;
Code is made more flexible and reusable by the elimination of instantiation of application-specific classes,Code deals only with the interface of the Factory class and can work with any sub class that supports this interface&lt;br /&gt;
&lt;br /&gt;
=== Applicants of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
Use the Factory Method pattern in any of the following situations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;A class can't anticipate the class of objects it must create&lt;br /&gt;
&amp;lt;br&amp;gt;A class wants its subclasses to specify the objects it creates&lt;br /&gt;
&lt;br /&gt;
=== Examples of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
Factory design pattern can be explained by the following example. This example involves factory class called Mammals and it involves calling objects cat and dog with out actually creating an object for cat and dog class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 public class MammalsFactory {&lt;br /&gt;
    public static Mammals getMammalObject(String name) {&lt;br /&gt;
       if (name.equalsIgnoreCase(&amp;quot;Cat&amp;quot;)){&lt;br /&gt;
          return new Cat();&lt;br /&gt;
       } else {&lt;br /&gt;
          return new Dog();&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Here we will be passing an argument to the getMammalObject function based on the argument passed we return the Mammals object of the class.&lt;br /&gt;
&lt;br /&gt;
Abstract class is created so that dog ans cat can implement this class&lt;br /&gt;
&lt;br /&gt;
 public abstract class Mammals {&lt;br /&gt;
       public abstract String doWalking();&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The cat and dog class can be created to implement the abstract class as follows&lt;br /&gt;
&lt;br /&gt;
 public class Cat extends Mammals {&lt;br /&gt;
 public String doWalking() {&lt;br /&gt;
 return &amp;quot;Cats has been Informed to perform Walk Operation&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Dog class&lt;br /&gt;
&lt;br /&gt;
 public class Dog extends Mammals {&lt;br /&gt;
 public String doWalking() {&lt;br /&gt;
 return &amp;quot;Dogs has been Informed to perform Walk Operation&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Now without creating object for dog and cat but we are instantiating the object for Mammals Factory class.&lt;br /&gt;
&lt;br /&gt;
 public class FactoryClient {&lt;br /&gt;
   public static void main(String args[]) {&lt;br /&gt;
       MammalsFactory mf = new MammalsFactory();&lt;br /&gt;
       System.out.println(mf.getMammalObject(&amp;quot;Dog&amp;quot;).doWalking());&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Comparison with other Creational Patterns ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Builder Pattern ===&lt;br /&gt;
In Factory pattern, the factory is in charge of creating various subtypes of an object depending on the needs.&lt;br /&gt;
 &lt;br /&gt;
Where as in Builder pattern, the composition of the objects might differ within the same subclass.&lt;br /&gt;
&lt;br /&gt;
An example of a Factory method CarCreate might return a Audi or a Toyota where as in the same scenario if we are using a Builder pattern, it allows us to create objects with finer granularity like specifying different engine specifications (a 4 cylinder engine or a 6 cylinder engine)for the objects.&lt;br /&gt;
As seen from the above example the Factory pattern is a simpler version of the Builder Pattern.&lt;br /&gt;
&lt;br /&gt;
UML diagram of Builder Pattern&lt;br /&gt;
&lt;br /&gt;
[[Image:Builder2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Prototype Pattern ===&lt;br /&gt;
The Prototype pattern creates a new object by cloning an existing object. The client using the prototype object does not need to know what kind of object it is dealing with as long as the concrete prototype extends or implements the prototype interface/class. The concrete prototype object is responsible for cloning itself and returning the cloned object.&lt;br /&gt;
The pattern enables a client to create the kind of object required at runtime by selecting the appropriate prototype. The prototype classes are created generically by the client without the client knowing the exact type of the concrete prototype. New concrete prototypes can be added at runtime as long as they conform to the abstract prototype.&lt;br /&gt;
&lt;br /&gt;
[[Image:prototype.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Abstract Factory Pattern ===&lt;br /&gt;
Abstract pattern is one level of abstraction higher than the factory pattern.&lt;br /&gt;
A Factory pattern is one that returns an instance of one of several possible classes depending on the data provided to it.&lt;br /&gt;
Usually all of the classes it returns have a common parent class and common methods, but each of them performs a task differently and is optimized for different kinds of data.&lt;br /&gt;
&lt;br /&gt;
There are several similar variations on the factory pattern:&lt;br /&gt;
  1. The base class is abstract and the pattern must return a complete working class. &lt;br /&gt;
  2. The base class contains default methods and is only sub-classed for cases where the default methods are insufficient.&lt;br /&gt;
  3. Parameters are passed to the factory telling it which of several class types to return. In this case the classes may share&lt;br /&gt;
     the same method names but may do something quite different.&lt;br /&gt;
&lt;br /&gt;
[[Image:abstractfactory.gif]]&lt;br /&gt;
&lt;br /&gt;
== External Links and References ==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Abstract Factory Method[http://www.apwebco.com/gofpatterns/creational/AbstractFactory.html] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Factory v/s Abstract Factory Pattern[http://www.coderanch.com/t/99780/OO-Patterns-UML-Refactoring/Factory-Vs-Abstract-Factory-Pattern] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Builder Design Pattern v/s Factory Design Pattern[http://stackoverflow.com/questions/757743/what-is-the-difference-between-builder-design-pattern-and-factory-design-pattern]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Abstract Factory Method [http://userpages.umbc.edu/~tarr/dp/lectures/Factory.pdf]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UML Diagram of Builder Pattern [http://en.wikipedia.org/wiki/Builder_pattern]&amp;lt;/li&amp;gt;&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28837</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 AD</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28837"/>
		<updated>2009-11-18T23:15:19Z</updated>

		<summary type="html">&lt;p&gt;Apurush: /* Comparison with other Creational Patterns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Definition ==&lt;br /&gt;
&lt;br /&gt;
Factory Method is a creational pattern. This pattern helps to model an interface for creating an object which at creation time can let its subclasses decide which class to instantiate.It is called as Factory Pattern as it is responsible for &amp;quot;Manufacturing&amp;quot; an Object. It helps instantiate the appropriate Subclass by creating the right Object from a group of related classes. The Factory Pattern encourages loose coupling by eliminating the need to bind application-specific classes into the code.It Provide an interface for creating families of related or dependent objects without specifying their concrete classes.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This topic deals with the Factory method design pattern.It explains Factory design pattern and compares with other creational pattern to highlight the uniqueness and distinguishing features of the pattern.It also gives examples of where factory design pattern is used and scenarios wherein its more suitable than other creational patterns.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== In Depth Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Factory Patterns Insight ===&lt;br /&gt;
&lt;br /&gt;
Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.It means that Factory is written without knowing what actual sub class will be instantiated. The subclass which is instantiated is determined solely by which subclass is instantiated and used by the application.&lt;br /&gt;
&lt;br /&gt;
Factory method framework can be shown in the figure below.In the below figure the createDocument() method is a factory method.  &lt;br /&gt;
[[Image:fac1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Benefits&lt;br /&gt;
Code is made more flexible and reusable by the elimination of instantiation of application-specific classes,Code deals only with the interface of the Factory class and can work with any sub class that supports this interface&lt;br /&gt;
&lt;br /&gt;
=== Applicants of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
Use the Factory Method pattern in any of the following situations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;A class can't anticipate the class of objects it must create&lt;br /&gt;
&amp;lt;br&amp;gt;A class wants its subclasses to specify the objects it creates&lt;br /&gt;
&lt;br /&gt;
=== Examples of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
Factory design pattern can be explained by the following example. This example involves factory class called Mammals and it involves calling objects cat and dog with out actually creating an object for cat and dog class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 public class MammalsFactory {&lt;br /&gt;
    public static Mammals getMammalObject(String name) {&lt;br /&gt;
       if (name.equalsIgnoreCase(&amp;quot;Cat&amp;quot;)){&lt;br /&gt;
          return new Cat();&lt;br /&gt;
       } else {&lt;br /&gt;
          return new Dog();&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Here we will be passing an argument to the getMammalObject function based on the argument passed we return the Mammals object of the class.&lt;br /&gt;
&lt;br /&gt;
Abstract class is created so that dog ans cat can implement this class&lt;br /&gt;
&lt;br /&gt;
 public abstract class Mammals {&lt;br /&gt;
       public abstract String doWalking();&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The cat and dog class can be created to implement the abstract class as follows&lt;br /&gt;
&lt;br /&gt;
 public class Cat extends Mammals {&lt;br /&gt;
 public String doWalking() {&lt;br /&gt;
 return &amp;quot;Cats has been Informed to perform Walk Operation&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Dog class&lt;br /&gt;
&lt;br /&gt;
 public class Dog extends Mammals {&lt;br /&gt;
 public String doWalking() {&lt;br /&gt;
 return &amp;quot;Dogs has been Informed to perform Walk Operation&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Now without creating object for dog and cat but we are instantiating the object for Mammals Factory class.&lt;br /&gt;
&lt;br /&gt;
 public class FactoryClient {&lt;br /&gt;
   public static void main(String args[]) {&lt;br /&gt;
       MammalsFactory mf = new MammalsFactory();&lt;br /&gt;
       System.out.println(mf.getMammalObject(&amp;quot;Dog&amp;quot;).doWalking());&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Comparison with other Creational Patterns ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Builder Pattern ===&lt;br /&gt;
In Factory pattern, the factory is in charge of creating various subtypes of an object depending on the needs.&lt;br /&gt;
 &lt;br /&gt;
Where as in Builder pattern, the composition of the objects might differ within the same subclass.&lt;br /&gt;
&lt;br /&gt;
An example of a Factory method CarCreate might return a Audi or a Toyota where as in the same scenario if we are using a Builder pattern, it allows us to create objects with finer granularity like specifying different engine specifications (a 4 cylinder engine or a 6 cylinder engine)for the objects.&lt;br /&gt;
As seen from the above example the Factory pattern is a simpler version of the Builder Pattern.&lt;br /&gt;
&lt;br /&gt;
UML diagram of Builder Pattern&lt;br /&gt;
&lt;br /&gt;
[[Image:Builder2.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Prototype Pattern ===&lt;br /&gt;
The Prototype pattern creates a new object by cloning an existing object. The client using the prototype object does not need to know what kind of object it is dealing with as long as the concrete prototype extends or implements the prototype interface/class. The concrete prototype object is responsible for cloning itself and returning the cloned object.&lt;br /&gt;
The pattern enables a client to create the kind of object required at runtime by selecting the appropriate prototype. The prototype classes are created generically by the client without the client knowing the exact type of the concrete prototype. New concrete prototypes can be added at runtime as long as they conform to the abstract prototype.&lt;br /&gt;
&lt;br /&gt;
[[Image:prototype.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Abstract Factory Pattern ===&lt;br /&gt;
Abstract pattern is one level of abstraction higher than the factory pattern.&lt;br /&gt;
A Factory pattern is one that returns an instance of one of several possible classes depending on the data provided to it.&lt;br /&gt;
Usually all of the classes it returns have a common parent class and common methods, but each of them performs a task differently and is optimized for different kinds of data.&lt;br /&gt;
&lt;br /&gt;
There are several similar variations on the factory pattern:&lt;br /&gt;
  1. The base class is abstract and the pattern must return a complete working class. &lt;br /&gt;
  2. The base class contains default methods and is only sub-classed for cases where the default methods are insufficient.&lt;br /&gt;
  3. Parameters are passed to the factory telling it which of several class types to return. In this case the classes may share&lt;br /&gt;
     the same method names but may do something quite different.&lt;br /&gt;
&lt;br /&gt;
[[Image:abstractfactory.gif]]&lt;br /&gt;
&lt;br /&gt;
== External Links and References ==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Abstract Factory Method[http://www.apwebco.com/gofpatterns/creational/AbstractFactory.html] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Factory v/s Abstract Factory Pattern[http://www.coderanch.com/t/99780/OO-Patterns-UML-Refactoring/Factory-Vs-Abstract-Factory-Pattern] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Builder Design Pattern v/s Factory Design Pattern[http://stackoverflow.com/questions/757743/what-is-the-difference-between-builder-design-pattern-and-factory-design-pattern]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Abstract Factory Method [http://userpages.umbc.edu/~tarr/dp/lectures/Factory.pdf]&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28835</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 AD</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28835"/>
		<updated>2009-11-18T23:14:42Z</updated>

		<summary type="html">&lt;p&gt;Apurush: /* External Links and References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Definition ==&lt;br /&gt;
&lt;br /&gt;
Factory Method is a creational pattern. This pattern helps to model an interface for creating an object which at creation time can let its subclasses decide which class to instantiate.It is called as Factory Pattern as it is responsible for &amp;quot;Manufacturing&amp;quot; an Object. It helps instantiate the appropriate Subclass by creating the right Object from a group of related classes. The Factory Pattern encourages loose coupling by eliminating the need to bind application-specific classes into the code.It Provide an interface for creating families of related or dependent objects without specifying their concrete classes.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This topic deals with the Factory method design pattern.It explains Factory design pattern and compares with other creational pattern to highlight the uniqueness and distinguishing features of the pattern.It also gives examples of where factory design pattern is used and scenarios wherein its more suitable than other creational patterns.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== In Depth Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Factory Patterns Insight ===&lt;br /&gt;
&lt;br /&gt;
Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.It means that Factory is written without knowing what actual sub class will be instantiated. The subclass which is instantiated is determined solely by which subclass is instantiated and used by the application.&lt;br /&gt;
&lt;br /&gt;
Factory method framework can be shown in the figure below.In the below figure the createDocument() method is a factory method.  &lt;br /&gt;
[[Image:fac1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Benefits&lt;br /&gt;
Code is made more flexible and reusable by the elimination of instantiation of application-specific classes,Code deals only with the interface of the Factory class and can work with any sub class that supports this interface&lt;br /&gt;
&lt;br /&gt;
=== Applicants of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
Use the Factory Method pattern in any of the following situations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;A class can't anticipate the class of objects it must create&lt;br /&gt;
&amp;lt;br&amp;gt;A class wants its subclasses to specify the objects it creates&lt;br /&gt;
&lt;br /&gt;
=== Examples of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
Factory design pattern can be explained by the following example. This example involves factory class called Mammals and it involves calling objects cat and dog with out actually creating an object for cat and dog class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 public class MammalsFactory {&lt;br /&gt;
    public static Mammals getMammalObject(String name) {&lt;br /&gt;
       if (name.equalsIgnoreCase(&amp;quot;Cat&amp;quot;)){&lt;br /&gt;
          return new Cat();&lt;br /&gt;
       } else {&lt;br /&gt;
          return new Dog();&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Here we will be passing an argument to the getMammalObject function based on the argument passed we return the Mammals object of the class.&lt;br /&gt;
&lt;br /&gt;
Abstract class is created so that dog ans cat can implement this class&lt;br /&gt;
&lt;br /&gt;
 public abstract class Mammals {&lt;br /&gt;
       public abstract String doWalking();&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The cat and dog class can be created to implement the abstract class as follows&lt;br /&gt;
&lt;br /&gt;
 public class Cat extends Mammals {&lt;br /&gt;
 public String doWalking() {&lt;br /&gt;
 return &amp;quot;Cats has been Informed to perform Walk Operation&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Dog class&lt;br /&gt;
&lt;br /&gt;
 public class Dog extends Mammals {&lt;br /&gt;
 public String doWalking() {&lt;br /&gt;
 return &amp;quot;Dogs has been Informed to perform Walk Operation&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Now without creating object for dog and cat but we are instantiating the object for Mammals Factory class.&lt;br /&gt;
&lt;br /&gt;
 public class FactoryClient {&lt;br /&gt;
   public static void main(String args[]) {&lt;br /&gt;
       MammalsFactory mf = new MammalsFactory();&lt;br /&gt;
       System.out.println(mf.getMammalObject(&amp;quot;Dog&amp;quot;).doWalking());&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Comparison with other Creational Patterns ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Builder Pattern ===&lt;br /&gt;
In Factory pattern, the factory is in charge of creating various subtypes of an object depending on the needs.&lt;br /&gt;
 &lt;br /&gt;
Where as in Builder pattern, the composition of the objects might differ within the same subclass.&lt;br /&gt;
&lt;br /&gt;
An example of a Factory method CarCreate might return a Audi or a Toyota where as in the same scenario if we are using a Builder pattern, it allows us to create objects with finer granularity like specifying different engine specifications (a 4 cylinder engine or a 6 cylinder engine)for the objects.&lt;br /&gt;
As seen from the above example the Factory pattern is a simpler version of the Builder Pattern.&lt;br /&gt;
&lt;br /&gt;
UML diagram of Builder Pattern&lt;br /&gt;
&lt;br /&gt;
[[Image:Builder2.png]]&lt;br /&gt;
Source: [http://en.wikipedia.org/wiki/Builder_pattern]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Prototype Pattern ===&lt;br /&gt;
The Prototype pattern creates a new object by cloning an existing object. The client using the prototype object does not need to know what kind of object it is dealing with as long as the concrete prototype extends or implements the prototype interface/class. The concrete prototype object is responsible for cloning itself and returning the cloned object.&lt;br /&gt;
The pattern enables a client to create the kind of object required at runtime by selecting the appropriate prototype. The prototype classes are created generically by the client without the client knowing the exact type of the concrete prototype. New concrete prototypes can be added at runtime as long as they conform to the abstract prototype.&lt;br /&gt;
&lt;br /&gt;
[[Image:prototype.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Abstract Factory Pattern ===&lt;br /&gt;
Abstract pattern is one level of abstraction higher than the factory pattern.&lt;br /&gt;
A Factory pattern is one that returns an instance of one of several possible classes depending on the data provided to it.&lt;br /&gt;
Usually all of the classes it returns have a common parent class and common methods, but each of them performs a task differently and is optimized for different kinds of data.&lt;br /&gt;
&lt;br /&gt;
There are several similar variations on the factory pattern:&lt;br /&gt;
  1. The base class is abstract and the pattern must return a complete working class. &lt;br /&gt;
  2. The base class contains default methods and is only sub-classed for cases where the default methods are insufficient.&lt;br /&gt;
  3. Parameters are passed to the factory telling it which of several class types to return. In this case the classes may share&lt;br /&gt;
     the same method names but may do something quite different.&lt;br /&gt;
&lt;br /&gt;
[[Image:abstractfactory.gif]]&lt;br /&gt;
&lt;br /&gt;
== External Links and References ==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Abstract Factory Method[http://www.apwebco.com/gofpatterns/creational/AbstractFactory.html] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Factory v/s Abstract Factory Pattern[http://www.coderanch.com/t/99780/OO-Patterns-UML-Refactoring/Factory-Vs-Abstract-Factory-Pattern] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Builder Design Pattern v/s Factory Design Pattern[http://stackoverflow.com/questions/757743/what-is-the-difference-between-builder-design-pattern-and-factory-design-pattern]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Abstract Factory Method [http://userpages.umbc.edu/~tarr/dp/lectures/Factory.pdf]&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28828</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 AD</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28828"/>
		<updated>2009-11-18T23:01:37Z</updated>

		<summary type="html">&lt;p&gt;Apurush: /* External Links and References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Definition ==&lt;br /&gt;
&lt;br /&gt;
Factory Method is a creational pattern. This pattern helps to model an interface for creating an object which at creation time can let its subclasses decide which class to instantiate.It is called as Factory Pattern as it is responsible for &amp;quot;Manufacturing&amp;quot; an Object. It helps instantiate the appropriate Subclass by creating the right Object from a group of related classes. The Factory Pattern encourages loose coupling by eliminating the need to bind application-specific classes into the code.It Provide an interface for creating families of related or dependent objects without specifying their concrete classes.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This topic deals with the Factory method design pattern.It explains Factory design pattern and compares with other creational pattern to highlight the uniqueness and distinguishing features of the pattern.It also gives examples of where factory design pattern is used and scenarios wherein its more suitable than other creational patterns.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== In Depth Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Factory Patterns Insight ===&lt;br /&gt;
&lt;br /&gt;
Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.It means that Factory is written without knowing what actual sub class will be instantiated. The subclass which is instantiated is determined solely by which subclass is instantiated and used by the application.&lt;br /&gt;
&lt;br /&gt;
Factory method framework can be shown in the figure below.In the below figure the createDocument() method is a factory method.  &lt;br /&gt;
[[Image:fac.jpg]]&lt;br /&gt;
&lt;br /&gt;
Benefits&lt;br /&gt;
Code is made more flexible and reusable by the elimination of instantiation of application-specific classes,Code deals only with the interface of the Factory class and can work with any sub class that supports this interface&lt;br /&gt;
&lt;br /&gt;
=== Applicants of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
=== Examples of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
Factory design pattern can be explained by the following example. This example involves factory class called Mammals and it involves calling objects cat and dog with out actually creating an object for cat and dog class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 public class MammalsFactory {&lt;br /&gt;
    public static Mammals getMammalObject(String name) {&lt;br /&gt;
       if (name.equalsIgnoreCase(&amp;quot;Cat&amp;quot;)){&lt;br /&gt;
          return new Cat();&lt;br /&gt;
       } else {&lt;br /&gt;
          return new Dog();&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Here we will be passing an argument to the getMammalObject function based on the argument passed we return the Mammals object of the class.&lt;br /&gt;
&lt;br /&gt;
Abstract class is created so that dog ans cat can implement this class&lt;br /&gt;
&lt;br /&gt;
 public abstract class Mammals {&lt;br /&gt;
       public abstract String doWalking();&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The cat and dog class can be created to implement the abstract class as follows&lt;br /&gt;
&lt;br /&gt;
 public class Cat extends Mammals {&lt;br /&gt;
 public String doWalking() {&lt;br /&gt;
 return &amp;quot;Cats has been Informed to perform Walk Operation&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Dog class&lt;br /&gt;
&lt;br /&gt;
 public class Dog extends Mammals {&lt;br /&gt;
 public String doWalking() {&lt;br /&gt;
 return &amp;quot;Dogs has been Informed to perform Walk Operation&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Now without creating object for dog and cat but we are instantiating the object for Mammals Factory class.&lt;br /&gt;
&lt;br /&gt;
 public class FactoryClient {&lt;br /&gt;
   public static void main(String args[]) {&lt;br /&gt;
       MammalsFactory mf = new MammalsFactory();&lt;br /&gt;
       System.out.println(mf.getMammalObject(&amp;quot;Dog&amp;quot;).doWalking());&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Comparison with other Creational Patterns ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Builder Pattern ===&lt;br /&gt;
In Factory pattern, the factory is in charge of creating various subtypes of an object depending on the needs.&lt;br /&gt;
 &lt;br /&gt;
Where as in Builder pattern, the composition of the objects might differ within the same subclass.&lt;br /&gt;
&lt;br /&gt;
An example of a Factory method CarCreate might return a Audi or a Toyota where as in the same scenario if we are using a Builder pattern, it allows us to create objects with finer granularity like specifying different engine specifications (a 4 cylinder engine or a 6 cylinder engine)for the objects.&lt;br /&gt;
As seen from the above example the Factory pattern is a simpler version of the Builder Pattern.&lt;br /&gt;
&lt;br /&gt;
UML diagram of Builder Pattern&lt;br /&gt;
&lt;br /&gt;
[[Image:Builder2.png]]&lt;br /&gt;
Source: [http://en.wikipedia.org/wiki/Builder_pattern]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Prototype Pattern ===&lt;br /&gt;
The Prototype pattern creates a new object by cloning an existing object. The client using the prototype object does not need to know what kind of object it is dealing with as long as the concrete prototype extends or implements the prototype interface/class. The concrete prototype object is responsible for cloning itself and returning the cloned object.&lt;br /&gt;
The pattern enables a client to create the kind of object required at runtime by selecting the appropriate prototype. The prototype classes are created generically by the client without the client knowing the exact type of the concrete prototype. New concrete prototypes can be added at runtime as long as they conform to the abstract prototype.&lt;br /&gt;
&lt;br /&gt;
[[Image:prototype.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Abstract Factory Pattern ===&lt;br /&gt;
Abstract pattern is one level of abstraction higher than the factory pattern.&lt;br /&gt;
A Factory pattern is one that returns an instance of one of several possible classes depending on the data provided to it.&lt;br /&gt;
Usually all of the classes it returns have a common parent class and common methods, but each of them performs a task differently and is optimized for different kinds of data.&lt;br /&gt;
&lt;br /&gt;
There are several similar variations on the factory pattern:&lt;br /&gt;
  1. The base class is abstract and the pattern must return a complete working class. &lt;br /&gt;
  2. The base class contains default methods and is only sub-classed for cases where the default methods are insufficient.&lt;br /&gt;
  3. Parameters are passed to the factory telling it which of several class types to return. In this case the classes may share&lt;br /&gt;
     the same method names but may do something quite different.&lt;br /&gt;
&lt;br /&gt;
[[Image:abstractfactory.gif]]&lt;br /&gt;
&lt;br /&gt;
== External Links and References ==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.apwebco.com/gofpatterns/creational/AbstractFactory.html] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;le&amp;gt;[http://www.coderanch.com/t/99780/OO-Patterns-UML-Refactoring/Factory-Vs-Abstract-Factory-Pattern] &amp;lt;/li&amp;gt;&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28149</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 AD</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28149"/>
		<updated>2009-11-18T05:26:55Z</updated>

		<summary type="html">&lt;p&gt;Apurush: /* Comparison with Abstract Factory Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Definition ==&lt;br /&gt;
&lt;br /&gt;
Factory Method is a creational pattern. This pattern helps to model an interface for creating an object which at creation time can let its subclasses decide which class to instantiate.It is called as Factory Pattern as it is responsible for &amp;quot;Manufacturing&amp;quot; an Object. It helps instantiate the appropriate Subclass by creating the right Object from a group of related classes. The Factory Pattern encourages loose coupling by eliminating the need to bind application-specific classes into the code.It Provide an interface for creating families of related or dependent objects without specifying their concrete classes.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This topic deals with the Factory method design pattern.It explains Factory design pattern and compares with other creational pattern to highlight the uniqueness and distinguishing features of the pattern.It also gives examples of where factory design pattern is used and scenarios wherein its more suitable than other creational patterns.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== In Depth Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Factory Patterns Insight ===&lt;br /&gt;
&lt;br /&gt;
Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.It means that Factory is written without knowing what actual sub class will be instantiated. The subclass which is instantiated is determined solely by which subclass is instantiated and used by the application.&lt;br /&gt;
&lt;br /&gt;
Factory method framework can be shown in the figure below.In the below figure the createDocument() method is a factory method.  &lt;br /&gt;
[[Image:fac.jpg]]&lt;br /&gt;
&lt;br /&gt;
Benefits&lt;br /&gt;
Code is made more flexible and reusable by the elimination of instantiation of application-specific classes,Code deals only with the interface of the Factory class and can work with any sub class that supports this interface&lt;br /&gt;
&lt;br /&gt;
=== Applicants of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
=== Examples of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
== Comparison with other Creational Patterns ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Builder Pattern ===&lt;br /&gt;
In Factory pattern, the factory is in charge of creating various subtypes of an object depending on the needs.&lt;br /&gt;
 &lt;br /&gt;
Where as in Builder pattern, the composition of the objects might differ within the same subclass.&lt;br /&gt;
&lt;br /&gt;
An example of a Factory method CarCreate might return a Audi or a Toyota where as in the same scenario if we are using a Builder pattern, it allows us to create objects with finer granularity like specifying different engine specifications (a 4 cylinder engine or a 6 cylinder engine)for the objects.&lt;br /&gt;
As seen from the above example the Factory pattern is a simpler version of the Builder Pattern.&lt;br /&gt;
&lt;br /&gt;
UML diagram of Builder Pattern&lt;br /&gt;
&lt;br /&gt;
[[Image:Builder2.png]]&lt;br /&gt;
Source: [http://en.wikipedia.org/wiki/Builder_pattern]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Prototype Pattern ===&lt;br /&gt;
The Prototype pattern creates a new object by cloning an existing object. The client using the prototype object does not need to know what kind of object it is dealing with as long as the concrete prototype extends or implements the prototype interface/class. The concrete prototype object is responsible for cloning itself and returning the cloned object.&lt;br /&gt;
The pattern enables a client to create the kind of object required at runtime by selecting the appropriate prototype. The prototype classes are created generically by the client without the client knowing the exact type of the concrete prototype. New concrete prototypes can be added at runtime as long as they conform to the abstract prototype.&lt;br /&gt;
&lt;br /&gt;
[[Image:prototype.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Abstract Factory Pattern ===&lt;br /&gt;
Abstract pattern is one level of abstraction higher than the factory pattern.&lt;br /&gt;
A Factory pattern is one that returns an instance of one of several possible classes depending on the data provided to it.&lt;br /&gt;
Usually all of the classes it returns have a common parent class and common methods, but each of them performs a task differently and is optimized for different kinds of data.&lt;br /&gt;
&lt;br /&gt;
There are several similar variations on the factory pattern:&lt;br /&gt;
  1. The base class is abstract and the pattern must return a complete working class. &lt;br /&gt;
  2. The base class contains default methods and is only sub-classed for cases where the default methods are insufficient.&lt;br /&gt;
  3. Parameters are passed to the factory telling it which of several class types to return. In this case the classes may share&lt;br /&gt;
     the same method names but may do something quite different.&lt;br /&gt;
&lt;br /&gt;
[[Image:abstractfactory.gif]]&lt;br /&gt;
&lt;br /&gt;
== External Links and References ==&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28145</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 AD</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28145"/>
		<updated>2009-11-18T05:25:18Z</updated>

		<summary type="html">&lt;p&gt;Apurush: /* Comparison with Abstract Factory Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Definition ==&lt;br /&gt;
&lt;br /&gt;
Factory Method is a creational pattern. This pattern helps to model an interface for creating an object which at creation time can let its subclasses decide which class to instantiate.It is called as Factory Pattern as it is responsible for &amp;quot;Manufacturing&amp;quot; an Object. It helps instantiate the appropriate Subclass by creating the right Object from a group of related classes. The Factory Pattern encourages loose coupling by eliminating the need to bind application-specific classes into the code.It Provide an interface for creating families of related or dependent objects without specifying their concrete classes.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This topic deals with the Factory method design pattern.It explains Factory design pattern and compares with other creational pattern to highlight the uniqueness and distinguishing features of the pattern.It also gives examples of where factory design pattern is used and scenarios wherein its more suitable than other creational patterns.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== In Depth Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Factory Patterns Insight ===&lt;br /&gt;
&lt;br /&gt;
Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.It means that Factory is written without knowing what actual sub class will be instantiated. The subclass which is instantiated is determined solely by which subclass is instantiated and used by the application.&lt;br /&gt;
&lt;br /&gt;
Factory method framework can be shown in the figure below.In the below figure the createDocument() method is a factory method.  &lt;br /&gt;
[[Image:fac.jpg]]&lt;br /&gt;
&lt;br /&gt;
Benefits&lt;br /&gt;
Code is made more flexible and reusable by the elimination of instantiation of application-specific classes,Code deals only with the interface of the Factory class and can work with any sub class that supports this interface&lt;br /&gt;
&lt;br /&gt;
=== Applicants of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
=== Examples of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
== Comparison with other Creational Patterns ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Builder Pattern ===&lt;br /&gt;
In Factory pattern, the factory is in charge of creating various subtypes of an object depending on the needs.&lt;br /&gt;
 &lt;br /&gt;
Where as in Builder pattern, the composition of the objects might differ within the same subclass.&lt;br /&gt;
&lt;br /&gt;
An example of a Factory method CarCreate might return a Audi or a Toyota where as in the same scenario if we are using a Builder pattern, it allows us to create objects with finer granularity like specifying different engine specifications (a 4 cylinder engine or a 6 cylinder engine)for the objects.&lt;br /&gt;
As seen from the above example the Factory pattern is a simpler version of the Builder Pattern.&lt;br /&gt;
&lt;br /&gt;
UML diagram of Builder Pattern&lt;br /&gt;
&lt;br /&gt;
[[Image:Builder2.png]]&lt;br /&gt;
Source: [http://en.wikipedia.org/wiki/Builder_pattern]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Prototype Pattern ===&lt;br /&gt;
The Prototype pattern creates a new object by cloning an existing object. The client using the prototype object does not need to know what kind of object it is dealing with as long as the concrete prototype extends or implements the prototype interface/class. The concrete prototype object is responsible for cloning itself and returning the cloned object.&lt;br /&gt;
The pattern enables a client to create the kind of object required at runtime by selecting the appropriate prototype. The prototype classes are created generically by the client without the client knowing the exact type of the concrete prototype. New concrete prototypes can be added at runtime as long as they conform to the abstract prototype.&lt;br /&gt;
&lt;br /&gt;
[[Image:prototype.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Abstract Factory Pattern ===&lt;br /&gt;
Abstract pattern is one level of abstraction higher than the factory pattern.&lt;br /&gt;
A Factory pattern is one that returns an instance of one of several possible classes depending on the data provided to it.&lt;br /&gt;
Usually all of the classes it returns have a common parent class and common methods, but each of them performs a task differently and is optimized for different kinds of data.&lt;br /&gt;
&lt;br /&gt;
There are several similar variations on the factory pattern:&lt;br /&gt;
  1. The base class is abstract and the pattern must return a complete working class. &lt;br /&gt;
  2. The base class contains default methods and is only sub-classed for cases where the default methods are insufficient.&lt;br /&gt;
  3. Parameters are passed to the factory telling it which of several class types to return. In this case the classes may share the same method names but may do something quite different.&lt;br /&gt;
&lt;br /&gt;
[[Image:abstractfactory.gif]]&lt;br /&gt;
&lt;br /&gt;
== External Links and References ==&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28144</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 AD</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28144"/>
		<updated>2009-11-18T05:24:00Z</updated>

		<summary type="html">&lt;p&gt;Apurush: /* Comparison with Abstract Factory Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Definition ==&lt;br /&gt;
&lt;br /&gt;
Factory Method is a creational pattern. This pattern helps to model an interface for creating an object which at creation time can let its subclasses decide which class to instantiate.It is called as Factory Pattern as it is responsible for &amp;quot;Manufacturing&amp;quot; an Object. It helps instantiate the appropriate Subclass by creating the right Object from a group of related classes. The Factory Pattern encourages loose coupling by eliminating the need to bind application-specific classes into the code.It Provide an interface for creating families of related or dependent objects without specifying their concrete classes.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This topic deals with the Factory method design pattern.It explains Factory design pattern and compares with other creational pattern to highlight the uniqueness and distinguishing features of the pattern.It also gives examples of where factory design pattern is used and scenarios wherein its more suitable than other creational patterns.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== In Depth Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Factory Patterns Insight ===&lt;br /&gt;
&lt;br /&gt;
Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.It means that Factory is written without knowing what actual sub class will be instantiated. The subclass which is instantiated is determined solely by which subclass is instantiated and used by the application.&lt;br /&gt;
&lt;br /&gt;
Factory method framework can be shown in the figure below.In the below figure the createDocument() method is a factory method.  &lt;br /&gt;
[[Image:fac.jpg]]&lt;br /&gt;
&lt;br /&gt;
Benefits&lt;br /&gt;
Code is made more flexible and reusable by the elimination of instantiation of application-specific classes,Code deals only with the interface of the Factory class and can work with any sub class that supports this interface&lt;br /&gt;
&lt;br /&gt;
=== Applicants of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
=== Examples of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
== Comparison with other Creational Patterns ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Builder Pattern ===&lt;br /&gt;
In Factory pattern, the factory is in charge of creating various subtypes of an object depending on the needs.&lt;br /&gt;
 &lt;br /&gt;
Where as in Builder pattern, the composition of the objects might differ within the same subclass.&lt;br /&gt;
&lt;br /&gt;
An example of a Factory method CarCreate might return a Audi or a Toyota where as in the same scenario if we are using a Builder pattern, it allows us to create objects with finer granularity like specifying different engine specifications (a 4 cylinder engine or a 6 cylinder engine)for the objects.&lt;br /&gt;
As seen from the above example the Factory pattern is a simpler version of the Builder Pattern.&lt;br /&gt;
&lt;br /&gt;
UML diagram of Builder Pattern&lt;br /&gt;
&lt;br /&gt;
[[Image:Builder2.png]]&lt;br /&gt;
Source: [http://en.wikipedia.org/wiki/Builder_pattern]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Prototype Pattern ===&lt;br /&gt;
The Prototype pattern creates a new object by cloning an existing object. The client using the prototype object does not need to know what kind of object it is dealing with as long as the concrete prototype extends or implements the prototype interface/class. The concrete prototype object is responsible for cloning itself and returning the cloned object.&lt;br /&gt;
The pattern enables a client to create the kind of object required at runtime by selecting the appropriate prototype. The prototype classes are created generically by the client without the client knowing the exact type of the concrete prototype. New concrete prototypes can be added at runtime as long as they conform to the abstract prototype.&lt;br /&gt;
&lt;br /&gt;
[[Image:prototype.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Abstract Factory Pattern ===&lt;br /&gt;
Abstract pattern is one level of abstraction higher than the factory pattern.&lt;br /&gt;
A Factory pattern is one that returns an instance of one of several possible classes depending on the data provided to it.&lt;br /&gt;
Usually all of the classes it returns have a common parent class and common methods, but each of them performs a task differently and is optimized for different kinds of data.&lt;br /&gt;
&lt;br /&gt;
There are several similar variations on the factory pattern:&lt;br /&gt;
&amp;lt;br&amp;gt; 1. The base class is abstract and the pattern must return a complete working class.&amp;lt;/br&amp;gt;&lt;br /&gt;
2. The base class contains default methods and is only sub-classed for cases where the default methods are insufficient.&amp;lt;/br&amp;gt;&lt;br /&gt;
3. Parameters are passed to the factory telling it which of several class types to return. In this case the classes may share the same method names but may do something quite different.&lt;br /&gt;
&lt;br /&gt;
[[Image:abstractfactory.gif]]&lt;br /&gt;
&lt;br /&gt;
== External Links and References ==&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28143</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 AD</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28143"/>
		<updated>2009-11-18T05:23:42Z</updated>

		<summary type="html">&lt;p&gt;Apurush: /* Comparison with Abstract Factory Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Definition ==&lt;br /&gt;
&lt;br /&gt;
Factory Method is a creational pattern. This pattern helps to model an interface for creating an object which at creation time can let its subclasses decide which class to instantiate.It is called as Factory Pattern as it is responsible for &amp;quot;Manufacturing&amp;quot; an Object. It helps instantiate the appropriate Subclass by creating the right Object from a group of related classes. The Factory Pattern encourages loose coupling by eliminating the need to bind application-specific classes into the code.It Provide an interface for creating families of related or dependent objects without specifying their concrete classes.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This topic deals with the Factory method design pattern.It explains Factory design pattern and compares with other creational pattern to highlight the uniqueness and distinguishing features of the pattern.It also gives examples of where factory design pattern is used and scenarios wherein its more suitable than other creational patterns.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== In Depth Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Factory Patterns Insight ===&lt;br /&gt;
&lt;br /&gt;
Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.It means that Factory is written without knowing what actual sub class will be instantiated. The subclass which is instantiated is determined solely by which subclass is instantiated and used by the application.&lt;br /&gt;
&lt;br /&gt;
Factory method framework can be shown in the figure below.In the below figure the createDocument() method is a factory method.  &lt;br /&gt;
[[Image:fac.jpg]]&lt;br /&gt;
&lt;br /&gt;
Benefits&lt;br /&gt;
Code is made more flexible and reusable by the elimination of instantiation of application-specific classes,Code deals only with the interface of the Factory class and can work with any sub class that supports this interface&lt;br /&gt;
&lt;br /&gt;
=== Applicants of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
=== Examples of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
== Comparison with other Creational Patterns ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Builder Pattern ===&lt;br /&gt;
In Factory pattern, the factory is in charge of creating various subtypes of an object depending on the needs.&lt;br /&gt;
 &lt;br /&gt;
Where as in Builder pattern, the composition of the objects might differ within the same subclass.&lt;br /&gt;
&lt;br /&gt;
An example of a Factory method CarCreate might return a Audi or a Toyota where as in the same scenario if we are using a Builder pattern, it allows us to create objects with finer granularity like specifying different engine specifications (a 4 cylinder engine or a 6 cylinder engine)for the objects.&lt;br /&gt;
As seen from the above example the Factory pattern is a simpler version of the Builder Pattern.&lt;br /&gt;
&lt;br /&gt;
UML diagram of Builder Pattern&lt;br /&gt;
&lt;br /&gt;
[[Image:Builder2.png]]&lt;br /&gt;
Source: [http://en.wikipedia.org/wiki/Builder_pattern]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Prototype Pattern ===&lt;br /&gt;
The Prototype pattern creates a new object by cloning an existing object. The client using the prototype object does not need to know what kind of object it is dealing with as long as the concrete prototype extends or implements the prototype interface/class. The concrete prototype object is responsible for cloning itself and returning the cloned object.&lt;br /&gt;
The pattern enables a client to create the kind of object required at runtime by selecting the appropriate prototype. The prototype classes are created generically by the client without the client knowing the exact type of the concrete prototype. New concrete prototypes can be added at runtime as long as they conform to the abstract prototype.&lt;br /&gt;
&lt;br /&gt;
[[Image:prototype.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Abstract Factory Pattern ===&lt;br /&gt;
Abstract pattern is one level of abstraction higher than the factory pattern.&lt;br /&gt;
A Factory pattern is one that returns an instance of one of several possible classes depending on the data provided to it.&lt;br /&gt;
Usually all of the classes it returns have a common parent class and common methods, but each of them performs a task differently and is optimized for different kinds of data.&lt;br /&gt;
&lt;br /&gt;
There are several similar variations on the factory pattern:&lt;br /&gt;
1. The base class is abstract and the pattern must return a complete working class.&amp;lt;/br&amp;gt;&lt;br /&gt;
2. The base class contains default methods and is only sub-classed for cases where the default methods are insufficient.&amp;lt;/br&amp;gt;&lt;br /&gt;
3. Parameters are passed to the factory telling it which of several class types to return. In this case the classes may share the same method names but may do something quite different.&lt;br /&gt;
&lt;br /&gt;
[[Image:abstractfactory.gif]]&lt;br /&gt;
&lt;br /&gt;
== External Links and References ==&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28141</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 AD</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28141"/>
		<updated>2009-11-18T05:22:31Z</updated>

		<summary type="html">&lt;p&gt;Apurush: /* Comparison with Abstract Factory Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Definition ==&lt;br /&gt;
&lt;br /&gt;
Factory Method is a creational pattern. This pattern helps to model an interface for creating an object which at creation time can let its subclasses decide which class to instantiate.It is called as Factory Pattern as it is responsible for &amp;quot;Manufacturing&amp;quot; an Object. It helps instantiate the appropriate Subclass by creating the right Object from a group of related classes. The Factory Pattern encourages loose coupling by eliminating the need to bind application-specific classes into the code.It Provide an interface for creating families of related or dependent objects without specifying their concrete classes.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This topic deals with the Factory method design pattern.It explains Factory design pattern and compares with other creational pattern to highlight the uniqueness and distinguishing features of the pattern.It also gives examples of where factory design pattern is used and scenarios wherein its more suitable than other creational patterns.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== In Depth Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Factory Patterns Insight ===&lt;br /&gt;
&lt;br /&gt;
Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.It means that Factory is written without knowing what actual sub class will be instantiated. The subclass which is instantiated is determined solely by which subclass is instantiated and used by the application.&lt;br /&gt;
&lt;br /&gt;
Factory method framework can be shown in the figure below.In the below figure the createDocument() method is a factory method.  &lt;br /&gt;
[[Image:fac.jpg]]&lt;br /&gt;
&lt;br /&gt;
Benefits&lt;br /&gt;
Code is made more flexible and reusable by the elimination of instantiation of application-specific classes,Code deals only with the interface of the Factory class and can work with any sub class that supports this interface&lt;br /&gt;
&lt;br /&gt;
=== Applicants of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
=== Examples of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
== Comparison with other Creational Patterns ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Builder Pattern ===&lt;br /&gt;
In Factory pattern, the factory is in charge of creating various subtypes of an object depending on the needs.&lt;br /&gt;
 &lt;br /&gt;
Where as in Builder pattern, the composition of the objects might differ within the same subclass.&lt;br /&gt;
&lt;br /&gt;
An example of a Factory method CarCreate might return a Audi or a Toyota where as in the same scenario if we are using a Builder pattern, it allows us to create objects with finer granularity like specifying different engine specifications (a 4 cylinder engine or a 6 cylinder engine)for the objects.&lt;br /&gt;
As seen from the above example the Factory pattern is a simpler version of the Builder Pattern.&lt;br /&gt;
&lt;br /&gt;
UML diagram of Builder Pattern&lt;br /&gt;
&lt;br /&gt;
[[Image:Builder2.png]]&lt;br /&gt;
Source: [http://en.wikipedia.org/wiki/Builder_pattern]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Prototype Pattern ===&lt;br /&gt;
The Prototype pattern creates a new object by cloning an existing object. The client using the prototype object does not need to know what kind of object it is dealing with as long as the concrete prototype extends or implements the prototype interface/class. The concrete prototype object is responsible for cloning itself and returning the cloned object.&lt;br /&gt;
The pattern enables a client to create the kind of object required at runtime by selecting the appropriate prototype. The prototype classes are created generically by the client without the client knowing the exact type of the concrete prototype. New concrete prototypes can be added at runtime as long as they conform to the abstract prototype.&lt;br /&gt;
&lt;br /&gt;
[[Image:prototype.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Abstract Factory Pattern ===&lt;br /&gt;
Abstract pattern is one level of abstraction higher than the factory pattern.&lt;br /&gt;
A Factory pattern is one that returns an instance of one of several possible classes depending on the data provided to it.&lt;br /&gt;
Usually all of the classes it returns have a common parent class and common methods, but each of them performs a task differently and is optimized for different kinds of data.&lt;br /&gt;
&lt;br /&gt;
There are several similar variations on the factory pattern:&lt;br /&gt;
1. The base class is abstract and the pattern must return a complete working class.&lt;br /&gt;
2. The base class contains default methods and is only sub-classed for cases where the default methods are insufficient.&lt;br /&gt;
3. Parameters are passed to the factory telling it which of several class types to return. In this case the classes may share the same method names but may do something quite different.&lt;br /&gt;
&lt;br /&gt;
[[Image:abstractfactory.gif]]&lt;br /&gt;
&lt;br /&gt;
== External Links and References ==&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Abstractfactory.gif&amp;diff=28088</id>
		<title>File:Abstractfactory.gif</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Abstractfactory.gif&amp;diff=28088"/>
		<updated>2009-11-18T04:58:46Z</updated>

		<summary type="html">&lt;p&gt;Apurush: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28087</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 AD</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28087"/>
		<updated>2009-11-18T04:58:35Z</updated>

		<summary type="html">&lt;p&gt;Apurush: /* Comparison with Abstract Factory Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Definition ==&lt;br /&gt;
&lt;br /&gt;
Factory Method is a creational pattern. This pattern helps to model an interface for creating an object which at creation time can let its subclasses decide which class to instantiate.It is called as Factory Pattern as it is responsible for &amp;quot;Manufacturing&amp;quot; an Object. It helps instantiate the appropriate Subclass by creating the right Object from a group of related classes. The Factory Pattern encourages loose coupling by eliminating the need to bind application-specific classes into the code.It Provide an interface for creating families of related or dependent objects without specifying their concrete classes.&lt;br /&gt;
&lt;br /&gt;
A small analogy to understand Factory method better. Your code is the pasta maker,different disks create different pasta shapes:these are the factories. All disks have certain properties in common,so that they will work with the pasta maker.All pastas have certain characteristics in common that are inherited from the generic “Pasta” object.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This topic deals with the Factory method design pattern.It explains Factory design pattern and compares with other creational pattern to highlight the uniqueness and distinguishing features of the pattern.It also gives examples of where factory design pattern is used and scenarios wherein its more suitable than other creational patterns.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== In Depth Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Factory Patterns Insight ===&lt;br /&gt;
&lt;br /&gt;
Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.It means that Super class is written without knowing what actual sub class will be instantiated. The subclass which is instantiated is determined solely by which subclass is instantiated and used by the application.&lt;br /&gt;
&lt;br /&gt;
Factory method framework can be shown in the figure below.In the below figure the createDocument() method is a factory method.  &lt;br /&gt;
[[Image:fac.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Applicants of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
=== Examples of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
== Comparison with other Creational Patterns ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Builder Pattern ===&lt;br /&gt;
In Factory pattern, the factory is in charge of creating various subtypes of an object depending on the needs.&lt;br /&gt;
 &lt;br /&gt;
Where as in Builder pattern, the composition of the objects might differ within the same subclass.&lt;br /&gt;
&lt;br /&gt;
An example of a Factory method CarCreate might return a Audi or a Toyota where as in the same scenario if we are using a Builder pattern, it allows us to create objects with finer granularity like specifying different engine specifications (a 4 cylinder engine or a 6 cylinder engine)for the objects.&lt;br /&gt;
As seen from the above example the Factory pattern is a simpler version of the Builder Pattern.&lt;br /&gt;
&lt;br /&gt;
UML diagram of Builder Pattern&lt;br /&gt;
&lt;br /&gt;
[[Image:Builder2.png]]&lt;br /&gt;
Source: [http://en.wikipedia.org/wiki/Builder_pattern]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Prototype Pattern ===&lt;br /&gt;
The Prototype pattern creates a new object by cloning an existing object. The client using the prototype object does not need to know what kind of object it is dealing with as long as the concrete prototype extends or implements the prototype interface/class. The concrete prototype object is responsible for cloning itself and returning the cloned object.&lt;br /&gt;
The pattern enables a client to create the kind of object required at runtime by selecting the appropriate prototype. The prototype classes are created generically by the client without the client knowing the exact type of the concrete prototype. New concrete prototypes can be added at runtime as long as they conform to the abstract prototype.&lt;br /&gt;
&lt;br /&gt;
[[Image:prototype.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Abstract Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:abstractfactory.gif]]&lt;br /&gt;
&lt;br /&gt;
== External Links and References ==&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28075</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 AD</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28075"/>
		<updated>2009-11-18T04:55:37Z</updated>

		<summary type="html">&lt;p&gt;Apurush: /* Comparison with Prototype Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Definition ==&lt;br /&gt;
&lt;br /&gt;
Factory Method is a creational pattern. This pattern helps to model an interface for creating an object which at creation time can let its subclasses decide which class to instantiate.It is called as Factory Pattern as it is responsible for &amp;quot;Manufacturing&amp;quot; an Object. It helps instantiate the appropriate Subclass by creating the right Object from a group of related classes. The Factory Pattern encourages loose coupling by eliminating the need to bind application-specific classes into the code.It Provide an interface for creating families of related or dependent objects without specifying their concrete classes.&lt;br /&gt;
&lt;br /&gt;
A small analogy to understand Factory method better. Your code is the pasta maker,different disks create different pasta shapes:these are the factories. All disks have certain properties in common,so that they will work with the pasta maker.All pastas have certain characteristics in common that are inherited from the generic “Pasta” object.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This topic deals with the Factory method design pattern.It explains Factory design pattern and compares with other creational pattern to highlight the uniqueness and distinguishing features of the pattern.It also gives examples of where factory design pattern is used and scenarios wherein its more suitable than other creational patterns.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== In Depth Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Factory Patterns Insight ===&lt;br /&gt;
&lt;br /&gt;
Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.&lt;br /&gt;
&lt;br /&gt;
Factory method framework can be shown in the figure below.In the below figure the createDocument() method is a factory method.  &lt;br /&gt;
[[Image:fac.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Applicants of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
=== Examples of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
== Comparison with other Creational Patterns ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Builder Pattern ===&lt;br /&gt;
In Factory pattern, the factory is in charge of creating various subtypes of an object depending on the needs.&lt;br /&gt;
 &lt;br /&gt;
Where as in Builder pattern, the composition of the objects might differ within the same subclass.&lt;br /&gt;
&lt;br /&gt;
An example of a Factory method CarCreate might return a Audi or a Toyota where as in the same scenario if we are using a Builder pattern, it allows us to create objects with finer granularity like specifying different engine specifications (a 4 cylinder engine or a 6 cylinder engine)for the objects.&lt;br /&gt;
As seen from the above example the Factory pattern is a simpler version of the Builder Pattern.&lt;br /&gt;
&lt;br /&gt;
UML diagram of Builder Pattern&lt;br /&gt;
&lt;br /&gt;
[[Image:Builder2.png]]&lt;br /&gt;
Source: [http://en.wikipedia.org/wiki/Builder_pattern]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Prototype Pattern ===&lt;br /&gt;
The Prototype pattern creates a new object by cloning an existing object. The client using the prototype object does not need to know what kind of object it is dealing with as long as the concrete prototype extends or implements the prototype interface/class. The concrete prototype object is responsible for cloning itself and returning the cloned object.&lt;br /&gt;
The pattern enables a client to create the kind of object required at runtime by selecting the appropriate prototype. The prototype classes are created generically by the client without the client knowing the exact type of the concrete prototype. New concrete prototypes can be added at runtime as long as they conform to the abstract prototype.&lt;br /&gt;
&lt;br /&gt;
[[Image:prototype.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Abstract Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links and References ==&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Prototype.jpg&amp;diff=28063</id>
		<title>File:Prototype.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Prototype.jpg&amp;diff=28063"/>
		<updated>2009-11-18T04:43:56Z</updated>

		<summary type="html">&lt;p&gt;Apurush: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28062</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 AD</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28062"/>
		<updated>2009-11-18T04:43:40Z</updated>

		<summary type="html">&lt;p&gt;Apurush: /* Comparison with Prototype Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Definition ==&lt;br /&gt;
&lt;br /&gt;
Factory Method is a creational pattern. This pattern helps to model an interface for creating an object which at creation time can let its subclasses decide which class to instantiate.It is called as Factory Pattern as it is responsible for &amp;quot;Manufacturing&amp;quot; an Object. It helps instantiate the appropriate Subclass by creating the right Object from a group of related classes. The Factory Pattern encourages loose coupling by eliminating the need to bind application-specific classes into the code.It Provide an interface for creating families of related or dependent objects without specifying their concrete classes.&lt;br /&gt;
&lt;br /&gt;
A small analogy to understand Factory method better. Your code is the pasta maker,different disks create different pasta shapes:these are the factories. All disks have certain properties in common,so that they will work with the pasta maker.All pastas have certain characteristics in common that are inherited from the generic “Pasta” object.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This topic deals with the Factory method design pattern.It explains Factory design pattern and compares with other creational pattern to highlight the uniqueness and distinguishing features of the pattern.It also gives examples of where factory design pattern is used and scenarios wherein its more suitable than other creational patterns.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== In Depth Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Factory Patterns Insight ===&lt;br /&gt;
&lt;br /&gt;
=== Applicants of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
=== Examples of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
== Comparison with other Creational Patterns ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Builder Pattern ===&lt;br /&gt;
In Factory pattern, the factory is in charge of creating various subtypes of an object depending on the needs.&lt;br /&gt;
 &lt;br /&gt;
Where as in Builder pattern, the composition of the objects might differ within the same subclass.&lt;br /&gt;
&lt;br /&gt;
An example of a Factory method CarCreate might return a Audi or a Toyota where as in the same scenario if we are using a Builder pattern, it allows us to create objects with finer granularity like specifying different engine specifications (a 4 cylinder engine or a 6 cylinder engine)for the objects.&lt;br /&gt;
As seen from the above example the Factory pattern is a simpler version of the Builder Pattern.&lt;br /&gt;
&lt;br /&gt;
UML diagram of Builder Pattern&lt;br /&gt;
&lt;br /&gt;
[[Image:Builder2.png]]&lt;br /&gt;
Source: [http://en.wikipedia.org/wiki/Builder_pattern]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Prototype Pattern ===&lt;br /&gt;
[[Image:prototype.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Abstract Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links and References ==&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28060</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 AD</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28060"/>
		<updated>2009-11-18T04:41:24Z</updated>

		<summary type="html">&lt;p&gt;Apurush: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Definition ==&lt;br /&gt;
&lt;br /&gt;
Factory Method is a creational pattern. This pattern helps to model an interface for creating an object which at creation time can let its subclasses decide which class to instantiate.It is called as Factory Pattern as it is responsible for &amp;quot;Manufacturing&amp;quot; an Object. It helps instantiate the appropriate Subclass by creating the right Object from a group of related classes. The Factory Pattern encourages loose coupling by eliminating the need to bind application-specific classes into the code.It Provide an interface for creating families of related or dependent objects without specifying their concrete classes.&lt;br /&gt;
&lt;br /&gt;
A small analogy to understand Factory method better. Your code is the pasta maker,different disks create different pasta shapes:these are the factories. All disks have certain properties in common,so that they will work with the pasta maker.All pastas have certain characteristics in common that are inherited from the generic “Pasta” object.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This topic deals with the Factory method design pattern.It explains Factory design pattern and compares with other creational pattern to highlight the uniqueness and distinguishing features of the pattern.It also gives examples of where factory design pattern is used and scenarios wherein its more suitable than other creational patterns.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== In Depth Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Factory Patterns Insight ===&lt;br /&gt;
&lt;br /&gt;
=== Applicants of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
=== Examples of Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
== Comparison with other Creational Patterns ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Builder Pattern ===&lt;br /&gt;
In Factory pattern, the factory is in charge of creating various subtypes of an object depending on the needs.&lt;br /&gt;
 &lt;br /&gt;
Where as in Builder pattern, the composition of the objects might differ within the same subclass.&lt;br /&gt;
&lt;br /&gt;
An example of a Factory method CarCreate might return a Audi or a Toyota where as in the same scenario if we are using a Builder pattern, it allows us to create objects with finer granularity like specifying different engine specifications (a 4 cylinder engine or a 6 cylinder engine)for the objects.&lt;br /&gt;
As seen from the above example the Factory pattern is a simpler version of the Builder Pattern.&lt;br /&gt;
&lt;br /&gt;
UML diagram of Builder Pattern&lt;br /&gt;
&lt;br /&gt;
[[Image:Builder2.png]]&lt;br /&gt;
Source: [http://en.wikipedia.org/wiki/Builder_pattern]&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Prototype Pattern ===&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Abstract Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links and References ==&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28002</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 AD</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=28002"/>
		<updated>2009-11-18T04:04:09Z</updated>

		<summary type="html">&lt;p&gt;Apurush: /* Comparison with Builder Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Definition ==&lt;br /&gt;
&lt;br /&gt;
Factory Method is a creational pattern. This pattern helps to model an interface for creating an object which at creation time can let its subclasses decide which class to instantiate.It is called as Factory Pattern as it is responsible for &amp;quot;Manufacturing&amp;quot; an Object. It helps instantiate the appropriate Subclass by creating the right Object from a group of related classes. The Factory Pattern encourages loose coupling by eliminating the need to bind application-specific classes into the code.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This topic deals with the Factory method design pattern.It explains Factory design pattern and compares with other creational pattern to highlight the uniqueness and distinguishing features of the pattern.It also gives examples of where factory design pattern is used and scenarios wherein its more suitable than other creational patterns.&lt;br /&gt;
&lt;br /&gt;
== Comparison with other Creational Patterns ==&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Singleton Pattern ===&lt;br /&gt;
&lt;br /&gt;
Singleton pattern is a creational pattern which is used in situations where just only one object of the class has to be created.&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Builder Pattern ===&lt;br /&gt;
In Factory pattern, the factory is in charge of creating various subtypes of an object depending on the needs.&lt;br /&gt;
 &lt;br /&gt;
Where as in Builder pattern, the composition of the objects might differ within the same subclass.&lt;br /&gt;
&lt;br /&gt;
An example of a Factory method CarCreate might return a Audi or a Toyota where as in the same scenario if we are using a Builder pattern, it allows us to create objects with finer granularity like specifying different engine specifications (a 4 cylinder engine or a 6 cylinder engine)for the objects.&lt;br /&gt;
As seen from the above example the Factory pattern is a simpler version of the Builder Pattern.&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Prototype Pattern ===&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Abstract Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
== In depth Analysis ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links and References ==&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=27980</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 AD</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=27980"/>
		<updated>2009-11-18T03:53:17Z</updated>

		<summary type="html">&lt;p&gt;Apurush: /* Comparison with Singleton Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Definition ==&lt;br /&gt;
&lt;br /&gt;
Factory Method is a creational pattern. This pattern helps to model an interface for creating an object which at creation time can let its subclasses decide which class to instantiate.It is called as Factory Pattern as it is responsible for &amp;quot;Manufacturing&amp;quot; an Object. It helps instantiate the appropriate Subclass by creating the right Object from a group of related classes. The Factory Pattern encourages loose coupling by eliminating the need to bind application-specific classes into the code.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This topic deals with the Factory method design pattern.It explains Factory design pattern and compares with other creational pattern to highlight the uniqueness and distinguishing features of the pattern.It also gives examples of where factory design pattern is used and scenarios wherein its more suitable than other creational patterns.&lt;br /&gt;
&lt;br /&gt;
== Comparison with other Creational Patterns ==&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Singleton Pattern ===&lt;br /&gt;
&lt;br /&gt;
Singleton pattern is a creational pattern which is used in situations where just only one object of the class has to be created.&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Builder Pattern ===&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Prototype Pattern ===&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Abstract Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
== In depth Analysis ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links and References ==&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=27959</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 AD</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=27959"/>
		<updated>2009-11-18T03:43:45Z</updated>

		<summary type="html">&lt;p&gt;Apurush: /* Comparison with other Creational Patterns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Definition ==&lt;br /&gt;
&lt;br /&gt;
Factory Method is a creational pattern. This pattern helps to model an interface for creating an object which at creation time can let its subclasses decide which class to instantiate.It is called as Factory Pattern as it is responsible for &amp;quot;Manufacturing&amp;quot; an Object. It helps instantiate the appropriate Subclass by creating the right Object from a group of related classes. The Factory Pattern encourages loose coupling by eliminating the need to bind application-specific classes into the code.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This topic deals with the Factory method design pattern.It explains Factory design pattern and compares with other creational pattern to highlight the uniqueness and distinguishing features of the pattern.It also gives examples of where factory design pattern is used and scenarios wherein its more suitable than other creational patterns.&lt;br /&gt;
&lt;br /&gt;
== Comparison with other Creational Patterns ==&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Singleton Pattern ===&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Builder Pattern ===&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Prototype Pattern ===&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Abstract Factory Pattern ===&lt;br /&gt;
&lt;br /&gt;
== In depth Analysis ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links and References ==&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=27958</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 AD</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=27958"/>
		<updated>2009-11-18T03:42:08Z</updated>

		<summary type="html">&lt;p&gt;Apurush: /* Comparison with other Creational Patterns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Definition ==&lt;br /&gt;
&lt;br /&gt;
Factory Method is a creational pattern. This pattern helps to model an interface for creating an object which at creation time can let its subclasses decide which class to instantiate.It is called as Factory Pattern as it is responsible for &amp;quot;Manufacturing&amp;quot; an Object. It helps instantiate the appropriate Subclass by creating the right Object from a group of related classes. The Factory Pattern encourages loose coupling by eliminating the need to bind application-specific classes into the code.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This topic deals with the Factory method design pattern.It explains Factory design pattern and compares with other creational pattern to highlight the uniqueness and distinguishing features of the pattern.It also gives examples of where factory design pattern is used and scenarios wherein its more suitable than other creational patterns.&lt;br /&gt;
&lt;br /&gt;
== Comparison with other Creational Patterns ==&lt;br /&gt;
&lt;br /&gt;
=== Comparison with Singleton ===&lt;br /&gt;
&lt;br /&gt;
== In depth Analysis ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links and References ==&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=27928</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 AD</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=27928"/>
		<updated>2009-11-18T03:15:21Z</updated>

		<summary type="html">&lt;p&gt;Apurush: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Definition ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Comparison with other Creational Patterns ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== In depth Analysis ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links and References ==&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=27926</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 AD</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_AD&amp;diff=27926"/>
		<updated>2009-11-18T03:13:41Z</updated>

		<summary type="html">&lt;p&gt;Apurush: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Definition ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Comparison with other Creational Patterns ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== In depth Analysis ==&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_11_AS&amp;diff=19105</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 11 AS</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_11_AS&amp;diff=19105"/>
		<updated>2009-09-12T18:54:32Z</updated>

		<summary type="html">&lt;p&gt;Apurush: /* &amp;lt;center&amp;gt; '''ruby vs Python'''  &amp;lt;/center&amp;gt; = */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;                                          &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
=  &amp;lt;center&amp;gt; '''Ruby vs Python'''  &amp;lt;/center&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
== Definition of Ruby and Python ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' is a dynamic, reflective, general purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features.&lt;br /&gt;
It is an interpreted language that includes a powerful set of libraries. While it is often referred to as a scripting language, it is a pure objected-oriented language that has sufficient expressiveness for general-purpose applications.&lt;br /&gt;
&lt;br /&gt;
'''Python''' is an interpreted, object-oriented, high-level programming language with dynamic semantics.&lt;br /&gt;
&lt;br /&gt;
== Differences in their language features ==&lt;br /&gt;
1.The first thing to be noted in Ruby is that,everything is an object, whereas in Python we have the liberty to code without using objects. &lt;br /&gt;
&lt;br /&gt;
2.In ruby, the programmer can use blocks to extend the language for application specific control statements where as in Python we are supposed to use only the control statements provided by the language.&lt;br /&gt;
&lt;br /&gt;
3.Ruby protects class attributes.We can’t access attributes of objects from outside the class.&lt;br /&gt;
Python doesn’t protect our code from other programmers. If they want to shoot themselves in the foot they are allowed to do so.&lt;br /&gt;
&lt;br /&gt;
4.In Ruby, there are no functions, but there are methods, blocks and lambdas. All of them seem to have subtle differences, and sometimes we need to not just call them, but use .call().&lt;br /&gt;
In Python, there are only functions. Lambdas are functions whose name is &amp;lt;lambda&amp;gt;. Methods are functions that are wrapped, we don’t have to pass self.&lt;br /&gt;
&lt;br /&gt;
5.The one line nameless mini-functions that can be created in Python are called Lambdas where as its Ruby counterpart is called as Blocks. Not only the name is different but also Blocks have some terrific advantage over lambdas. One of the most notable advantage is that Ruby blocks are more powerful, in that the interaction between the blocks and its contents is quite easy where as its almost impossible for the interaction between lambdas and its contents in Python. The other advantage is that Ruby blocks have access to the variables in the scope in which they were defined. This allows blocks to be used in a more expressive manner.&lt;br /&gt;
&lt;br /&gt;
code snippet for computing the largest of two numbers using python lambdas&lt;br /&gt;
   &amp;gt;&amp;gt;&amp;gt;bigger = lambda a, b : a &amp;gt; b&lt;br /&gt;
   &amp;gt;&amp;gt;&amp;gt;print bigger(1,2)&lt;br /&gt;
   False&lt;br /&gt;
   &amp;gt;&amp;gt;&amp;gt;print bigger(2,1)&lt;br /&gt;
   True&lt;br /&gt;
 &lt;br /&gt;
code snippet for computing the square of each number in the array  using ruby blocks&lt;br /&gt;
   array = [1, 2, 3, 4]&lt;br /&gt;
   array.iterate! do |n|&lt;br /&gt;
   n ** 2&lt;br /&gt;
   end&lt;br /&gt;
   puts array.inspect&lt;br /&gt;
   # =&amp;gt; [1, 4, 9, 16]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6.Python has a much greater range of libraries available to it, and most of those libraries are more mature and better documented than their Ruby counterparts.&lt;br /&gt;
&lt;br /&gt;
7.As far as readability is concerned, Python is considered to be easily readable whereas Ruby’s code is considered to be on the downside for readability.&lt;br /&gt;
&lt;br /&gt;
== Differences in Programming Environment ==&lt;br /&gt;
&lt;br /&gt;
Both Ruby and Python run on almost all the user friendly platforms like Windows9x/2000/NT, Unix, Mac-OS, MS-DOS. The difference in their programming environments is very subtle.&lt;br /&gt;
&lt;br /&gt;
Python has a Virtual Machine which optimizes certain functions like hash functions and sorting algorithms. &lt;br /&gt;
&lt;br /&gt;
Ruby as such does not have any virtual machine but it acts as an interpreter. There is a project going on for building a virtual machine for Ruby- the YARV [http://www.atdot.net/yarv/].&lt;br /&gt;
&lt;br /&gt;
== What Ruby has and Python does not have? ==&lt;br /&gt;
Ruby has continuations, where as Python does not have it. One notable use of continuations in Ruby is for breakpoints in debuggers. &lt;br /&gt;
Continuation is an abstract representation of the control state, of the things to come. Practically continuation support in a language means we can “save” our state at a point and return to it later. This is called a first-class continuation.&lt;br /&gt;
&lt;br /&gt;
In ruby, the callcc method is used (it’s Kernel#callcc) to create a Continuation class. Look at this small sample:&lt;br /&gt;
&lt;br /&gt;
 def loop&lt;br /&gt;
   cont=nil&lt;br /&gt;
   for i in 1..4&lt;br /&gt;
     puts i&lt;br /&gt;
     callcc {|continuation| cont=continuation} if i==2&lt;br /&gt;
   end&lt;br /&gt;
   return cont&lt;br /&gt;
 end&lt;br /&gt;
 c = loop&lt;br /&gt;
 c.call&lt;br /&gt;
&lt;br /&gt;
In irb this will print 1,2,3,4 then 3,4 again, then exit. As a script file run by the main ruby interpreter, this will loop forerver as it captures the control state of the program when and where it was called and this includes returning the continuation and then calling it again.&lt;br /&gt;
&lt;br /&gt;
== What Python has and Ruby does not have? ==&lt;br /&gt;
&lt;br /&gt;
1.It’s worth mentioning that Python has some big features like list comprehensions that Ruby doesn’t.&lt;br /&gt;
&lt;br /&gt;
  [foo(x) for x in alist if bar(x) != 'frotz']&lt;br /&gt;
&lt;br /&gt;
This is definitely shorter than:&lt;br /&gt;
&lt;br /&gt;
   foo = [] &lt;br /&gt;
   for x in alist:&lt;br /&gt;
   if bar(x) != 'frotz':&lt;br /&gt;
   foo.append(x)&lt;br /&gt;
&lt;br /&gt;
2.Python uses whitespace indentation, rather than curly braces or keywords, to delimit statement blocks (a feature also known as the off-side rule). An increase in indentation comes after certain statements; a decrease in indentation signifies the end of the current block.&lt;br /&gt;
&lt;br /&gt;
== Advantages over statically typed languages ==&lt;br /&gt;
&lt;br /&gt;
1.Java has static typing. We declare the type of each variable, and then, during compilation, we get an error message if we use a variable of the wrong type. Ruby, on the other hand, has dynamic typing: We don't declare types for variables or functions, and no type-check occurs until runtime, when we get an error if we call a method that doesn't exist. Even then, Ruby doesn't care about an object's class, just whether it has a method of the name used in the method call. For this reason, the dynamic approach has earned the name duck typing: &amp;quot;If it walks like a duck and quacks like a duck, it's a duck.&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
'''Duck Typing'''&lt;br /&gt;
&lt;br /&gt;
 class ADuck&lt;br /&gt;
     def quack()&lt;br /&gt;
         puts &amp;quot;quack A&amp;quot;;&lt;br /&gt;
     end&lt;br /&gt;
 end&lt;br /&gt;
 class BDuck&lt;br /&gt;
     def quack()&lt;br /&gt;
         puts &amp;quot;quack B&amp;quot;;&lt;br /&gt;
     end&lt;br /&gt;
 end&lt;br /&gt;
 # quack_it doesn't care about the type of the argument duck, as long&lt;br /&gt;
 # as it has a method called quack. Classes A and B have no&lt;br /&gt;
 # inheritance relationship.&lt;br /&gt;
 def quack_it(duck)&lt;br /&gt;
     duck.quack&lt;br /&gt;
 end&lt;br /&gt;
 a = ADuck.new&lt;br /&gt;
 b = BDuck.new&lt;br /&gt;
 quack_it(a)&lt;br /&gt;
 quack_it(b)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.In Ruby, variables do not need to be declared and are free to change type from statement to statement. So the following code, where the variable x changes from a FixNum (an integer that fits within a native machine word) to a String to an Array, is a perfectly legal sequence of Ruby code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 x = 10&lt;br /&gt;
 x += 4&lt;br /&gt;
 x = &amp;quot;My String&amp;quot;&lt;br /&gt;
 x = [1, &amp;quot;My String&amp;quot;, Hash.new ]&lt;br /&gt;
&lt;br /&gt;
3.Ruby's dynamic typing means you don't repeat yourself: In Java have we had to suffer through verbose code along the lines of &lt;br /&gt;
 &lt;br /&gt;
  XMLPersistence xmlPersistence = (XMLPersistence)persistenceManager.getPersistence(); &lt;br /&gt;
Ruby eliminates the need for the type declaration and casting (as well as parentheses and semicolon): a typical Ruby equivalent would be&lt;br /&gt;
  xmlPersistence = persistence_manager.persistence.&lt;br /&gt;
&lt;br /&gt;
4.In Java, we often iterate over a collection's Iterator, running the logic on each element. But the iteration is just an implementation detail: in general, we are just trying to apply the same logic to each element of a collection.&lt;br /&gt;
In Ruby, we pass a code block to a method that does just that, iterating behind the scenes. &lt;br /&gt;
For example,&lt;br /&gt;
  [1, 2, 3, 4, 5].each{|n| print n*n, &amp;quot; &amp;quot;} &lt;br /&gt;
prints the string 1 4 9 16 25; an iterator takes each element of the list and passes it into the code block as the variable n.&lt;br /&gt;
&lt;br /&gt;
== Projects better suited for Ruby  ==&lt;br /&gt;
&lt;br /&gt;
The most prominent application of Ruby is in web development using Ruby on Rails.&lt;br /&gt;
Ruby on Rails is an open source web framework. Rails was created by David Heinemeier Hansson in 2003. Since then many applications have been created using Ruby on Rails and presently this has been used in various applications like twitter [http://www.twitter.com] e-commerce[http://www.shopify.com/], live video streaming [http://www.hulu.com/], group chat application [http://campfirenow.com/?source=rails].&lt;br /&gt;
&lt;br /&gt;
== Projects better suited for Python ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Python has two web development frameworks: Django and TurboGears. Apart from web development, Python also provides platform for applications like Database Access, Desktop Graphical User Interface(GUI) development, Software development, Game and 3D graphics development.&lt;br /&gt;
One of the best examples of open source Python language is the &amp;quot;Zone Application server&amp;quot; [http://c2.com/cgi/wiki?ZopeApplicationServer].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
[1] &amp;quot;Ruby v/s Python&amp;quot; http://www.c2.com/cgi/wiki?PythonVsRuby &amp;lt;br&amp;gt;&lt;br /&gt;
[2] &amp;quot;Lambda the ultimate&amp;quot; http://lambda-the-ultimate.org/node/1480 &amp;lt;br&amp;gt;&lt;br /&gt;
[3] &amp;quot;Ruby&amp;quot; http://en.wikipedia.org/wiki/Ruby_(programming_language) &amp;lt;br&amp;gt;&lt;br /&gt;
[4] &amp;quot;Python&amp;quot; http://en.wikipedia.org/wiki/Python_(programming_language) &amp;lt;br&amp;gt;&lt;br /&gt;
[5] &amp;quot;Ruby, Python, Power&amp;quot; http://blog.ianbicking.org/ruby-python-power.html &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_11_AS&amp;diff=19104</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 11 AS</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_11_AS&amp;diff=19104"/>
		<updated>2009-09-12T18:54:13Z</updated>

		<summary type="html">&lt;p&gt;Apurush: /* &amp;lt;center&amp;gt; '''Ruby vs Python'''  &amp;lt;/center&amp;gt; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;                                          &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
=  &amp;lt;center&amp;gt; '''ruby vs Python'''  &amp;lt;/center&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
== Definition of Ruby and Python ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' is a dynamic, reflective, general purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features.&lt;br /&gt;
It is an interpreted language that includes a powerful set of libraries. While it is often referred to as a scripting language, it is a pure objected-oriented language that has sufficient expressiveness for general-purpose applications.&lt;br /&gt;
&lt;br /&gt;
'''Python''' is an interpreted, object-oriented, high-level programming language with dynamic semantics.&lt;br /&gt;
&lt;br /&gt;
== Differences in their language features ==&lt;br /&gt;
1.The first thing to be noted in Ruby is that,everything is an object, whereas in Python we have the liberty to code without using objects. &lt;br /&gt;
&lt;br /&gt;
2.In ruby, the programmer can use blocks to extend the language for application specific control statements where as in Python we are supposed to use only the control statements provided by the language.&lt;br /&gt;
&lt;br /&gt;
3.Ruby protects class attributes.We can’t access attributes of objects from outside the class.&lt;br /&gt;
Python doesn’t protect our code from other programmers. If they want to shoot themselves in the foot they are allowed to do so.&lt;br /&gt;
&lt;br /&gt;
4.In Ruby, there are no functions, but there are methods, blocks and lambdas. All of them seem to have subtle differences, and sometimes we need to not just call them, but use .call().&lt;br /&gt;
In Python, there are only functions. Lambdas are functions whose name is &amp;lt;lambda&amp;gt;. Methods are functions that are wrapped, we don’t have to pass self.&lt;br /&gt;
&lt;br /&gt;
5.The one line nameless mini-functions that can be created in Python are called Lambdas where as its Ruby counterpart is called as Blocks. Not only the name is different but also Blocks have some terrific advantage over lambdas. One of the most notable advantage is that Ruby blocks are more powerful, in that the interaction between the blocks and its contents is quite easy where as its almost impossible for the interaction between lambdas and its contents in Python. The other advantage is that Ruby blocks have access to the variables in the scope in which they were defined. This allows blocks to be used in a more expressive manner.&lt;br /&gt;
&lt;br /&gt;
code snippet for computing the largest of two numbers using python lambdas&lt;br /&gt;
   &amp;gt;&amp;gt;&amp;gt;bigger = lambda a, b : a &amp;gt; b&lt;br /&gt;
   &amp;gt;&amp;gt;&amp;gt;print bigger(1,2)&lt;br /&gt;
   False&lt;br /&gt;
   &amp;gt;&amp;gt;&amp;gt;print bigger(2,1)&lt;br /&gt;
   True&lt;br /&gt;
 &lt;br /&gt;
code snippet for computing the square of each number in the array  using ruby blocks&lt;br /&gt;
   array = [1, 2, 3, 4]&lt;br /&gt;
   array.iterate! do |n|&lt;br /&gt;
   n ** 2&lt;br /&gt;
   end&lt;br /&gt;
   puts array.inspect&lt;br /&gt;
   # =&amp;gt; [1, 4, 9, 16]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6.Python has a much greater range of libraries available to it, and most of those libraries are more mature and better documented than their Ruby counterparts.&lt;br /&gt;
&lt;br /&gt;
7.As far as readability is concerned, Python is considered to be easily readable whereas Ruby’s code is considered to be on the downside for readability.&lt;br /&gt;
&lt;br /&gt;
== Differences in Programming Environment ==&lt;br /&gt;
&lt;br /&gt;
Both Ruby and Python run on almost all the user friendly platforms like Windows9x/2000/NT, Unix, Mac-OS, MS-DOS. The difference in their programming environments is very subtle.&lt;br /&gt;
&lt;br /&gt;
Python has a Virtual Machine which optimizes certain functions like hash functions and sorting algorithms. &lt;br /&gt;
&lt;br /&gt;
Ruby as such does not have any virtual machine but it acts as an interpreter. There is a project going on for building a virtual machine for Ruby- the YARV [http://www.atdot.net/yarv/].&lt;br /&gt;
&lt;br /&gt;
== What Ruby has and Python does not have? ==&lt;br /&gt;
Ruby has continuations, where as Python does not have it. One notable use of continuations in Ruby is for breakpoints in debuggers. &lt;br /&gt;
Continuation is an abstract representation of the control state, of the things to come. Practically continuation support in a language means we can “save” our state at a point and return to it later. This is called a first-class continuation.&lt;br /&gt;
&lt;br /&gt;
In ruby, the callcc method is used (it’s Kernel#callcc) to create a Continuation class. Look at this small sample:&lt;br /&gt;
&lt;br /&gt;
 def loop&lt;br /&gt;
   cont=nil&lt;br /&gt;
   for i in 1..4&lt;br /&gt;
     puts i&lt;br /&gt;
     callcc {|continuation| cont=continuation} if i==2&lt;br /&gt;
   end&lt;br /&gt;
   return cont&lt;br /&gt;
 end&lt;br /&gt;
 c = loop&lt;br /&gt;
 c.call&lt;br /&gt;
&lt;br /&gt;
In irb this will print 1,2,3,4 then 3,4 again, then exit. As a script file run by the main ruby interpreter, this will loop forerver as it captures the control state of the program when and where it was called and this includes returning the continuation and then calling it again.&lt;br /&gt;
&lt;br /&gt;
== What Python has and Ruby does not have? ==&lt;br /&gt;
&lt;br /&gt;
1.It’s worth mentioning that Python has some big features like list comprehensions that Ruby doesn’t.&lt;br /&gt;
&lt;br /&gt;
  [foo(x) for x in alist if bar(x) != 'frotz']&lt;br /&gt;
&lt;br /&gt;
This is definitely shorter than:&lt;br /&gt;
&lt;br /&gt;
   foo = [] &lt;br /&gt;
   for x in alist:&lt;br /&gt;
   if bar(x) != 'frotz':&lt;br /&gt;
   foo.append(x)&lt;br /&gt;
&lt;br /&gt;
2.Python uses whitespace indentation, rather than curly braces or keywords, to delimit statement blocks (a feature also known as the off-side rule). An increase in indentation comes after certain statements; a decrease in indentation signifies the end of the current block.&lt;br /&gt;
&lt;br /&gt;
== Advantages over statically typed languages ==&lt;br /&gt;
&lt;br /&gt;
1.Java has static typing. We declare the type of each variable, and then, during compilation, we get an error message if we use a variable of the wrong type. Ruby, on the other hand, has dynamic typing: We don't declare types for variables or functions, and no type-check occurs until runtime, when we get an error if we call a method that doesn't exist. Even then, Ruby doesn't care about an object's class, just whether it has a method of the name used in the method call. For this reason, the dynamic approach has earned the name duck typing: &amp;quot;If it walks like a duck and quacks like a duck, it's a duck.&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
'''Duck Typing'''&lt;br /&gt;
&lt;br /&gt;
 class ADuck&lt;br /&gt;
     def quack()&lt;br /&gt;
         puts &amp;quot;quack A&amp;quot;;&lt;br /&gt;
     end&lt;br /&gt;
 end&lt;br /&gt;
 class BDuck&lt;br /&gt;
     def quack()&lt;br /&gt;
         puts &amp;quot;quack B&amp;quot;;&lt;br /&gt;
     end&lt;br /&gt;
 end&lt;br /&gt;
 # quack_it doesn't care about the type of the argument duck, as long&lt;br /&gt;
 # as it has a method called quack. Classes A and B have no&lt;br /&gt;
 # inheritance relationship.&lt;br /&gt;
 def quack_it(duck)&lt;br /&gt;
     duck.quack&lt;br /&gt;
 end&lt;br /&gt;
 a = ADuck.new&lt;br /&gt;
 b = BDuck.new&lt;br /&gt;
 quack_it(a)&lt;br /&gt;
 quack_it(b)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.In Ruby, variables do not need to be declared and are free to change type from statement to statement. So the following code, where the variable x changes from a FixNum (an integer that fits within a native machine word) to a String to an Array, is a perfectly legal sequence of Ruby code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 x = 10&lt;br /&gt;
 x += 4&lt;br /&gt;
 x = &amp;quot;My String&amp;quot;&lt;br /&gt;
 x = [1, &amp;quot;My String&amp;quot;, Hash.new ]&lt;br /&gt;
&lt;br /&gt;
3.Ruby's dynamic typing means you don't repeat yourself: In Java have we had to suffer through verbose code along the lines of &lt;br /&gt;
 &lt;br /&gt;
  XMLPersistence xmlPersistence = (XMLPersistence)persistenceManager.getPersistence(); &lt;br /&gt;
Ruby eliminates the need for the type declaration and casting (as well as parentheses and semicolon): a typical Ruby equivalent would be&lt;br /&gt;
  xmlPersistence = persistence_manager.persistence.&lt;br /&gt;
&lt;br /&gt;
4.In Java, we often iterate over a collection's Iterator, running the logic on each element. But the iteration is just an implementation detail: in general, we are just trying to apply the same logic to each element of a collection.&lt;br /&gt;
In Ruby, we pass a code block to a method that does just that, iterating behind the scenes. &lt;br /&gt;
For example,&lt;br /&gt;
  [1, 2, 3, 4, 5].each{|n| print n*n, &amp;quot; &amp;quot;} &lt;br /&gt;
prints the string 1 4 9 16 25; an iterator takes each element of the list and passes it into the code block as the variable n.&lt;br /&gt;
&lt;br /&gt;
== Projects better suited for Ruby  ==&lt;br /&gt;
&lt;br /&gt;
The most prominent application of Ruby is in web development using Ruby on Rails.&lt;br /&gt;
Ruby on Rails is an open source web framework. Rails was created by David Heinemeier Hansson in 2003. Since then many applications have been created using Ruby on Rails and presently this has been used in various applications like twitter [http://www.twitter.com] e-commerce[http://www.shopify.com/], live video streaming [http://www.hulu.com/], group chat application [http://campfirenow.com/?source=rails].&lt;br /&gt;
&lt;br /&gt;
== Projects better suited for Python ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Python has two web development frameworks: Django and TurboGears. Apart from web development, Python also provides platform for applications like Database Access, Desktop Graphical User Interface(GUI) development, Software development, Game and 3D graphics development.&lt;br /&gt;
One of the best examples of open source Python language is the &amp;quot;Zone Application server&amp;quot; [http://c2.com/cgi/wiki?ZopeApplicationServer].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
[1] &amp;quot;Ruby v/s Python&amp;quot; http://www.c2.com/cgi/wiki?PythonVsRuby &amp;lt;br&amp;gt;&lt;br /&gt;
[2] &amp;quot;Lambda the ultimate&amp;quot; http://lambda-the-ultimate.org/node/1480 &amp;lt;br&amp;gt;&lt;br /&gt;
[3] &amp;quot;Ruby&amp;quot; http://en.wikipedia.org/wiki/Ruby_(programming_language) &amp;lt;br&amp;gt;&lt;br /&gt;
[4] &amp;quot;Python&amp;quot; http://en.wikipedia.org/wiki/Python_(programming_language) &amp;lt;br&amp;gt;&lt;br /&gt;
[5] &amp;quot;Ruby, Python, Power&amp;quot; http://blog.ianbicking.org/ruby-python-power.html &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_11_AS&amp;diff=19051</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 11 AS</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_11_AS&amp;diff=19051"/>
		<updated>2009-09-11T17:51:32Z</updated>

		<summary type="html">&lt;p&gt;Apurush: /* &amp;lt;center&amp;gt; '''Ruby vs Python''' &amp;lt;/center&amp;gt; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;                                          &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
==  &amp;lt;center&amp;gt; '''Ruby vs Python'''  &amp;lt;/center&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
== Definition of Ruby and Python ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' is a dynamic, reflective, general purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features.&lt;br /&gt;
It is an interpreted language that includes a powerful set of libraries. While it is often referred to as a scripting language, it is a pure objected-oriented language that has sufficient expressiveness for general-purpose applications.&lt;br /&gt;
&lt;br /&gt;
'''Python''' is an interpreted, object-oriented, high-level programming language with dynamic semantics.&lt;br /&gt;
&lt;br /&gt;
== Differences in their language features ==&lt;br /&gt;
1.The first thing to be noted in Ruby is that,everything is an object, whereas in Python we have the liberty to code without using objects. &lt;br /&gt;
&lt;br /&gt;
2.In ruby, the programmer can use blocks to extend the language for application specific control statements where as in Python we are supposed to use only the control statements provided by the language.&lt;br /&gt;
&lt;br /&gt;
3.Ruby protects class attributes.We can’t access attributes of objects from outside the class.&lt;br /&gt;
Python doesn’t protect our code from other programmers. If they want to shoot themselves in the foot they are allowed to do so.&lt;br /&gt;
&lt;br /&gt;
4.In Ruby, there are no functions, but there are methods, blocks and lambdas. All of them seem to have subtle differences, and sometimes we need to not just call them, but use .call().&lt;br /&gt;
In Python, there are only functions. Lambdas are functions whose name is &amp;lt;lambda&amp;gt;. Methods are functions that are wrapped, we don’t have to pass self.&lt;br /&gt;
&lt;br /&gt;
5.The one line nameless mini-functions that can be created in Python are called Lambdas where as its Ruby counterpart is called as Blocks. Not only the name is different but also Blocks have some terrific advantage over lambdas. One of the most notable advantage is that Ruby blocks are more powerful, in that the interaction between the blocks and its contents is quite easy where as its almost impossible for the interaction between lambdas and its contents in Python. The other advantage is that Ruby blocks have access to the variables in the scope in which they were defined. This allows blocks to be used in a more expressive manner.&lt;br /&gt;
&lt;br /&gt;
code snippet for computing the largest of two numbers using python lambdas&lt;br /&gt;
   &amp;gt;&amp;gt;&amp;gt;bigger = lambda a, b : a &amp;gt; b&lt;br /&gt;
   &amp;gt;&amp;gt;&amp;gt;print bigger(1,2)&lt;br /&gt;
   False&lt;br /&gt;
   &amp;gt;&amp;gt;&amp;gt;print bigger(2,1)&lt;br /&gt;
   True&lt;br /&gt;
 &lt;br /&gt;
code snippet for computing the square of each number in the array  using ruby blocks&lt;br /&gt;
   array = [1, 2, 3, 4]&lt;br /&gt;
   array.iterate! do |n|&lt;br /&gt;
   n ** 2&lt;br /&gt;
   end&lt;br /&gt;
   puts array.inspect&lt;br /&gt;
   # =&amp;gt; [1, 4, 9, 16]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6.Python has a much greater range of libraries available to it, and most of those libraries are more mature and better documented than their Ruby counterparts.&lt;br /&gt;
&lt;br /&gt;
7.As far as readability is concerned, Python is considered to be easily readable whereas Ruby’s code is considered to be on the downside for readability.&lt;br /&gt;
&lt;br /&gt;
== Differences in Programming Environment ==&lt;br /&gt;
&lt;br /&gt;
Both Ruby and Python run on almost all the user friendly platforms like Windows9x/2000/NT, Unix, Mac-OS, MS-DOS. The difference in their programming environments is very subtle.&lt;br /&gt;
&lt;br /&gt;
Python has a Virtual Machine which optimizes certain functions like hash functions and sorting algorithms. &lt;br /&gt;
&lt;br /&gt;
Ruby as such does not have any virtual machine but it acts as an interpreter. There is a project going on for building a virtual machine for Ruby- the YARV [http://www.atdot.net/yarv/]&lt;br /&gt;
&lt;br /&gt;
== What Ruby has and Python does not have? ==&lt;br /&gt;
Ruby has continuations, where as Python does not have it. One notable use of continuations in Ruby is for breakpoints in debuggers. &lt;br /&gt;
Continuation is an abstract representation of the control state, of the things to come. Practically continuation support in a language means we can “save” our state at a point and return to it later. This is called a first-class continuation.&lt;br /&gt;
&lt;br /&gt;
In ruby, the callcc method is used (it’s Kernel#callcc) to create a Continuation class. Look at this small sample:&lt;br /&gt;
&lt;br /&gt;
 def loop&lt;br /&gt;
   cont=nil&lt;br /&gt;
   for i in 1..4&lt;br /&gt;
     puts i&lt;br /&gt;
     callcc {|continuation| cont=continuation} if i==2&lt;br /&gt;
   end&lt;br /&gt;
   return cont&lt;br /&gt;
 end&lt;br /&gt;
 c = loop&lt;br /&gt;
 c.call&lt;br /&gt;
&lt;br /&gt;
In irb this will print 1,2,3,4 then 3,4 again, then exit. As a script file run by the main ruby interpreter, this will loop forerver as it captures the control state of the program when and where it was called and this includes returning the continuation and then calling it again.&lt;br /&gt;
&lt;br /&gt;
== What Python has and Ruby does not have? ==&lt;br /&gt;
&lt;br /&gt;
1.It’s worth mentioning that Python has some big features like list comprehensions that Ruby doesn’t.&lt;br /&gt;
&lt;br /&gt;
  [foo(x) for x in alist if bar(x) != 'frotz']&lt;br /&gt;
&lt;br /&gt;
This is definitely shorter than:&lt;br /&gt;
&lt;br /&gt;
   foo = [] &lt;br /&gt;
   for x in alist:&lt;br /&gt;
   if bar(x) != 'frotz':&lt;br /&gt;
   foo.append(x)&lt;br /&gt;
&lt;br /&gt;
2.Python uses whitespace indentation, rather than curly braces or keywords, to delimit statement blocks (a feature also known as the off-side rule). An increase in indentation comes after certain statements; a decrease in indentation signifies the end of the current block.&lt;br /&gt;
&lt;br /&gt;
== Advantages over statically typed languages ==&lt;br /&gt;
&lt;br /&gt;
1.Java has static typing. We declare the type of each variable, and then, during compilation, we get an error message if we use a variable of the wrong type. Ruby, on the other hand, has dynamic typing: We don't declare types for variables or functions, and no type-check occurs until runtime, when we get an error if we call a method that doesn't exist. Even then, Ruby doesn't care about an object's class, just whether it has a method of the name used in the method call. For this reason, the dynamic approach has earned the name duck typing: &amp;quot;If it walks like a duck and quacks like a duck, it's a duck.&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
'''Duck Typing'''&lt;br /&gt;
&lt;br /&gt;
 class ADuck&lt;br /&gt;
     def quack()&lt;br /&gt;
         puts &amp;quot;quack A&amp;quot;;&lt;br /&gt;
     end&lt;br /&gt;
 end&lt;br /&gt;
 class BDuck&lt;br /&gt;
     def quack()&lt;br /&gt;
         puts &amp;quot;quack B&amp;quot;;&lt;br /&gt;
     end&lt;br /&gt;
 end&lt;br /&gt;
 # quack_it doesn't care about the type of the argument duck, as long&lt;br /&gt;
 # as it has a method called quack. Classes A and B have no&lt;br /&gt;
 # inheritance relationship.&lt;br /&gt;
 def quack_it(duck)&lt;br /&gt;
     duck.quack&lt;br /&gt;
 end&lt;br /&gt;
 a = ADuck.new&lt;br /&gt;
 b = BDuck.new&lt;br /&gt;
 quack_it(a)&lt;br /&gt;
 quack_it(b)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.In Ruby, variables do not need to be declared and are free to change type from statement to statement. So the following code, where the variable x changes from a FixNum (an integer that fits within a native machine word) to a String to an Array, is a perfectly legal sequence of Ruby code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 x = 10&lt;br /&gt;
 x += 4&lt;br /&gt;
 x = &amp;quot;My String&amp;quot;&lt;br /&gt;
 x = [1, &amp;quot;My String&amp;quot;, Hash.new ]&lt;br /&gt;
&lt;br /&gt;
3.Ruby's dynamic typing means you don't repeat yourself: In Java have we had to suffer through verbose code along the lines of &lt;br /&gt;
 &lt;br /&gt;
  XMLPersistence xmlPersistence = (XMLPersistence)persistenceManager.getPersistence(); &lt;br /&gt;
Ruby eliminates the need for the type declaration and casting (as well as parentheses and semicolon): a typical Ruby equivalent would be&lt;br /&gt;
  xmlPersistence = persistence_manager.persistence.&lt;br /&gt;
&lt;br /&gt;
4.In Java, we often iterate over a collection's Iterator, running the logic on each element. But the iteration is just an implementation detail: in general, we are just trying to apply the same logic to each element of a collection.&lt;br /&gt;
In Ruby, we pass a code block to a method that does just that, iterating behind the scenes. &lt;br /&gt;
For example,&lt;br /&gt;
  [1, 2, 3, 4, 5].each{|n| print n*n, &amp;quot; &amp;quot;} &lt;br /&gt;
prints the string 1 4 9 16 25; an iterator takes each element of the list and passes it into the code block as the variable n.&lt;br /&gt;
&lt;br /&gt;
== Projects better suited for Ruby  ==&lt;br /&gt;
&lt;br /&gt;
The most prominent application of Ruby is in web development using Ruby on Rails.&lt;br /&gt;
Ruby on Rails is an open source web framework. Rails was created by David Heinemeier Hansson in 2003. Since then many applications have been created using Ruby on Rails and presently this has been used in various applications like twitter [http://www.twitter.com] e-commerce[http://www.shopify.com/], live video streaming [http://www.hulu.com/], group chat application [http://campfirenow.com/?source=rails].&lt;br /&gt;
&lt;br /&gt;
== Projects better suited for Python ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Python has two web development frameworks: Django and TurboGears. Apart from web development, Python also provides platform for applications like Database Access, Desktop Graphical User Interface(GUI) development, Software development, Game and 3D graphics development.&lt;br /&gt;
One of the best examples of open source Python language is the &amp;quot;Zone Application server&amp;quot; [http://c2.com/cgi/wiki?ZopeApplicationServer].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
[1] &amp;quot;Ruby v/s Python&amp;quot; http://www.c2.com/cgi/wiki?PythonVsRuby &amp;lt;br&amp;gt;&lt;br /&gt;
[2] &amp;quot;Lambda the ultimate&amp;quot; http://lambda-the-ultimate.org/node/1480 &amp;lt;br&amp;gt;&lt;br /&gt;
[3] &amp;quot;Ruby&amp;quot; http://en.wikipedia.org/wiki/Ruby_(programming_language) &amp;lt;br&amp;gt;&lt;br /&gt;
[4] &amp;quot;Python&amp;quot; http://en.wikipedia.org/wiki/Python_(programming_language) &amp;lt;br&amp;gt;&lt;br /&gt;
[5] &amp;quot;Ruby, Python, Power&amp;quot; http://blog.ianbicking.org/ruby-python-power.html &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Apurush</name></author>
	</entry>
</feed>