Apple WebObjects 3.5 Manuel d'utilisateur Page 113

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 218
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 112
Objects and State
113
Characteristically, WebObjects takes an object-oriented approach to
fulfilling any of these state-storage requirements.
Objects and State
Three classes manage state in an application—WOApplication,
WOSession, and WOComponent. (In Java, these classes are called
WebApplication, WebSession, and Component.) An application object
handles state associated with the application as a whole, session objects
handle state associated with a particular user session within the application,
and component objects handle state associated with a particular page or
component within a session.
The Application Object and Application State
The application object is the logical place to store data that needs to be
shared by all components in all sessions of an application. Application state
is typically stored in the application object’s instance variables. For
example, the application object in the DodgeLite example application (in
<DocRoot>
/WebObjects/Examples where
<DocRoot>
is your web server’s document
root), keeps information about the cars available and the possible prices:
Vue de la page 112
1 2 ... 108 109 110 111 112 113 114 115 116 117 118 ... 217 218

Commentaires sur ces manuels

Pas de commentaire