In the "old" days of basic client/server type environments where the client and server had a "permanent" connection the users were easily identified by the server (connection number would do it). Applications ran on the client and it would maintain all the state information. Any connections to the database (DB) were unique to each client. With web based Applications the server is only aware of the client for brief periods of time (during the Web Event), there are no permanent connections to the server and users must reidentify themselves with every web event. The application runs on the server and the user has no private storage in which to put state information so the server must have a way to maintain session information (PE) and. DB connections are shared and reused by many clients.
So what is State?
It is information describing the current environment, like:
NetDynamics Server maintains the state for each session, this means that:
What is Session?
- Developers have access to this state
- Aids in developing Web applications
- Private storage space per session
If the user enters a URL
in their browser for a NetDynamics page a new session is created. But if
one ND page loads another ND page they will be part of the same session.
This means that if a user opens two browser windows for the same project,
he will be two different users.
The user is uniquely identified
either with a SpiderSession value (one page to another) or through a hidden
HTML field named SPIDERSESSION. The value of the field is encrypted for
security and contains the user's session id and some other useful information
for the ND App server.
Session Events
NetDynamics uses the following events to track sessions.
You can monitor a session start and stop with session initialization/timeout
events:
onNewSessionEvent
This is invoked for every new session, before display occurs
onSessionExpiringEvent
To allow you to retrieve the Session that has been targeted for expiration
onSessionTimeoutEvent
This is invoked when user returns with an expired session id in the request
Timeout = # of minutes a user can remain inactive before their session
is expired