Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Martin Fowlers Plugin Factory

 
Rajesh Khan
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone have an idea how a plugin factory would be implemented and how it differs from a normal factory??

 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rajesh Khan wrote:Does anyone have an idea how a plugin factory would be implemented and how it differs from a normal factory??


may be it would be useful to tell about the plugin factory. So that a comparison can be drawn between the two. (I am not aware/familiar with plugin factory)
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok I just read about Plugin Factory, it more or less similar to factory pattern in the sense both of them are used to return instance of some implementation of an interface. The word plugin is used because you give your code a kind of plugabble behavior- you have one interface and one implementation to start with, if you get a new requirement for the same feature you just have to create a new implementation and then enhance the factory to return you the instance of correct implementation. So you see its kind of adding a new plugin to your code. May be you can read this for more details and a specific example.
 
Rajesh Khan
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the link. Id look into it and post back if i have any questions. Till that time I am keeping this thread open.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic