Java Reference
In-Depth Information
Figure 1.2 A highly interconnected spaghetti application with little structure. The solid lines represent
dependencies that are identifiable at both compile-time and runtime, whereas the dotted lines are runtime-
only dependencies. This sort of dependency graph is typical of procedural languages.
Object orientation marked a big shift in the development of programming languages,
providing a strong level of encapsulation in them. Objects were responsible for main-
taining their internal, private state, and could have internal, private methods. It was
believed that this would mark the end of spaghetti code, and to an extent it did.
Extending the spaghetti metaphor, conventional Java programs (or any other object-
oriented language, for that matter) can be thought of as object minestrone (figure 1.3)—
Figure 1.3 An application with no structure beyond individual well-encapsulated objects (connections
between objects aren't shown). This sort of structure is typical of object-oriented languages. Although
the objects themselves are highly modular, there's no more granular modularity.
Search WWH ::

Custom Search