Andre Chekan and Denise Pate

Dynamic content programming with Active Server Pages (ASP).

What is ASP?

·         ASP stands for Active Server Pages

·         ASP is a program that runs inside IIS

·         IIS stands for Internet Information Services

·         IIS comes as a free component with Windows 2000

·         IIS is also a part of the Windows NT 4.0 Option Pack

·         The Option Pack can be downloaded from Microsoft

Microsoft® Active Server Pages (ASP) is the server-side execution environment in Microsoft Internet Information Server (IIS) 3.0 that enables you to run ActiveX™ scripts and ActiveX server components on the server. By combining scripts and components, developers can create dynamic content and powerful Web-based applications easily.

Active Server Pages (ASP) commonly relied on either of the JavaScript or VBScript scripting languages to create dynamic web pages. ASP is a module (the asp.dll file) that you attach to your web server, and it then processes the JavaScript/VBScript on the web server, and turns it into HTML, before sending it into the server, rather than doing it on the browser.

ASP lets us use practically any of the functionality provided by Windows, such as database access, e- mailing, graphics, networking, and system functions, and all from within a typical ASP page. However, ASP's shortcomings are that it is very, very slow performance wise. It is also restricted to using only scripting languages. It can't do all the things that a fully-fledged programming language can. Secondly, the scripting languages, being like "junior" versions of full programming languages, took a lot of shortcuts to make the language smaller. Some of these shortcuts make their programs longer and more complicated than is otherwise necessary. As we're going to see, ASP.NET rectifies a lot of this by making code more structured, easier to understand, and shorter.

