Under a traditional functional decomposition approach to program design, often referred to as structured programming, the function or procedure is the unit of modularity; programs are designed and implemented by placing a number of well-defined procedures in a particular order, and executing these procedures to achieve a desired result. The focus of the design is the procedure or action to be performed. Objects such as data structures are attached to procedures and passed between them using parameters. A user typically selects an action to be performed, and then selects or enters a data object upon which to perform that action.
Figure "Program Flow - Functional Decomposition Approach"
The functional decomposition approach is best suited to situations where the procedure is necessarily the focus of the application (for instance, a process management application), and where the correct sequencing of operations to be performed is a crucial factor in the successful execution of the required task. Under this approach, the application defines the sequence of actions which the user performs; that is, the application controls the user interface.
In an object-oriented approach, the application object is the unit of modularity. Application objects communicate with each other and pass messages containing actions to be performed. Object-oriented programming is hence the conceptual inverse of functional decomposition, and is a logical extension of the industry trend toward data-centric application design.
Figure "Program Flow - Object-Oriented Approach"
This is not to say that an object-oriented application should not be structured. Although such an application consists of objects that are largely independent of one another in programming terms, normal structured coding techniques should be followed in the creation of the methods within each application object.
The object-oriented approach also requires firm management of the application development process in order to achieve the greatest possible level of productivity through code reuse. Administration and control of existing objects is vital in order to allow application developers to access and use these objects in their applications. Management of the application development process is discussed in greater detail in Managing Development, and the structuring of application source modules in order to provide optimal granularity is described in Application Program Construction.
While it is possible for an application designed according to functional decomposition principles to implement some of the characteristics of object-oriented applications such as message passing, such applications should not be regarded as truly object-oriented. If the design approach centers on procedures rather than data objects, then the application is designed along functional decomposition guidelines. In this case, message passing is merely a replacement of the normal subroutine call mechanism, and does not significantly affect the structure of the application.