| Developed by | Microsoft |
|---|---|
| Latest release | 3.0 |
| Type | Web application framework |
| License | Proprietary |
Active Server Pages (ASP) is Microsoft's first server-side script engine for dynamically-generated web pages. It was initially marketed as an add-on to Internet Information Services (IIS) via the Windows NT 4.0 Option Pack, but has been included as a free component of Windows Server since the initial release of Windows 2000 Server.
Programming ASP websites is made possible by various built-in objects. Each object corresponds to a group of frequently-used functions useful for creating dynamic web pages. In ASP 2.0 there are six such built-in objects: Application, ASPError, Request, Response, Server, and Session. Session, for example, is a cookie-based session object that maintains variables from page to page. Web pages with the ".asp" file extension use ASP, although some Web sites disguise their choice of scripting language for security purposes. The ".aspx" extension is not an ASP page, but an ASP.NET page, another server-side scripting language from Microsoft, based on a mixture of traditional ASP, and Microsoft's .NET technology.
Most ASP pages are written in VBScript, but any other Active Scripting engine can be selected instead by using the @Language directive or the <script language="language" runat="server"> syntax. JScript (Microsoft's implementation of ECMAScript) is the other language that is usually available. PerlScript (a derivative of Perl) and others are available as third-party installable Active Scripting engines.
Contents |
[edit] History
Previously called dbWeb, and created by Aspect Software Engineering, ASP was one of the first web application development environments that integrated web application execution directly into the web server, 9 months after the release of NeXT's (now Apple) WebObjects. This was done in order to achieve high performance compared to calling external executable programs or CGI scripts which was the most popular method for writing web applications at the time it was introduced. Today there are additional platforms for web application development that are more common on other operating systems. Both JavaServer Pages and PHP are more commonly found on webservers running non-Microsoft operating systems, with PHP currently being the more common of the two. Also of note is ColdFusion, a popular Java technology running on several platforms including Microsoft servers as well as other platforms.
Prior to Microsoft's release of ASP for IIS 3, programmers relied on IDC and HTX files combined with ODBC drivers to display and manipulate dynamic data and pages running on IIS. The basics of these file formats and structures were used, at least in part, in the implementation of the early versions of ASP.
InstantASP (appears not be available anymore) and Chili!Soft ASP are 3rd party products that run ASP on platforms other than the Microsoft Windows operating systems.
Chili!Soft was purchased by Sun Microsystems and later renamed "Sun ONE Active Server Pages", then later renamed to "Sun Java System Active Server Pages". According to Sun "Sun Java System Active Server Pages has entered its End Of Life". [1]
[edit] Versions
ASP has gone through three major releases:
- ASP version 1.0 (distributed with IIS 3.0) in December 1996
- ASP version 2.0 (distributed with IIS 4.0) in September 1997
- ASP version 3.0 (distributed with IIS 5.0) in November 2000
ASP 3.0 is currently available in IIS 6.0 on Windows Server 2003 and IIS 7.0 on Windows Server 2008.
ASP.NET is often confused as the newest release of ASP, but the technologies are very different. ASP.Net relies on the .Net Framework and is a compiled language, whereas ASP is strictly an interpreted scripting language.
The move from ASP 2.0 to ASP 3.0 was a relatively modest one. One of the most important additions was the Server.Execute methods, as well as the ASPError object.[2] Microsoft's What's New in IIS 5.0 lists some additional changes.
There are solutions to run "Classic ASP" sites as standalone applications, such as ASPexplore, a software package that runs Microsoft Active Server Pages offline.
[edit] Sample usage
Any scripting languages compatible with Microsoft's Active Scripting standard may be used in ASP. The default scripting language (in classic ASP) is VBScript:
-
<html>
-
<body>
-
<% Response.Write "Hello World!" %>
-
</body>
-
</html>
Or in a simpler format
-
<html>
-
<body>
-
<%= "Hello World!" %>
-
</body>
-
</html>
The examples above print "Hello World!" into the body of an HTML document.
Here's how to connect to an Access Database
-
<%
-
Set oConn = Server.CreateObject("ADODB.Connection")
-
oConn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("DB.mdb")
-
Set rsUsers = Server.CreateObject("ADODB.Recordset")
-
rsUsers.Open "SELECT * FROM Users", oConn
-
%>
[edit] References
- ^ "Sun Java System Active Server Pages". Sun Microsystems. Retrieved on 2008-12-31.
- ^ 4 Guys From Rolla's A Look at ASP 3.0
- ^ All About ASP dot net
[edit] External links
| Wikibooks has a book on the topic of |