O'Reilly logo

Beginning Xcode® by James Bucanek

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 11. Class Modeling

To be an effective object-oriented programmer, you must have a clear mental picture of the classes in your application and their relationships. Sometimes this "picture" is hard to form, because class relationships can be both complex and abstract. The class browser, discussed in Chapter 8, uses the project's index to list the details and organization of your project's classes. While this helps, it still doesn't present a bird's-eye view of your application's structure. Enter class modeling. Class modeling, new in Xcode 2.1, performs the same function as the class browser—but in a much more visual and customizable way.

You can create a class model document from any group of classes. This could be your entire application or just a set of functionally related classes. Xcode then graphs those classes, as shown in Figure 11-1. The class model tracks, and instantly reflects, any changes made to your source files. Unlike data modeling, discussed in the next chapter, the class modeler is not an editor. You cannot design or alter the declarations in a class model and then transform that model into code. Maybe in some future version of Xcode, the class modeler will evolve into a full-circle UML-like design environment. But for now, class modeling is strictly a visualization and documentation tool.

Figure 11-1

Figure 11-1. Figure 11-1

A class model is stored in a document. The documents ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required