How everything comes together
Advanced object-oriented applications are composed of a well-thought-out web of behavioral objects that retrieve data from some kind of database and use interface objects to display the information to the user. Some of the objects handle business logic while others deal with technical issues. The objects that handle technical issues are usually referred to as "the framework."
Even people familiar with object-oriented development tend to think that applying object-oriented techniques automatically gives you the ability to plug all kinds of objects together. Nothing could be further from the truth. Objects have to be well organized to interact with each other. Figure 3 demonstrates the object interaction in my framework.
Figure 3
. A rough overview of a part of my framework.In this scenario, a form communicates with a data manager to retrieve a data object. The form may also talk to the data manager to save the data object. The user either through the form itself, or through a menu or toolbar usually initiates saving the object. In this case, the menu (or toolbar) simply communicates with the form, which then communicates with the data manager. All objects must follow strict communication guidelines. The menu needs to know about the interface of the form. So does the toolbar. The form needs to know about the interface of the data manager and it has to know how to handle the data object. Objects that don't know these things and don't follow the guidelines set by my framework objects will be hard to reuse (see below for more information about object reuse).
As you can imagine, a number of additional objects will be involved in setting up this kind of scenario. All forms must be managed; the same is true for toolbars and menus. Figure 4 shows some more detail.
Figure 4
. A more detailed framework overview.My abstract manager class ensures that all manager objects have a standardized interface. Figure 4 also shows three individual manager classes that control the forms, menus and toolbars.
The concept of behavioral objects that communicate with each other through clearly defined interfaces can be found all over advanced-object systems. I could continue to reveal more details about my framework example, but this would bring us into the area of object modeling, which is covered in Section 3 of this book.