beautypg.com

Apple WebObjects 5 User Manual

Page 26

background image

26

What Is an Enterprise Object?

Apple Computer, Inc. January 2002

C H A P T E R 3

Enterprise Objects

In addition to providing classes that manage a set of enterprise-object instances in
memory, WebObjects defines an API to which enterprise objects must conform, as
well as default implementations for this API. As a result, you only need to
concentrate on the parts of your enterprise-object classes specific to your
application.

To maximize the reusability and extensibility of your objects, they shouldn’t embed
knowledge of the user interface or database alongside the business logic. For
example, if you embed knowledge of your user interface, you can’t reuse the objects
because each application’s user interface is different. Similarly, if you embed
knowledge of your database, you’ll have to update your objects every time you
modify the database’s schema.

If not in the business objects, then where does this knowledge go? It’s handled by
WebObjects as shown in

Figure 3-1

(page 27).