paulb@654 | 1 | <?xml version="1.0" encoding="iso-8859-1"?> |
paulb@360 | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
paulb@515 | 3 | <html xmlns="http://www.w3.org/1999/xhtml"><head> |
paulb@360 | 4 | <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type" /> |
paulb@654 | 5 | <title>Sessions and Persistent Information</title> |
paulb@515 | 6 | <link href="styles.css" rel="stylesheet" type="text/css" /></head> |
paulb@515 | 7 | |
paulb@360 | 8 | <body> |
paulb@360 | 9 | <h1>Sessions and Persistent Information</h1> |
paulb@360 | 10 | <p>The term "session" is a technical term describing information which |
paulb@360 | 11 | is remembered by an application for a particular user. Sessions work in |
paulb@360 | 12 | conjunction which other mechanisms - typically <a href="cookies.html">cookies</a> |
paulb@360 | 13 | and <a href="users.html">user identifiers</a> - like this:</p> |
paulb@360 | 14 | <ol> |
paulb@360 | 15 | <li> The application finds out who the user is - this information may |
paulb@360 | 16 | be recorded in a <a href="cookies.html">cookie</a> or be associated |
paulb@360 | 17 | with a request in <a href="users.html">some other way</a>.</li> |
paulb@360 | 18 | <li>It then accesses a data store containing information associated |
paulb@360 | 19 | different users.</li> |
paulb@360 | 20 | <li>Finally, it accesses information specific to the stated user - |
paulb@654 | 21 | this is that particular user's session.</li> |
paulb@360 | 22 | </ol> |
paulb@360 | 23 | <h2>Sessions vs. Persistent Information</h2> |
paulb@654 | 24 | <p>Information can be said to be "persistent" when it is |
paulb@360 | 25 | remembered beyond the lifetime of a particular request to an |
paulb@360 | 26 | application. Sessions, meanwhile, are effectively a special case of |
paulb@360 | 27 | persistent information - data is addressed or accessed using each |
paulb@360 | 28 | user's identity, and the information is partitioned in such a way that |
paulb@360 | 29 | sessions cannot be shared between users.</p> |
paulb@515 | 30 | <table style="text-align: left; width: 80%;" align="center" border="1" cellpadding="5" cellspacing="0" width="80%"> |
paulb@360 | 31 | <tbody> |
paulb@360 | 32 | <tr> |
paulb@360 | 33 | <td></td> |
paulb@360 | 34 | <th style="text-align: center;">Sessions</th> |
paulb@360 | 35 | <th style="text-align: center;">Persistent Information</th> |
paulb@360 | 36 | </tr> |
paulb@360 | 37 | <tr> |
paulb@360 | 38 | <th>Access</th> |
paulb@360 | 39 | <td align="undefined" valign="undefined">Through user identity.</td> |
paulb@360 | 40 | <td align="undefined" valign="undefined">Through any relevant |
paulb@360 | 41 | concept: users, documents, orders, products, locations - anything an |
paulb@360 | 42 | application might want to remember.</td> |
paulb@360 | 43 | </tr> |
paulb@360 | 44 | <tr> |
paulb@360 | 45 | <th>Partitioning</th> |
paulb@360 | 46 | <td align="undefined" valign="undefined">By user identity. Each |
paulb@360 | 47 | user has its own private data store.</td> |
paulb@360 | 48 | <td align="undefined" valign="undefined">Arbitrary. Many data |
paulb@360 | 49 | stores or data sources may be set up. The data may be shared across the |
paulb@360 | 50 | entire application or there may be access controls in place.</td> |
paulb@360 | 51 | </tr> |
paulb@360 | 52 | </tbody> |
paulb@360 | 53 | </table> |
paulb@515 | 54 | <p>Access to persistent information in general can be done in a simple fashion by using |
paulb@515 | 55 | repositories (see <a href="directory-repository.html">"DirectoryRepository - Simple Access to Files in a Directory"</a>) or, for example, by using database access libraries - see <a href="integrating.html">"Integrating |
paulb@360 | 56 | with Other Systems"</a> for more details. </p> |
paulb@360 | 57 | <h2>More About Sessions</h2> |
paulb@360 | 58 | <ul> |
paulb@360 | 59 | <li><a href="sessions-usage.html">Using Sessions</a></li> |
paulb@360 | 60 | <li><a href="sessions-servers.html">Server Environment Support for |
paulb@360 | 61 | Sessions</a></li> |
paulb@360 | 62 | </ul> |
paulb@654 | 63 | </body></html> |