|Lesson 10||The ASP object model|
|Objective||Use ASP's objects to simplify writing ASP operations.|
ASP Object Model
The interaction between Web clients and servers is complex, with many messages passed between the two.
However, most of the time we only need to work with one part of this complex interaction, for example a cookie sent by a user's browser to our Web server.
One of the goals of ASP, and object-oriented programming in general, is to hide unneeded complexity from the developer.
The designers of ASP have built a model of this complex interaction in the ASP object model. As we work with ASP, we will do so through the five "built-in" objects of ASP:
- Server, and
This SlideShow below describes the five objects of the ASP object model that represent the categories of operations during a browser-server dialog:
- The request object, this is used to receive data from the client's browser and computer, including cookies, files, and HTML forms.
- Response object is used to send data or HTML code from directories or memory locations on the server back to the client browser and computer
- The session object is used to store data and create a work area for each user who visits and navigates around the web site.
- Application object is used to allow more than one user at a time to run a web application, which can be a separate program linked to the Web pages or the Web pages
- The server object, this is used to contain and send information about the web server itself, perform cleanup of user information no longer needed
Five ASP Objects
Ad ASP.NET Core 3
Each of the five objects is an object in the object-oriented programming
sense and can have its own properties and methods.
In later modules, we will cover each of the objects in detail. Compare scripting alternatives for embedding programs in HTML.