• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

13.10. Summary

The components presented in this chapter all manage their own stream and shared object resources. For example, the PeopleList component's server-side code is responsible for creating and updating the people shared object. No other component updates it. The SharedText component's messages shared object is updated by the SharedText component's server-side object and is also directly updated by the client-side SharedText component's code. Updates may first occur on the server or in the client; in either case, the component manages its own resources. Separation of component resources is partly achieved by using a naming convention. All the component resource names and remote methods are grouped under a single name, pfcs, followed by the component's class name and then a unique name for the instance of the component. The naming convention was used for streams, shared objects, and remote method naming.

It is easy to look at components as small, self-contained applications. A component can maintain its own data, present it, and allow the user to update it. However, a component can also make its resources available to other components. The shared object of each component contains information about its current state and notifies any listeners of changes in that state through onSync( ) calls. For example, the PeopleList can present a view of the Status component's data within its listbox. As long as the PeopleList does not update the status shared object, both components can easily be modified and improved separately.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint