5
WebObjects 5 offers a number of powerful features designed to speed application development, reduce errors, and permit easy updating and modification of your applications. These
features include
• Automated data access
• Streamlined page generation
• Rich Java clients
• Integrated development and deployment tools
For additional information, please see the WebObjects 5 data sheet in the “Tech Specs” section
of www.apple.com/webobjects.
Automated data access with Enterprise Objects
For a typical web application, the most time-consuming and error-prone step is managing database access. Generating correct SQL, understanding foreign keys and dependencies, ensuring
that transactions are committed in the proper order—all these are difficult processes for a
programmer to master and implement properly. And the price of failure is high. One erroneous
entry could rapidly propagate throughout your application, corrupting the entire database.
To prevent such errors, WebObjects takes the programmer out of the data access loop. Instead,
all database access is handled automatically via Enterprise Objects (EOs). The developer simply
uses the graphical EOModeler tool to create a plist (an XML-like structured text file used for
configuration information) called an EOModel. This model specifies how to map tables into
objects, and encodes all the dependencies and the “to-one” and “to-many” relationships
between them. The WebObjects frameworks use this model file to create Enterprise Objects,
and transparently handle all the fetching, caching, and updating to and from the database.
After the EOModel is created, all the programmer has do to is to write straightforward Java code
that accesses, modifies, and commits the Enterprise Objects. EOs can be thought of as entity
beans with complete container-managed persistence. Perhaps just as important, this process is
managed via configuration files rather than generated code. The database administrator can
change databases, reorganize schema, switch to an ERP system, or even use multiple data
sources at once. As long as the model file is properly updated, the programmer (and the code)
never knows the difference.
Streamlined page generation with Web Components
The next challenge is turning objects into web pages. The traditional way to do this has been
via some sort of server-side scripting, whether Perl, ASP, or JSP. However, this method can lead
to a complicated mix of code and markup in the same file, and often requires one person to be
both an HTML designer and a Java developer.
Key Features
Apple’s patented object-relational mapping engine lets you write
all your business logic using objects. WebObjects automatically
fetches, caches, and updates data for you from any JDBC 2.0
database or XML stream. You may never write another line of
SQL.