As the World Wide Web continues to evolve, the need for dynamic and current content on Web pages is becoming more and more a necessity.
ASP is a scripting language Microsoft developed for you and other Web authors, designers and developers, enabling you to create dynamic Web pages easily. The idea is to insert the ASP code between your HTML document and have the results of that code inserted as text in your HTML document just before the Web server releases the page to your browser.
Before we go on, let's take a few steps back first. Some of you may not know what HTML is, so for those of you who donít, HTML (Hypertext Markup Language) is the language Web pages are written with. It's just a plain old text file that you can create using a text editor like Notepad. This text file will have certain tags that your Web browser (Internet Explorer or Netscape) can understand. So really, it's just like typing anything on the plain text file, inserting a few tags like <b> to make text bold </b>, or <u> to underline </u>. Add the standard HTML tags and boom! You have an HTML document or a Web page, like this:
<html> <head> <title>My First HTML Page</title> </head> <body> Hello World! </body> </html>
Now back to the topic. How does ASP relate to HTML. Well, with ASP, you can insert code that does something meaningful, (like get today's horoscope from an external source) in between your HTML document to produce dynamic content.
For example, if you want to display the current time, you can simply insert <%=time()%> in the place where you want the time to appear on your page. When you preview your Web page with the ASP code, your page will actually display the results of that code - which is meant to display the current time - like "10:00 AM".
<html> <head> <title>My First HTML Page</title> </head> <body> Hello World! The time is: <%=time%> </body> </html>
Ok, so maybe displaying the time is not really beneficial for some people, so what else can ASP do for you? The answer to that question is: "Much, much more".
ASP can do complex operations, like retrieving information from a database, and then displaying it in a readable form; or calculating values based on cryptic algorithms.
I would like to get into more detail, but it would take too long. Take this scenario as an example: Let's say you're running a Web-based newspaper that needs new pages everyday. You as the newspaper's Webmaster have two options. You either have to a) make new pages everyday by typing in the stories given to you by the reporters; or b) use some kind of automated tool that would let the reporters or someone else type the articles and have HTML pages be automatically created from their input. I know what I would do, and prefer, if I were Webmaster for that newspaper. One good example of a newspaper using ASP to provide dynamic content is the Manila Bulletin.
Another scenario is an online store. If you will set up a store on the Web, you have to make sure that you are displaying the correct numbers from inventory. If you start out with 100 hard-to-find widgets and someone buys those 100 widgets, then you need to make it unavailable from your store. Without automation, you will have to edit your HTML page to remove those widgets from your "for sale" list. If it happens once a day, then it could be tolerable. But if you have a real popular store, and a real popular inventory (which is typically what you would aim for), then you really have to change or update your site every time a sale is made. An example of a popular on-line store using ASP is http://www.barnesandnoble.com.
Next time you surf the Web, you may want to look at the Web pages more carefully. You will notice that most of the major sites out there are using some kind of scripting or automation on their Web Sites. ASP provides one of the simplest means of automating your Web site.
Take a look at the URL of the Web site you are browsing. If you see the ".asp" at the end or in the middle of the address, then you'd know that it's an ASP page. This tells you that the content provider is serious about giving you accurate and up-to-date information (or it could also mean that the Webmasters of that site like to do things the easy way).
For more information and to learn more about ASP, visit this link from the Microsoft site http://msdn.microsoft.com/workshop/server/asp/ASPover.asp
John is a full time Infomation Technology Consultant with about 4 years of experienc in the IT industry. He is currently on contract for a Fortune 500 company, where he creates Active Server Pages for an Internet-based Web application. He lives in Mount Prospect, Illinois. John was born and raised in Manila and migrated to the United States about six years ago where he completed his bachelors degree in computer information systems at the DeVry Institute of Technology. He is certified by Microsoft as a Systems Engineer (MCSE), and is now pursuing certification as a Systems Developer (MCSD). He evaluates the different ways to maximize the full potential of the Internet. One of his Internet ventures is palayok.com - a search engine for filipino related websites. You can contact John at email@example.com.
WIRED! Philippines is a monthly online magazine published and hosted by KabayanCentral.com
Copyright 1998, 1999 KabayanCentral.com. All rights reserved.