Variation on the strategy pattern ?

From: Bruno Desthuilliers (bdesth.tagada_at_tsoin-tsoin.free.fr)
Date: 12/21/03


Date: Sun, 21 Dec 2003 23:13:59 +0100

Hi

I have a class of objects (let's say 'Document') that may be build from
differents data sources (text or HTML or XML files, a database, etc). To
abstract the way one of these object can be build, I have defined an
interface (let's say 'DocMaker'), and have various concrete classes
implementing that interface.

The concrete class to use is choosen at run-time, according to the
context (conf files + 'doc type' + etc) - in fact, the concrete DocMaker
object instanciation is handled by a Factory...

I have (almost) the same case with a 'Menu' object, a 'MenuMaker'
interface, and some concrete MenuMakers that can build the Menu from a
filesystem or an XML file or a database or whatever.

Note that in both cases, a concrete 'DocMaker' or 'MenuMaker' can use
other concrete Doc|MenuMakers to build the Document or Menu from
multiple sources (like a Document mixing datas from an HTML file with
data from a database...)

It seems to me that it's a variation on the Strategy pattern, but since
it's more used as a creationnal pattern than as a behavioral one, I
wondered if there was an 'official' name for this use of the Strategy
pattern (and if yes, some link to it - I did STFF but did not find
anything like this...)

TIA
Bruno



Relevant Pages

  • Re: Variation on the strategy pattern ?
    ... > differents data sources (text or HTML or XML files, a database, etc). ...
    (comp.object)
  • Different ways to read xml? which one should I use?
    ... in this moment there are some SPs that generate XML files and there ... Use Xslt to transform the xml and send just HTML to the browser. ... isnt it faster if we store the XML on a text or blob field on the database? ...
    (microsoft.public.dotnet.framework)
  • Re: SQLXMLBulkLoad Question (Please help)
    ... Are you confirming that this is a bug in XmlBulkload? ... corporate database to multiple remote client databases. ... file generated for each table and these xml files are zipped ... dataset also contains correct values for nulls, empty strings and spaces. ...
    (microsoft.public.sqlserver.xml)
  • Re: general archetecture questions.
    ... > first app i'm writing will be using XML as a database of sorts, using> dataset and dataview and wrapped up in a set of classes. ... in the past i used> ".getinstance" in java to get a single instance of a class contained in a application variable to ensure i dont have 3-4> different instances hitting the database and worse now writing 3-4 different> xml files. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: xml, sql mobile and server 2005
    ... I have a Windows Mobile application that uses a database. ... this works great and I get some nice xml files on mp mobile device. ... Depending on whether schema info is included on the wm5 side, ... CONSTRAINT PRIMARY KEY CLUSTERED ...
    (microsoft.public.sqlserver.xml)