On Tue, Feb 17, 2009 at 6: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). >
Again, the completely arbitrary context you're throwing out here is making this very difficult, Henry. Why can't BookmarkManager be a singleton? I'm quite sure that in my copy of Firefox, if there is a BookmarkManager or some comparable object, there is only one instance of it. Why would it need more than one? > Imagine there's a Browser table, and one row of it represents a > Browser. There's a field calls bookmarks (since a browser has > bookmarks), and it is a JSON representation of the collection of > links. > Stop, and don't mention database tables again. Going down that route is only going to make trying to offer advice even more difficult than it already is. > > "Browser shouldn't be the access point for BookmarkManager.", then who > else can have references to BookmarkManger's that the view can ask > for? > I'll ask again: Why can't the view have a reference to the BookmarkManager directly? Where did you latch on to the idea that the view ONLY talks to this Browser object? By the way, what is this "View" even supposed to be? An OS native window? An AIR UI? Unless you can clearly state what it is you're trying to model, the context that it exists in, and the actual USE CASES that must be met, this thread is basically going to keep going around in circles. We've already hit 25 messages and don't understand what you actually want to know! If the question is "what number of delegation methods can I put into an object?", the answer is "the appropriate number". Yes, that's the actual answer. Because if you ask an abstract question, it results in an abstract answer. It might not be the answer you'd like, but I'm afraid it's the only valid answer without the details I asked for above. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
