Table of Contents
Previous Section
If you have WebObjects Pro or WebObjects Enterprise, you can incorporate custom compiled code into your WebObjects applications. Compiled code can play many different roles in a WebObjects application. For example, compiled code is commonly used to achieve the following objectives:
- Encapsulate business data and logic. You can design classes or modules that encapsulate behavior that is specific to the domain of your application. For example, an application that reserves conference rooms could use ConferenceRoom objects to manage room data like location and maximum occupancy. In addition, the ConferenceRoom class could implement business logic that denies requests for rooms that are already reserved. See the "Compiling and Debugging WebObjects Applications" chapter for more information on providing custom business logic using compiled code.
- Improve performance. By converting scripted components to Objective-C components, you can improve the performance of a WebObjects application. Script length, script complexity, and the number of nested subcomponents all affect a component's performance. As a component becomes more sophisticated, the performance advantage of writing it in Objective-C increases.
- Provide custom dynamic elements. A dynamic element is an object that uses an HTML template to generate HTML elements containing dynamic content. WebObjects provides elements such as buttons, hyperlinks, forms, text fields, and so on, which not only generate dynamic HTML but also bind custom logic to user actions. You can add to the collection of dynamic elements that come with WebObjects, or you can modify their behavior by replacing them with one of your own.
- Interface with other software. For example, you can use Enterprise Objects Framework to interface with a database server, and you can use NeXT's Distributed Objects system to implement communication between WebObjects applications and other software. See "The Enterprise Objects Framework Developer's Guide" for more information on Enterprise Objects Framework.
Table of Contents
Next Section