Cover image for Developing ASP components
Title:
Developing ASP components
Personal Author:
Edition:
2nd ed.
Publication Information:
Beijing, Chi. : O'Reilly, 2001
ISBN:
9781565927506

Available:*

Library
Item Barcode
Call Number
Material Type
Item Category 1
Status
Searching...
30000005180645 TK5105.8885 A26 P69 2001 Open Access Book Book
Searching...

On Order

Summary

Summary

Microsoft's Active Server Pages (ASP) technology has become wildly popular with web developers. However, the techniques for developing custom ASP components, not to mention the inevitable snags and pitfalls, are not well documented. What's more, the successful ASP component developer must be a jack-of-all-trades, with some knowledge of COM and COM+, threading models, and the ASP object model, as well as a mastery of one or more language tools and development environments.That's where Developing ASP Components, 2nd Edition, comes in. Its first section explores the topics everyone needs to know to develop effective ASP components: Configuring the ASP development environment. ASP components and the Component Object Model (COM). ASP components and threading models. ASP components and Component Services, which provide a variety of services to ASP components. The objects, properties, methods, and events available in the ASP object model. ASP components are language independent, and developers increasingly tend to use more than a single language tool. Thus the remainder of the book focuses on ASP component development using one of two major development tools--Microsoft Visual Basic and Microsoft Visual C++ (with the ActiveX Template Library)--along with a number of other languages, such as Perl and Delphi. Each section focuses on the issues that concern the ASP component developer using that particular development environment. These issues include: Accessing ASP's intrinsic objects. Accessing data using ADO. Creating n-tier web applications with VB. Handling persistence using MFC along with Visual C++/ATL. It's this strong focus on two major development environments, along with a thorough grounding in essential ASP topics, that makes Developing ASP Components the definitive resource for the ASP application and component developer.


Author Notes

Shelley Powers is an independent contractor, currently living in St. Louis, who specializes in technology architecture and software development. She's authored several computer books, including Developing ASP Components, Unix Power Tools 3rd edition, Essential Blogging, and Practical RDF. In addition, Shelley has also written several articles related primarily to web technology, many for O'Reilly. Shelley's web site network is at http://burningbird.net , and her weblog is Burningbird, at http://weblog.burningbird.net .


Table of Contents

