Active Server Pages are a language-independent framework designed by Microsoft for efficient coding of server-side scripts that are designed to be executed by a Web server in response to a user's request for a URL. ASP scripts are similar to other server-side scripting you may be familiar with that are used on other platforms such as Perl, Python, and so on. Active Server Pages are developed and maintained by Microsoft. Although the company has published a lot of information about ASP and associated technologies, ASP has not been approved by any standards body. There are three main reasons to use ASP:
The global.asa file allows you to add code that will automatically execute at the start and end of a user session and also at the start and end of the "application." As a developer, you can use the code in the global.asa file to initialize variables at the start of a user session or create application-wide database connections, and so forth. Yes. If you're using ASP on a server with the NT 4.0 Option Pack installed and Microsoft SMTP Service (from the Option Pack) running then you can use the CDONTS component to easily send Internet e-mail from you ASP script. This component is available free of charge. There are also a number of custom components available from third-party sources that provide more configuration options and do not require Microsoft's SMTP service or the Option Pack. The most popular of these components is ASPMail. For more information on this product, check out: www.serverobjects.com/products.htm#Aspmail No, you don't have to write ASP scripts in VBScript if you don't want to. Active Server Pages are actually an ActiveX Scripting Host and ,therefore, can use any compatible ActiveX Scripting Engine. Scripting engines for VBScript and JScript (Microsoft's JavaScript variant) come pre-configured with ASP when installed as part of the Internet Information Server. You also use any of a number of scripting engines available from third parties. For example, you can get more information about PerlScript, a Perl-based scripting engine, from the ActiveState site at www.activestate.com/ActivePerl/docs/perlscript.html . Yes, ASP makes accessing databases very easy. Although developers can use virtually any database library from within their scripts, ASP is really geared towards database access via Microsoft's ActiveX Data Objects (ADO). ADO is fairly lightweight and allows easy access to any ODBC or OLEDB compliant data source including Microsoft Access (Jet), Microsoft SQL Server, and Oracle databases. In addition, ADO has built-in connection pooling. No, Active Server Pages scripts are standard text files that can be edited with any text editor. That said, there a number of products that make working with ASP scripts easier. Microsoft's Visual InterDev 6.0 (http://msdn.microsoft.com/vinterdev/) development environment (sold separately and also as part of the Visual Studio development suite) features a color-coding editor, database wizards, and project management features that make developing sites much easier. Macromedia's Drumbeat 2000 (www.drumbeat.com) is a tool that focuses on making it easier to build visual database-driven sites with a minimum of programming. No, any development environment that can produce OLE Automation Servers can make components that are compatible with Active Server Pages. Popular authoring tools for components include Microsoft C++ (http://msdn.microsoft.com/visualc), Microsoft Visual Basic (http://msdn.microsoft.com/vbasic/), and Inprise Delphi (www.inprise.com/delphi/). There are special requirements when writing components for use with ASP, but component developers should be mindful of threading and other similar issues that come up when programming for multi-user environments like the Web. Active Server Pages doesn't require cookies unless your code uses the framework's built-in session management functionality. ASP uses cookies to maintain state between page requests and determine which set of session information is for which user. If you'd really like to avoid cookies you can either turn off the session functionality or install Microsoft's beta "Cookie Munger" filter (IIS only). For more information about the "Cookie Munger" filter take a look at: http://msdn.microsoft.com/workshop/server/toolbox/cookie.asp Although strictly speaking, knowing HTML is not required, as a practical matter you will find knowing it to be a necessity. The vast majority of server-side scripting, ASP included, involves doing some kind of server-based processing and then returning a result to the user in the form of an HTML page. As part of your development process, you'll invariably run into situations where your ASP script is running without errors but the HTML it generates does not display correctly in the user's browser. When it comes to debugging these types of problems you'll find that having a good handle on HTML to be invaluable. If your Web server is properly configured, then users will only see the HTML output your ASP script generates, not the ASP code itself. The easiest way to debug ASP scripts is to use Microsoft's Script Debugger. You can install this tool as part of the NT Option Pack or download it for free from Microsoft's Web site (http://msdn.microsoft.com/scripting/debugger/). At a high level the two technologies are very similar and, as a result, you can view them as competitors. ColdFusion is more Web-server independent, while Active Server Pages work best with Microsoft's IIS. |
Feldman, Boris, asp-zone.com |