I think your Browser object should probably be a Facade. You can have a sub-system with Bookmarks and Tabs and Menus and Plugins and whatever else you like and your client code can talk to the BrowserFacade.
You may still want a Browser object with some basic things like close() etc The idea of a Facade is to simplify a complicated sub-system. With all the delegation you seem to want your Browser to do it feels like you're using it as a facade so you may as well call it a facade. Alan ________________________________ From: Henry <[email protected]> To: CFCDev <[email protected]> Sent: Tuesday, February 17, 2009 10:27:23 PM Subject: [CFCDEV] Re: OO question, how should I model this? On Feb 17, 2:22 pm, Brian Kotek <[email protected]> wrote: > First, if the client code needs to do all these things to bookmarks, why > can't it just interact with BookmarkManager directoy? Why does it have to go > through the Browser object? I guess u meant interact with BookmarkManager "directly"? Wouldn't that be Solution1? var bookmarkManager = Browser.getBookmarkManager(); Then the View can call all public methods of BookmarkManager without going through Browser... 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 -~----------~----~----~----~------~----~------~--~---
