Table of Contents
Previous Section
There are two primary reasons you use compiled code in WebObjects: to boost performance and to provide your own custom classes (remember, WebScript doesn't allow you to create new classes).
Providing your own custom business classes is one common use of compiled Objective-C. Another is to subclass the WebObjects classes that are the building blocks of a WebObjects application:
Many applications use some combination of compiled code and scripts. It's common to write your business logic as compiled Objective-C code and to then use WebScript to provide your interface logic. "Interface logic" refers to activities such as page navigation, capturing the data entered in forms, and managing the appearance of the user interface. Business logic, on the other hand, refers to the behavior associated with custom objects. For example, you could have an OrderProcessing object that validates orders to ensure that their data is correct and then checks them against available inventory.