How Factory Method Design pattern provide Encapsulation

In this post, we’ll see how Factory method Design Pattern come into picture, what advantages it will provide and how it help in implementing loose coupling concept.

Below picture shows Car factory that produce different car depending on it’s feature and model. For instance, it produces BMW 1 series, BMW 2Series, BMW M3 etc. Whatever order we placed for car, factory will produce.

This same concept applies to Factory Design pattern.


Click here to read more



Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s