Documentation Archive Developer
Search
PATH  Documentation > WebObjects 4.5 > EOF Developer's Guide

Top

Designing Enterprise Objects


The Enterprise Objects Framework and the applications you build with it revolve around the enterprise objects that you design. Designing these objects, then, is in many ways the essence of creating an Enterprise Objects Framework application. This chapter explains the mechanics of designing enterprise objects, describes their structure and interaction with the Framework, and explains how you can take advantage of features provided by the Framework.

Designing an enterprise object entails three major steps:

This chapter describes the activities that occur during each. The EOModeler application plays a part in all stages of enterprise object design, so this chapter refers frequently to Enterprise Objects Framework Tools and Techniques, where using EOModeler is documented.

This chapter uses selections from the Enterprise Objects Framework on-line examples to explain the principles of designing an enterprise object. In particular, the chapter focuses on the Customer entity in the Rentals database. A customer is a video store member who is authorized to rent videos.

Designing Your Schema
Defining the Model
EOGenericRecord or Custom Class?
Which Attributes Should Be Class Properties?
What Data Types Should Your Properties Be?
How Should Your Enterprise Object Manage Relationships with Other Objects?
What About Inheritance?
Implementing an Enterprise Object
Generating Source Files
Superclass
Instance Variables
Writing Accessor Methods
Writing Derived Methods
Performing Validation
Creating and Inserting Objects
Setting Defaults for New Enterprise Objects
Writing Business Logic
Gotchas
Constructor for Creating Enterprise Objects
Numeric Values and NULL
Cautions in Implementing Accessor Methods
Don't Override equals

First Section