ASP premiered with IIS 3.0. ASP lets you embed server-side scripting within Web pages and interweave scripting and straight HTML without using sophisticated programs. The ASP engine runs as an ISAPI extension that processes requests for files with .asp extensions and connects the files' scripts to an ActiveX scripting engine for interpretation. After the scripting engine executes a script, IIS returns the resulting HTML page to the browser.

                IIS comes with Visual Basic Script (VBScript) and JScript (Microsoft's implementation of JavaScript), and you can install other scripting engines, including Perl. Using ASP's built-in Server object, you can write script that instantiates other Active Server components, such as ActiveX Data Objects (ADOs), which provide objects for database access.

Because you include ASP scripts in the same page as static HTML content, ASP provides a simpler programming model than CGI or ISAPI for creating dynamic Web content. ASP's simplicity makes development of dynamic content available to a larger population of Web developers. If you are familiar with VB and HTML, you can easily develop ASP Web pages.

Active Server Pages is a component of Internet Information Server, and thus uses Windows NT Security. ASP files can be easily restricted to just certain users through secure Windows NT authentication, basic Web authentication, or client-side certificates. For additional security, all client-to-server communications can be secured with Secure Sockets Layer (SSL).

Active Server Pages provides native support for both Microsoft JScript and VBScript. ActiveX scripting plug-ins are available for REXX, PERL, and Python.

How easy is it to integrate into the Web system?

ASP is a Web server technology from Microsoft that allows for the creation of dynamic, interactive sessions with the user. An ASP is a Web page that contains HTML and embedded programming code written in VBScript or Jscript. It was introduced with Version 3.0 of Microsoft's Internet Information Server (IIS). When IIS encounters an ASP page requested by the browser, it executes the embedded program. ASPs are Microsoft's alternative to CGI scripts and Java Server Pages (JSPs), which allow Web pages to interact with databases and other programs. Third- party products add ASP capability to non-Microsoft Web servers. The Active Server Page technology is an ISAPI program and ASP documents use an .ASP extension.  When a Web browser requests an ASP page, the Web server generates a page with HTML code and sends it back to the browser. Commonly referred to as "ASP pages" (even though this is redundant), they are similar to CGI scripts but they enable Visual Basic programmers to work with familiar tools. Web sites using ASP pages are said to be in a dynamic environment, because they are database-driven, in terms of retrieving and updating content. That's in contrast to a static environment.

The ASP.NET Web Forms page framework is a scalable common language runtime programming model that can be used on the server to dynamically generate Web pages.  Drumbeat, FrontPage 2000, and NetObjects Fusion are tools that you can use to get started using ASP quickly and easily.

How much programming is needed?

ASP.NET Web Forms pages are text files with an .aspx file name extension. They can be deployed throughout an IIS virtual root directory tree. When a browser client requests .aspx resources, the ASP.NET runtime parses and compiles the target file into a .NET Framework class. This class can then be used to dynamically process incoming requestsAn ASP.NET page can be created simply by taking an existing HTML file and changing its file name extension to .aspx .

If you want to have efficient scripts, consult the programming conventions available in the IIS Resource Kit. These conventions are published online at:  http://www.microsoft.com/workshop/server/asp/aspconv.asp

ASP.NET (also ASP+) is an enhanced version of ASP for the .NET platform. It supports executable programs compiled from C#, C++ and other languages and is not backward compatible with regular ASP code. ASP.NET pages are always compiled rather than interpreted as are ASP pages.

An ASP file normally contains HTML tags, just like an HTML file. However, an ASP file can also contain server scripts, surrounded by the delimiters <% and %>. Server scripts are executed on the server, and can contain any expressions, statements, procedures, or operators valid for the scripting language you prefer to use.

Because the scripts are executed on the server, the browser that displays the ASP file does not need to support scripting at all!

What are the advantages compared to other systems?

Active Server Pages allows you to quickly bring your existing skills and knowledge, data sources, components, and applications to the Web. Other tools create either static HTML or lock you into a non-standard programming model or language. ASP is based upon the leading industry standards, making it easy to build, maintain, and evolve powerful interactive Web applications.

Active Server Pages compared to CGI.

                Active Server Pages provides all of the functionality of CGI applications in an easier-to-use and more robust environment.

                ASP is an easier way for your server to access information in a form not readable by the client (such as an SQL database) and then act as a gateway between the two to produce information that the client can view and use.

                With CGI, the server creates as many processes as the number of client requests received. The more concurrent requests there are, the more concurrent processes created by the server. However, creating a process for every request is time-consuming and requires large amounts of server RAM. In addition, this can restrict the resources available for sharing from the server application itself, slowing down performance and increasing wait times on the Web.

                Active Server Pages runs in the same process as the Web Server, handling client requests faster and more efficiently. It is much easier to develop dynamic content and Web applications with ASP.

Active Server Pages compared to ISAPI applications.

                ISAPI applications require all of the programming and layout to be contained in a .dll file written in C++.  ISAPI applications are thus more difficult to create and maintain. With ASP files, an HTML writer can script an external component and format the output. ASP separates the layout and design from the business logic.

Active Server Pages compared to PERL.

                PERL and other scripting languages are not robust development tools by themselves. Active Server Pages provides a familiar framework and objects for building complex applications that require data from relational databases and legacy sources. ASP supports virtually any scripting language to build these applications. Third parties are currently developing additional scripting engines, such as PERL, which we will announce when they are ready.

                Active Server Pages supports ActiveX server components written in any language, including Java. In addition, ASP includes the Microsoft Windows reference standard Java Virtual Machine.

Active Server Pages compare to Netscape LiveWire.

Netscape LiveWire requires the use of JavaScript, while Active Server Pages supports the use of virtually any scripting language, with native support for VBScript and JScript. ASP supports components written in any language, while LiveWire supports only Java components.  LiveWire applications must be manually compiled after each change, and then the application stopped and restarted. Active Server Pages recognizes when an ASP file changes and automatically recompiles the application at the next request.

Benefits of ASP:         

What can ASP do for you?

Which major web systems/providers are supporting this solution?

Active Server Pages will run on Microsoft Windows NT Server 4.0, Windows NT Workstation 4.0 with Peer Web Services, and Microsoft Windows® 95 with Personal Web Server. Windows NT 3.51 is NOT supported. Windows NT 4.0 on MIPS is also not supported by ASP.

The ASP feature does not require Service Pack 2 for Windows NT 4.0, although it is recommended that all Windows NT systems receive the Service Pack 2 updates. The ASP feature contains a subset of the updates found in Service Pack 2.

Installation of ASP will upgrade IIS version 2.0 to version 3.0. The other IIS 3.0 features—Index Server 1.1, Microsoft NetShow™, FrontPage® 97 Server Extensions, and Crystal Reports—add significant functionality to IIS, but are not required to take advantage of ASP.

                ASP is shipped with VBScript and JScript (Microsoft's implementation of JavaScript). If you want to script in another language, like PERL, REXX, or Python, you will have to install script engines for them.

                Active Server Pages can work with any Web browser. The output of an ASP file is plain HTML, the content of which can be customized for the capabilities of the client.

An Active Server Pages application can integrate with any ODBC-compliant databases including Microsoft SQL Server™, Oracle, Sybase, Informix, and DB2 databases. Any OLE 2 application, such as Lotus Notes or Microsoft Excel, can also be scripted to access or process information. You can also write components to access online data feeds and legacy mainframes.

What are the costs? How much will Active Server Pages cost?

Active Server Pages is a component of IIS 3.0, which is a free, downloadable, and integrated feature of Windows NT Server 4.0.