beautypg.com

Figure 3-5 – Apple WebObjects 5 User Manual

Page 35

background image

C H A P T E R 3

Enterprise Objects

The Enterprise Objects Advantage

35

Apple Computer, Inc. January 2002

It’s more maintainable.

With WebObjects, you don’t have to duplicate your

business logic. Thus you can easily make substantial changes to your rules
without resorting to finding and fixing every affected page in every affected
application. You can also easily track changes to your schema.

It improves data integrity.

In WebObjects, you don’t need to rely on all

application developers to implement the business rules correctly. If one
application has an error, it is less likely to corrupt your database.

It scales better.

In WebObjects, you can improve your application’s

performance without having to provide your users with faster systems. Instead,
you can simply move some computation-intensive processing to fast computers.

Figure 3-5

Implementing business logic in the user interface application

Another approach (Figure 3-6) is to implement your business rules in the
database—with stored procedures, rules, constraints, and triggers, for example. The
WebObjects approach betters this approach in the following ways:

It offers improved interactivity.

If you implement your business rules in the

datasource, you need to make a round trip to the database every time the user
performs an action. Alternatively, you can batch up database changes, which
prevents the user from receiving immediate feedback. In WebObjects
applications, changes immediately appear in the user interface, but you access
the database only when saving these changes or fetching data.

Application

Relational database

Business logic