



















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Students of Communication, study E-Commerce as an auxiliary subject. these are the key points discussed in these Lecture Slides of E-Commerce : Application Object Variables, Active Server Pages, Microsoft Literature, Session Objects, Application Object, Global Variables, Intrinsic, Programmer, Client Requests, Installs
Typology: Slides
1 / 27
This page cannot be seen from the preview
Don't miss anything!




















In Microsoft literature, an ASP application is oftendefined as one that uses the ASP Applicationand/or Session objects.
-^
ASP applications can consist of three parts:^ –
Application Object
: provides global variables,
constants, objects.
-^
Session Object
: provides variables, constants, and
objects specific to each user's session.
variables, constants and objects
"Test Value"
An ASP Application object is instantiated the firsttime a client requests
ASP page in the ASP
application.
-^
IIS installs a default ASP application in the rootdirectory of the server.
-^
Using IIS, separate ASP applications can becreated using the Internet Services Manager.
What can be stored in the Application Object?
Common real-life uses:^ – Data caching of small data sets that are commonly used
but don't change often.
Referencing a non-existent application variablereturns an empty value, not an error (similar toRequest collection)
-^
Avoid repeated calls of same applicationvariable—write to a local variable.
-^
Since all pages/users have access to theapplication object's variables, carefully managewhen/where variables are written.
-^
Use the Application.Lock and Application.Unlockmethods to avoid concurrency problems.
Limit your use of application level objects – theytake up server memory that won't be released.
-^
Application-scope variables can be instantiated inany ASP page or by adding code to theApplication_OnStart event of the ASPapplication's global.asa file.
-^
Global.asa file not required to use manyApplication object capabilites.
Global.asa file includes an Application_OnEndevent that occurs when the ASP application isunloaded or wthe web service is gracefullystopped.
-^
No guarantee this code will run if web server orthe application crashes.
You must use IIS to transform a directory into anASP Application if you want to use a separateglobal.asa. Otherwise, application object willdefault to the root global.asa.
Using the previous global.asa in the
/demo
directory, you would get the result of "MyValue"for
response.write Application("MyVariable")
on
both
/demo1/default.asp
and
/demo1/subdir1/default.asp
-^
If the global.asa in subdir2 is changed to: Application("MyVariable")="NewValue"
, then
/demo1/subdir2/default.asp
would return
"NewValue", but the other pages outside of /demo1/subdir
would still return "MyValue"
Each user session is assigned a unique SessionIDvalue that is passed via cookies.
-^
Different SessionIDs are assigned for differentASP applications.
-^
SessionIDs are unique for a single user/applicationsession, but may or may not change betweensessions based upon the client's cookie support.
Advantages of sessions:^ – Simplify management of user state information (don't
need to mess with cookies)
finite users and known browser support.
Disadvantages of sessions include:^ – Resource intensive for server (overhead to track sessions)– Don't scale well for large number of users (memory
needed for each session)
(thread affinity)