I am busy with early design on an HTML editing component, the implementation of which should remain highly isolated from clients. One possible constraint governing the use of this component is that a client of it may only use one instance for a particular task (edit a document) at one time. Multiple separate tasks proscribe using a singleton, so I have decided to go with a factory method and private constructor on the actual editor object.
Here is where I get into a little dilemma: I would prefer the management and control of editor instances to be handled by a dedicated controller object, but there I compromise on the private access to the editor constructor. Or, to maintain the latter, I can use a static method in the editor object itself to create new objects, but then the division of duties becomes blurred between the controller class and the editor class. What do the experts say? =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com