Top

Creating Reusable Components


In the simplest applications, each component corresponds to an HTML page, and no two applications share components. However, one of the strengths of the WebObjects architecture is its support of reusable components: components that, once defined, can be used within multiple applications, multiple pages of the same application, or even multiple sections of the same page.

This chapter describes reusable components and shows you how to take advantage of them in your applications. It begins by illustrating the benefits of reusable components. It then describes how to design components for reuse, how reusable components can communicate with the parent component, and how state is synchronized between parent and child components. Finally, it provides some design tips for you to consider when designing your own reusable components.

Benefits of Reusable Components
Centralizing Application Resources
Simplifying Interfaces

Intercomponent Communication
Synchronizing Attributes in Parent and Child Components

Sharing Reusable Components Across Applications

Search Path for Reusable Components

Designing for Reusability

First Section