Page

11.1.0- The Server Object

Created by Brendan Doss.
Last Updated by Jim Minatel.  

PublicCategorized as 11. Active Server Pages Components.

Not yet tagged
<< 11.0.0- Active Server Pages ComponentsChapter1111.1.1- Creating an Instance of a Component >>

The Server Object

The tools that Microsoft provides with ASP are organized into objects, as we covered in Chapter 6. To review; the software designer (in this case, Microsoft) creates an object which can hold and/or provide information (properties) and can carry out certain tasks (methods). ASP has seven objects: the Server, Application, Request, Response, Session, Error, and ObjectContext objects.

The Server object allows you to create components, which are pre-packaged software objects that Microsoft and others have created to provide commonly needed functions. As you move further into ASP, you will probably create your own components as well – this is introduced in chapter 16 . Microsoft has provided about a dozen components that contain the ability to add powerful features to your site. We will look at three of these components in this chapter.

 

The rest of these Microsoft components are covered in the ASP 3 Programmer's Reference (Wrox Press – ISBN 1861003234). (This book is no longer available from Wrox but you might still find it at a store that sells used books.)

 

Many students ask why some capabilities are encapsulated in components, whereas others (like reading information from a querystring) are not. MS put a reflection of the information defined in the HTTP standards into the intrinsic ASP objects. These are the most basic and frequently used functions, such as reading from a request and writing to the nascent page. Then, the MS designers built additional goal-oriented features into components. With this split, the core functions are always loaded and quickly available, whereas less-universal tasks are loaded in memory only as needed. Furthermore, Microsoft tries to focus on developing the core of each software product and then allows other companies to build accessories to enhance that core. In ASP, this means that Microsoft includes a few rudimentary components, but encourages the development of additional components from third party vendors.

 

To summarize, the more basic and closely matched a function is to the HTTP standards, the more likely it is contained in one of the seven intrinsic ASP objects. The more specialized a function, the more likely it is to be available in a component; either from Microsoft, a third party, or custom developed from your own programming team.

<< 11.0.0- Active Server Pages ComponentsChapter1111.1.1- Creating an Instance of a Component >>

Copyright © 2003 by Wiley Publishing, Inc.

Powered by Near-TimeTerms of Services | Privacy Policy | Security Policy |