Documentation Archive Developer
Search
PATH  Documentation > WebObjects 4.5 > Creating a Java Client Application: A Tutorial

   

Enterprise Objects and Relational Databases

The Studio, Movie, and Talent enterprise object classes correspond to tables in a relational database. For example, the Studio enterprise object corresponds to the STUDIO table in the database, which has NAME and BUDGET columns. The Studio enterprise object class in turn has name and budget instance variables, or class properties (instance variables based on database data are called "class properties"). In an application, Studio objects are instantiated using the data from a corresponding database row, as shown in the following figure:

The enterprise objects in your application do not merely form a static representation of your database data, however. Enterprise objects add behavior to your data. For example, the Studio enterprise object class has a method for calculating the studio's portfolio value based on the revenue of its movies. It also has a method for buying all of the movies starring a specified actor.

In Java Client WebObjects applications, Enterprise Objects Framework manages the interaction between the database (on the server), your enterprise objects (on the server and client), and the user interface (on the client). Its primary responsibilities are as follows:


© 1999 Apple Computer, Inc. – (Last Updated 13 Sep 99)