Chapter 8

* Modelling Industry-Scale Programs

In Chapter 2 we discussed the need for powerful abstraction mechanisms that represent useful information about the design of our programs without clutter. And in Chapter 2 we were introduced to 1-dimensional constants, which are powerful abstraction mechanisms for modelling large programs. But are 1-dimensional constants enough to model industry-scale programs? Can a diagram that models such a system still “fit on the side of a van”? At first glance it appears that the 1-dimensional constants should be enough because each may stand for sets of any number of classes or methods. However, in very large (industry-scale) programs, there can be hundreds of such sets, and the representation of each may very well clutter our diagrams. The scale of such systems therefore compels us to consider an even more abstract representation, one which stands for sets of sets, to which we refer as entities of dimension 2. Keeping true to our principle of elegance (p. 17), we only need introduce one new symbol to this end (Legend 18 on page 110). Indeed, correlations between sets of sets of classes and methods can be found not only in industry-scale programs but also in design patterns such as the Abstract Factory (§11.4) and the Visitor (Appendix I).

Let us demonstrate this using an example from package java.util in Java's SDK. Codechart 68a models five of the inheritance class hierarchies in the package. Each hierarchy is modelled using a 1-dimensional ...

Get Codecharts: Roadmaps and blueprints for object-oriented programs now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.