|
ColdFusion
The ColdFusion Web Application Framework is based on the directory tree structure.
You set a root directory for the application, and all subdirectories below that
root are considered to be within the scope of the application. You create a
special template, named Application.cfm, which you place in the root directory
of the application. You define an application by giving it a name using the
CFAPPLICATION tag in the Application.cfm template.
The special application-wide page called Application.cfm is the place where you
can set default options, variables and constants as well as define functions
that will be available to all pages in the application.
Application-level and session-level variables are special variables which are
maintained in the ColdFusion server's memory. They are therefore persistent,
so you can pass these values between pages with a minimum of effort.
The ColdFusion client structure is a list of variables which you create and
access with a "client" prefix, e.g. client.name, client.email, etc. Once a
client variable has been set it is available for use within any application
page in your application that is accessed by the client for whom the variable
is set. In addition to storing custom client variables, the Client object
has several standard parameters which include the I.D. used to track the
individual client, the time the I.D. was created, hit count, and when the client’s last visit was.
Application variables are always available to all application pages within
an application. The normal usage is to initialize them once only, when the
first user hits any page of the application, and then any client using any
page can access them from then until the application is shut down. These
variables are used only for application wide information. Client or session
variables must be used for specific clients.
You can integrate your applications with the user authentication and
security provided by your Web server. In addition, the ColdFusion Server
offers a security framework that controls access to applications, pages,
data sources, and users. You set the bounds of a security domain using the
CFAUTHENTICATE tag.
ASP
In general, Microsoft defines an ASP application as any virtual folder on your
web site along with its subfolders. Typically you will but a Global.asa file
in the root directory of each application. The extension .asa stands for
"Active Server Application". This file declares application-level and
session-level variables and objects and you can also define routines or
functions which are executed automatically at the start and end of every
session and the start and end of the application as a whole.
PHP
With PHP, an application is really just a bunch of PHP pages that have been
carefully designed and coded to work together. Sharing variables between pages
has to be done with a query string attached to the URL or hidden form fields
(and cookies).
"Application level" constants should be set in a common PHP page and included
at the top of all templates.
|