Notes
Section
|
Main
Text
|
||||||||||||
Module 1.0
Read VBScript
|
Review
the VBScript Language Guide
and Reference. Go to msdn.microsoft.com/scripting/vbscript/default.htm
with Internet Explorer (IE) 5+. Bookmark the site, visit all its VBScript
links. Review the VBScript User's Guide and
the VBScript Language
Reference. You should already be familiar with
terminology such as data types, operators, conditional statements and
procedures from prior programming experience or classes; otherwise, you may
have trouble with this class. |
||||||||||||
Module
1.1 -Windows 98 -Visual Studio 6 CD. -MSDN Option Pack CD. -Download (overnight). |
Download the Personal Web Server 4.0
(PWS from hereon). If downloading PWS overnight (may take up to four hours), go to www.asp101.com/resources/haneng/042199.asp or http://serverwatch.internet.com/webserver-mspws.html or search www.google.com for "Personal Web Server" and follow the directions. (Note: Microsoft often changes the location of PWS. If you cannot find it with a search, please use the alternative sources on the left-side column or the links below.) PWS may be used to view your ASP scripts (other options below). It is your responsibility to successfully install PWS before the first class day. If on Windows 2000, please see links below.
This
is an alternate, unofficial source for PWS,
www.studiodeluxe.net/pws/index.htm. en/professional/iis/htm/core/iisnapin.htm Download the Personal Web Server 4.0
(PWS from hereon). If downloading PWS overnight (may take up to four hours), go to http://www.microsoft.com/Office/ORK/024/024.htm and follow the directions. (Note: Microsoft often changes the location of PWS. If you cannot find it with a search, please use the alternative sources on the left-side column or the links below.) PWS may be used to view your ASP scripts (other options below). It is your responsibility to successfully install PWS before the first class day. If on Windows 2000, please see links below.
This
is an alternate, unofficial source for PWS,
www.download-safari.net/AllFiles/MicrosoftPersonalWebServer-30.html. en/professional/iis/htm/core/iisnapin.htm
|
||||||||||||
Module 1.2 |
Install
PWS. Please follow the directions on the download web site, the PWS installation wizard or in the course textbook. |
||||||||||||
Module
1.3 |
Start Personal Web
Manager. 1. Double click the PWS icon on the lower right corner of your monitor near the clock. 2. Notice that pressing the STOP button places a red “X” on the PWS icon and creates a START button which once pressed removes the “X”. This starts web services and makes certain pages in the wwwroot folder on your computer accessible to anyone with an Internet connection provided that you’re not behind a firewall, proxy server or other security feature. 3. Hyperlinked in the publishing frame is the name of your PWS. This name was created from your computer’s name. If your computer hadn’t been named, your PWS name will be http://localhost. You may change your PWS name by changing your computer’s name. 4. Select the Advanced icon. These advanced options are used to give directory-wide permissions for any browser to view a page. If the Allow Directory Browsing check box isn’t selected, the browser will display a directory listing denied message. We’ll work with these options later. 5. Selecting the Edit Properties button displays three types of permissions: Read, Execute and Script. Read permission is usually enabled to prevent a read access forbidden error message. Execute permission is typically disabled, because it allows any application in a directory including script engines to run. A directory with ASP scripts should be Script enabled, because unlike Execute you may cautiously limit the applications that run in the directory. We’ll work with these advanced options further in the first assignment. |
||||||||||||
Module 1.4 |
Create a Virtual Directory. An alias for a file path on a server is termed a virtual directory, and it allows for the construction of a website independent of hard drive file structure. The advantages of a virtual directory are the separation of site layout from file path structure and the ability to shorten long URLs with the use of an alias, for example, http://acc/web/ host/class/part/one.asp may be replaced with the /part alias requiring the user to only type http://acc/part/one.aps. 1. Create a new folder named Part1 in the wwwroot folder created by PWS. 2. Start PWS > click Advanced > select <Home> > click Add > select the Part1 folder using Browse > type Part1 for the Alias > click OK keeping the default checkboxes (Read and Scripts should be toggled). 3. Open the Part1 folder in Windows Explorer > right click > New > Text Document > name it HelloEx1.asp > Yes (make certain the file has the .asp extension rather than the .txt extension). Copy and paste the following text into HelloEx1.asp:
4. Save changes > type http://localhost/Part1/HelloEx1.asp into Internet Explorer where localhost is the name of your PWS. Please refer to Module section 1.3.3. 5. Notice:
|
||||||||||||
Module
1.5
|
What is ASP? A limitation of (enter word into textbox for definition) HTML is that it’s static. Developers need to employ client-side scripting (where the client is the web browser) like JavaScript, VBScripting Edition or JScript (Microsoft’s implementation of JavaScript) to make web pages dynamic (see also, Dynamic HTML). One disadvantage to client-side scripting is that it cannot carry information from one page to another. Server-side scripting like CGI, ISAPI, IDC (2) and ASP (2) addresses this restriction. ASP, however, is an improvement over CGI, ISAPI, IDC combining their advantages without their limitations. Table 1.5.1. ASP combines the database access and programming ease of IDC, the robust operating system access of ISAPI or CGI and ISAPI’s speed. Third party developers may extend ASP with custom components. ASP is easier, faster to learn and more profuse than JSP. A newer and more powerful version of ASP called ASP+ (also called ASP.Net) will be available soon.
Because ASP pages may contain or create HTML, VBScript or JavaScript, it becomes difficult to define. As the next module will demonstrate, ASP can be best defined by where it runs: on the server. |
||||||||||||
Module
1.6 |
How Does ASP Work? (1) Visiting web pages or clicking hyperlinks produce a HyperText Transfer Protocol (HTTP, see also SOAP) request by the browser. (2) As a result, the web server (please review link carefully; alternately, see server) sends the requested web pages with ASP script to the asp.dll which executes a text file called the global.asa containing information about the ASP application. (3) Then include files which support the ASP page are tied together, and (4) the ASP script moves to the script engine which creates any objects that may have been requested. (5) Next, the script engine interprets the script and send its instructions back to the asp.dll which (6) converts the information into HTML and sends it back to the browser. Please refer to the index or the table of contents in the course textbook for more descriptions and diagrams on this topic. |
||||||||||||
Module 1.7 |
What Are Some ASP Web
Servers and Editors? If you do not have Microsoft’s Internet Information Server (IIS) which supports ASP, you may install ChiliASP or iASP which allows you to run ASP on Netscape or Unix web servers. ASP and HTML may be edited in any text editor like NotePad (Start > Programs > Accessories > NotePad). Visual Interdev contains a set of convenient tools and utilites and is Microsoft’s preferred ASP editor. Others include FrontPage, Allaire’s Homesite, Macromedia’s UltraDev and the free (send a postcard) Edit Pad which is downloadable from www.tucows.com. (Do a Quick Search for the words Edit Pad.) |
||||||||||||
Module
1.8 Try
out
|
Exercise 1. 1.
Visit
all the links shown on this lesson, and thoroughly review the VBScript
Language Reference (VBSLR). 2.
Read
the first two chapters of the course textbook. 3. Take notes on this week’s materials and paraphrase it in your own words. Discuss the correct answers to this week’s quiz (shown below) on the Week 1 Student Discussion Board. 4. Review your HTML by visiting all the links on this page. 5. Alternate between Response.Write and its shortcut to create a table with four cells. Please refer to Module section 1.4.5.3. Save this as TableEx1.asp in your Part1 folder. (There are many ways to do this assignment, and what's important is that you populate or create a table using ASP.) 6. Use VBSLR to learn more about VBScript functions like those used in the HelloEx1.asp exercise. See Module 1.0. Review the IsDate, IsNull, IsNumeric, MsgBox, Trim and UCase fuctions. |
||||||||||||
Module 1.9 |
Quiz 1.
|