Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

design pattern for Strings to Objects

 
manu chaox
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I am looking for a design pattern for a situation where I have to create a Widget(DateBox, Label,...) according to a configuration Strings as a input parameter. In the configuration strings there are information about type of widget, size etc.
Do you know a suitable design pattern for this purpose ?

Thank you for a help.
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Factory Method or Abstract Factory.
 
Pay attention! Tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!