I’m relatively new to OOP and AS3 making the transition from AS2, so I’m wondering the best OOP design pattern for a particular interface I’m working on. Specifically, I’m a little confused about how classes should interact with each other knowing (or rather, thinking) that it’s best not to have classes rely on each other. Should every main component be instantiated from the main document class? For instance, I have a some classes for each of the following:
• Main Class (Document Class)
• Navigation Tab
• Photo Editor
• Text Editor
Now the toolbar controls the photo editor and also toggles on/off the text editor. The navigation also has to be able to remove the photo editor and text editor when a new section is selected. So should the main class instantiate the toolbar and the toolbar instantiate the photo and text editors or, as I suggested above, everything be controlled through the main document class?