ASP 101 - Active Server Pages 101 - Web06
The Place ASP Developers Go!

Windows Technology Windows Technology
15 Seconds
ASP 101
ASP Wire
VB Forums
VB Wire
internet.commerce internet.commerce
Partners & Affiliates
ASP 101 is an site
ASP 101 is an site
Internet News
Small Business
Personal Technology

Corporate Info
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash

 Top ASP 101 Stories Top ASP 101 Stories
Migrating to ASP.NET
Getting Scripts to Run on a Schedule
The Top 10 ASP Links @

Utilize browser capabilities
Show All Tips >>
ASP 101 RSS Feed ASP 101 Updates

Using ASP Components

The final piece to the core-ASP puzzle is the use of ASP Components in a web application to encapsulate some or all of the key actions and rules that the application runs under. Heavily-hit sites become much more efficient when some or all of their functionality is coded within components, with ASP used as the adhesive to synchronize the program flow and integrate the components' functionality together.

The phrase ASP Components is a bit of a misnomer, because they're actually COM objects – written not in ASP but in C++, Visual Basic or Java. They are standalone .dll or .exe files that have entries in the Windows registry and make available extra properties and methods to the developer using them. At a low level, practically everything in the Windows world is based on COM (Microsoft's Component Object Model architecture) – even ASP. The intrinsics are also COM objects, stored in asp.dll, and can be used by any programmer who knows the correct way to reference them.

The key to ASP components is that the functionality within them has been pre-compiled and will run faster than if the code was parsed by the ASP Scripting Host. The performance gain is quite noticeable and, of course, they can be reused on many different sites as well.

There are four broad 'categories' of ASP component, as follows:

Presentation Components. The one aspect of an application seen from the moment it starts is its user interface. Presentation components take the trouble out of the graphic side of web application creation and allow a developer to code the invisible back-end part of his site.

Business Components. Developers building applications for the web may use ASP components to encapsulate their business logic rather than put it in an ASP page with the presentation code or in with the data server. The advantage to this approach is that if business logic needs to be updated, you only need to alter it within the component – you can leave both the data access and presentation code alone. A good example here is a component that encapsulates standard rules to validate credit card information for an e-commerce site.

Data Components. Rather than use a great deal of code in a page querying (for example) an SQL database, a developer may choose to use a component to perform the queries and just call the component from the code. Alternatively, he could use a data component to access information from another non-database type of system.

Utility Components. There are plenty of ASP components that perform some function that does not fall neatly into any of the three tiers of the classic application development model. We refer to these as utility components. For example, consider a component that allows us to upload files from one location to another over HTTP. It might even let us store these files within a database for good measure.

ASP components are fairly easy to come by. Some are automatically installed along with PWS and IIS, others are available from the IIS Resource Kit, and many more are available for download free of charge from the web. There is a thriving market in reliable third-party components too – however, these ones cost – or you can of course write your own. We'll look further at ASP components in Chapter 7.

Previous Next

Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback
The Network for Technology Professionals



Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers