O'Reilly logo

Professional Xcode® 3 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 14. Class Modeling

WHAT'S IN THIS CHAPTER?

  • Graphically modeling classes

  • Learning the basics of the Xcode modeling tools

  • Customizing diagrams and filtering out extraneous detail

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 9, uses the project's index to list your project's classes. Although this helps, it still doesn't present a bird's-eye view of your application's structure. Enter class modeling. Class modeling performs the same function as the class browser, but in a much more visual and customizable way.

You model classes by creating a class model document. The document can include any set 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 14-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. In other words, the class modeler is not a UML design tool.

FIGURE 14-1

Figure 14-1. FIGURE 14-1

Class models are really useful when:

  • You want ...

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