Factory Pattern

Factory Pattern

The Factory Pattern creates objects without exposing the underlying logic to the calling class, which then refers to the newly created object through a common interface.

The advantage of this pattern is that new “products” can be added without changing a single line of code in the framework (the client code that uses the resultant objects).

 

TRP

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s