Prefacep. xi
1. Writing ASP Componentsp. 1
The Role ASP Components Playp. 2
Why Use ASP Components?p. 3
COM+ Services and ASP Componentsp. 5
Accessing Data with ASP Componentsp. 8
Windows 2000 Technologies Accessible from ASP Componentsp. 10
A Rose by Any Other Name: Programming Language Choicep. 11
What About ASP.NET?p. 13
2. Setting Up the ASP Development Environmentp. 14
Configuring the IIS Environmentp. 15
Remote Administration of IISp. 27
Using ADSI to Administer IIS Programmaticallyp. 29
IIS Admin Object Overviewp. 46
The IIS Base Admin Objectsp. 59
3. ASP Components and COMp. 69
Overview of COM for ASP Component Developersp. 70
How COM Is Implementedp. 76
Notable COM Interfacesp. 80
COM Datatypesp. 87
4. ASP Components, Threads, and Contextsp. 91
What Are Threads?p. 92
Threads and Apartmentsp. 95
The Threading Modelsp. 96
What Are COM+ Contexts?p. 110
5. COM+ Services and ASP Components and Applicationsp. 114
Developing Component-Based Systemsp. 114
The COM+ Interfacesp. 116
Porting MTS Packages to COM+ Applicationsp. 124
Activating COM+ Applicationsp. 125
COM+ Servicesp. 127
6. ASP Interaction: Scripting and ASP Componentsp. 136
Scripting Language Support Within ASPp. 136
Instantiating Componentsp. 139
COM+ Datatypes and Script/Component Interactionp. 145
Passing Arrays as Parametersp. 159
Error Handling Between Component and Scriptp. 174
7. Creating a Simple Visual Basic ASP Componentp. 180
Creating an In-Process or Out-Of-Process Componentp. 181
Component Instancingp. 182
Component Execution and Threadsp. 184
Creating an ASP Projectp. 187
Creating Component Methodsp. 188
Generating, Registering, Installing, and Testing the Componentp. 190
Adding Support for COM+ Servicesp. 191
Converting MTS Components for Use with COM+p. 201
Accessing the ASP Built-in Objectsp. 202
Error Handlingp. 220
Debuggingp. 222
Performance Issuesp. 222
8. Creating ASP/ADO Componentsp. 225
Accessing ADO from a VB Componentp. 226
Creating a Simple ADO Componentp. 227
The ADO Modelp. 233
File and Directory Access with ADO Streams and the Record Objectp. 256
Persisting Datap. 262
9. Creating an ASP Middle Tier with ADOp. 266
How Separate Should the Layers Be?p. 267
Creating ADO Data Wrappersp. 268
Defining Business Objectsp. 281
Other Data Integrity Issuesp. 295
10. Server-Side XML Through VB ASP Componentsp. 298
XML Basicsp. 298
Formatting XMLp. 302
Working with XML in ASP Applicationsp. 307
XML and ADO: Saving Recordsets as XMLp. 315
11. Take a Message: Accessing CDO from ASP Componentsp. 321
A Brief Overview of CDOp. 322
The CDO Object Modelp. 322
Send This URL to a Friendp. 324
Working with the Message Bodyp. 328
Retrieving and Reading Messagesp. 338
12. Working with Active Directory from ASP Applicationsp. 344
A Brief Overview of Active Directory in Windows 2000p. 345
Setting Up an Isolated Active Directory Environmentp. 345
A Refresher on ADSIp. 347
Binding to Active Directory Objectsp. 349
Using the Active Directory Services Viewerp. 355
Manipulating Containersp. 357
Searching Active Directory with ADOp. 362
ASP Example: Add and Manage Users Through the Webp. 366
13. Working with MSMQ Componentsp. 380
MSMQ/ASP Basicsp. 380
Working with Queuesp. 382
Working with MSMQ Messagesp. 389
Using Transactionsp. 394
Journalingp. 407
A Brief Word on Message Securityp. 412
14. Creating C++ ASP Componentsp. 414
ATL or MFCp. 415
Using ATL AppWizard to Generate the Basic ASP Component Projectp. 416
Adding an ATL Objectp. 421
Code Changes Based on Adding a New Objectp. 426
Adding Methods to the Interfacep. 427
Adding Support for COM+ Servicesp. 432
Converting MTS Components for Use with COM+p. 440
Accessing the ASP Built-in Objectsp. 444
Error Handlingp. 463
15. Adding Data Access to C++ Components with ADOp. 468
ADO Access in Visual C++p. 468
The ADO Object Modelp. 469
The Connection Objectp. 470
The Recordset Objectp. 479
The IADORecordBinding Interfacep. 486
The Command Objectp. 490
Stream and Record Objectsp. 497
16. The CDO Interfaces from C++ Componentsp. 506
Accessing CDO Interfaces in C++p. 506
Creating and Sending a Messagep. 509
Retrieving and Reading Messagesp. 521
17. Accessing Active Directory from C++ Componentsp. 528
Binding to Active Directory Objectsp. 529
ADSI Helper Functionsp. 536
Filtering Collectionsp. 538
Creating and Removing Active Directory Objects Using ADSIp. 540
Searching Active Directory with IDirectorySearchp. 544
18. Accessing MSMQ from C++ ASP Componentsp. 550
Adding Support for MSMQ to the C++ Projectp. 550
Working with Queuesp. 553
Searching for a Specific Queuep. 560
Working with MSMQ Messagesp. 568
Using Transactionsp. 574
19. Persistence with ASP Components Using ATL and MFCp. 581
Combining MFC and ATLp. 581
File Access from ASP Componentsp. 584
Creating a Serializable Classp. 588
Persistence Through Object Serializationp. 591
20. ASP Components Created with Javap. 596
Creating Java Componentsp. 597
Invoking a COM Object in a Java Componentp. 606
Working with COM+ Servicesp. 611
The ASP Built-in Object and Helper Interfacesp. 619
Accessing ADO from Java Componentsp. 633
21. Creating ASP Components with Delphip. 642
Using the COM Wizards to Create ASP Componentsp. 642
Manually Adding Support for COM+/ASPp. 653
Working with the ASP Objectsp. 660
Working with ADOp. 668
Working with Windows 2000 Functionality: CDOp. 672
22. Perl-Based Components Using ActiveState's PDKp. 677
Setting Up PDKp. 678
Building a Basic Perl Componentp. 679
Accessing the ASP Built-in Objectsp. 689
Working with Datap. 709
Working with the Win2K Environmentp. 716
23. Creating Scripting Language Componentsp. 719
The Windows Script Components Architecturep. 719
Elements of a WSC Filep. 722
Script Components and ADOp. 733
The WSC Wizardp. 736
Creating Script Components with JScriptp. 741
Accessing Windows 2000 Functionalityp. 744
A. ASP Built-in Object Quick Referencep. 751
B. The Weaver Databasep. 776
Indexp. 791