On Feb 21, 4:30 pm, Sean Corfield <[email protected]> wrote: > On Tue, Feb 17, 2009 at 3:53 PM, Henry <[email protected]> wrote: > > BookmarkManager cannot be Singleton because it has states (i.e. a > > collection of links, more specifically it shall be a Tree). > > The bookmark *manager* can certainly be a singleton. The logic exists > just once with the browser-specific configuration. The collection of > links is per-user I expect. So, really, user-has-bookmarkCollection, > which is managed by that singleton.
Would making the bookmarkManager singleton be.. very weird? To be singleton, it has to have no state. So how can it contain the logic to mange the collection yet doesn't have the collection in the attribute? passing in by arguments? That's will be like... BookmarkManger.addLink(linkArray, link) BookmarkManger.removeLink(linkArray, index) Is that what you have in mind? Regards, Henry Ho --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CFCDev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cfcdev?hl=en -~----------~----~----~----~------~----~------~--~---
