Data Bases
Custom Term Papers
Free Term Papers
Free Research Papers
Free Essays
Free Book Reports
Plagiarism?
Links
Top 100 Term Paper Sites
Top 25 Essay Sites
Top 50 Essay Sites
Search 97,000 Papers @ DirectEssays.com
Search 101,000 Papers @ ExampleEssays.com
Search 90,000 Papers @ MegaEssays.com
Free Essays
Term Paper Sites
Chuck III's Free Essays
Free College Essays
TermPaperSites.com
My Term Papers
Get Free Essays
Essay World
Planet Papers
Search Lots of Essays
Back to Subjects
-
Computers
ASP
ASP Beginning programmers or web developers. ASP or Active Server Pages is a powerful server-based technology from Microsoft, designed to create dynamic and interactive HTML pages for World Wide Web sites. ASP is used to create dynamic or active web pages. Dynamic web pages may change depending on who visits the page, when they visit, or how they got there. Whereas a static web page will always be the same no matter what. The following report will explain what ASP is, discuss how ASP works, outline why ASP should be used ASP, and provide a brief overview of ASP syntax. This topic was chosen to educate myself about where ASP came from and why it is used and to pass what I have learned on to any one willing to read this report. ASP was “born” in November 1996 when Microsoft announced its design of an Active Platform. It consists of two parts, the Active Desktop and the Active Server. The Active Desktop refers to the client side: where HTML files are displayed on a web browser. The Active Server refers to the server-side component. This consists of pages that can be interpreted by the server, hence the term Active Server Pages. An ASP file contains any combination of text, HTML tags, and script commands. A script command instructs a computer to do something, such as assign a value to a variable. The script commands in an ASP file are compiled on the server then the output is sent to the client computer for display. The actual ASP code or script commands in an ASP file are not sent to the client computer. The code is first executed on the server, creating HTML. This HTML then replaces the ASP code in the ASP file and then sent to the client to be displayed. ASP code can be any programming language that supports the ActiveX interface including JScript, VBScript, and PerlScript. As people know Microsoft has a tendency to make people use their products. But in the case of ASP people don’t have to. ASP has evolved into an “open technology framework” meaning it is no necessary to use Microsoft’s products to create code in it, although that’s the best way to go. You don’t have to use VBScript, which is from Microsoft, but PerkScript or JScript can be use, which aren’t from Microsoft. Plane HTML files are interpreted on the client side. With ASP, the server can also interpret files. Interpreting to a server means that, before displaying a file in a user’s browser, the server will complete some initial steps: · It will look at the file’s extension. If the file has an extension such as .html or .htm, the server sends the file to the browser. If the file has an extension of .asp, the server will open the file and look for tags that mark ASP code. ASP code is contained inside special tags: *% before the code begins and %* after the code ends. · The server runs the code inside these brackets and replaces it with HTML code. This HTML code is generated based on information about the user’s setup or other conditions on the client side. · The resulting page, which contains some of the file’s original HTML and some HTML generated by ASP, is sent to the browser that requested it. On the next page is a diagram showing how ASP works. The report refers to this diagram by number in the following example. (1) A person sits down at their desktop computer and types in a URL and hits enter. The Internet connects to the requested server. (2) The server locates the request HTML file (3) The server sends the page described in the HTML file to the browser. The page contains a form to be filled out by the user. (4) The user fills out the form and clicks on the submit button. The information entered is sent back to the server to be used with the ASP program whose name was embedded in the HTML file. (5) The serve runs the requested ASP file using the information that was filled out in the form. (6) If the ASP file requires data from a database, it connects to it and retrieves the required data. (7) The ASP generates a page of HTML based on the entered information. (8) The server sends the resulting page back to the users browser. (http://ahref.com/guides/technology/199806/0601buzprintable.html) In this example there were two pages being used. That’s true in many cases, but in other cases more than two pages can be used. An ASP file can also be used to reroute the browser. Here is an example. Many sites on the Internet require that a username and password be entered before entering them. ASP can be used to reroute the browser depending on what the user enters for a username and password. When the user clicks enter, the username and password entered are sent to the ASP file. The ASP file would access a database with a list of usernames and passwords. Then it would find the matching username. If there is not a matching username, the ASP would reroute the browser back to the logon page. If there is a username in the database, it would validate the password for that username. If that is incorrect, the logon page will be displayed. If it is the correct password, the browser would be rerouted to the correct page. Although the user only saw two different pages, there were really three being used; the third one is not displayed. About five years ago, before ASP, a developer had to create his or her own scripting using PERL. If you didn’t know PERL you were left with a static, non-interactive Web page. What ASP did for Web sites is comparable to aircrafts changing from propellers to jet engines. The performance increase was phenomenal: it gets the job done more efficiently and faster, but there was a slight catch. Flying a jet was not quite as easy as a prop, and so it goes with changing from static HTML to ASP. First, you must learn to fly! On the other hand, learning ASP is simply not as hard as is PERL. The following is a simple example. Using a simple PERL script to display the current system time and date requires the following five lines of code. print “Content-type: text/plain”, “nn”; Using ASP you can display the same information with only one line of code. The point is simple: ASP is much shorter and fast. All of the goodies that make ASP go are built in; all you have to do is supply the proper code to accomplish the task at hand. ASP also makes it easy to do simple and even complex calculations and queries. Best of all it is not browser dependent making it compatible with any client computer. To use ASP successfully, you need to learn the syntax, or rules, by which it operates. HTML tags are differentiated from text by delimiters. A delimiter is a character or sequence of characters that marks the beginning or end of a unit. In the case of HTML, these delimiters are the les than (*) and greater than (*) symbols. ASP script commands are also differentiated from both text and HTML tags by delimiters. ASP uses the delimiters *% and %* to enclose script commands. You can either use single expressions or statements to write ASP code. Single expressions usually consist of one or two words using only a single line of code that executes a certain operation. For example, the following line produces text ending with the current server time. This page was last refreshed at *%=Now%* A statement is a complete unit that expresses one kind of action, declaration, or definition. Statements usually require three or more line of code. The conditional If…Then…Else statement that appears below is a common VBScript statement. If Time *=#12:00:00 AM# And Time * #12:00:00 PM# Then If this script is run before 12:00 noon the greeting would be “Good Morning!” If this script is run on or after 12:00 noon greeting would be “Hello!” ASP is a server-based technology to create dynamic web pages. Dynamic web pages change depending on outside influences while HTML web pages never change. An ASP file contains any combination of text, HTML tags, and script commands. ASP code can be any programming language that supports the ActiveX interface including JScript, VBScript, and PerlScript. Plane HTML files are interpreted on the client side. With ASP, the server can also interpret files. Interpreting to a server means that before displaying a file in a user’s browser, the server will complete three initial steps. Search for ASP code, run that code, and produces the requested page. The ASP code is never set to the client computer but is first run on the server. The output of the ASP code is sent to the client computer. ASP is much shorter and fast. All of the goodies that make ASP go are built in; all you have to do is supply the proper code to accomplish the task at hand. Code to display the system date in time would require 5 lines of code without using ASP. When using ASP that same function can be done using one line of code. ASP uses the delimiters *% and %* to enclose script commands. Any text between these delimiters must be valid ASP code or the web page will not be displayed correctly. You can either use single expressions or statements to write ASP code. Single expressions only are one line of code and statements are multiple lines of code. Bibliography: Cooke, Kevin. “Inroduction to Active Server Pages” September 1998 http://hotwired.lycos.com/webmonkey/98/39/index2a.html, September 18, 2001 Warmkessel, Buz. “Inroduction to Active Server Pages” June 1998 http://www.ahref.com/guides/technology/199806/0601buz.html, September 18, 2001 Unknown. “Writing ASP Scripts” Unknown http://www.asp-help.com/getstarted/ms/guide/asgwri.asp, September 18, 2001 Unknown. “An Introduction to Active Server Pages” Unknown http://www.tcp-ip.com/ResourceIndex/Tutorials/Tutorials.asp?cat=Introduction+To+ASP, September 18, 2001
Word Count: 1682
Copyright © 2005
College Term Papers
, INC All Rights Reserved.