Day One B Lesson

 

If you have learned good coding and development skills in Qbasic (www.qbasic.com) and Visaul Basic then you can learn to program on the Internet using VBScript and ASP or Active Server Pages.   When you have completed this unit of study you will have learned e-commerce basic concepts and dynamic web page design.   In addition, you will increase your understanding of programming structures (ex. Repetition, sequence, and decision) and apply database programming skills learned in VB (Data Control object) to connect with Access databases online.

 

Dynamic web design techniques make web sites interactive and involve user response.  Websites that do not involve user input are static and do not change. 

 

 

 

-         web pages don’t change

-         same content : pictures, copy, etc

-         not interactive

o       a story

o       a biography

o       view a catalogue of products

 
 

 


Static

 

 

 

 

 

    

Dynamic

-         Change (ex. Current date displayed)

-         rotating or changing content

-         interactive – user determines what is seen in browser

o       user can select how a story ends

o        View spies with eye colour brown

o       view a catalogue of products and purchase them by adding to your shopping cart

 

 

 
 


 

 

 

 

 

 

 

 

 

 


Intro – Warmup and Brainstorming

 

1.                  Read an e-commerce article from Toronto Star’s @BIZ section of the newspaper that features IT company profiles or find a similar article

2.                  See if the students can distinguish on their own the difference between static and dynamic web design

·        Dynamic – interactive ex. Polls, message boards, chat lines, visa authorization, SSL

·        Get students to list interactive sites that they use.  Ask them to visit sites and look for .cgi and .asp file extensions in the browser address window.

 

Activity – Setting up a server – browser relationship

 

The Internet protocol that governs the server-browser relationship is HTTP (Hypertext Transfer Protocol) or the “request and response protocol”.  Now you will learn to use your PC as a web server using Microsoft’s Personal Web Server.   Insert Windows 98 CD into CD bay and type D:\Add_ons\pws\setup.exe in the RUN window of Windows.  Once the software for PWS is installed click on Add/Remove programs in Control Panel to check Windows Setup.  Next, under Internet Tools make sure that the Personal Web Server is enabled by clicking on check box.

 

Assuming that you have installed the PWS correctly, you can now use the software to test all VBScript/ASP programs.  Check desktop and root directory for the following:

 

 

 

 

 

 

Use Windows Explorer to verify the new directory structure added to the local hard drive at C:\inetpub  :

 

 

 

If you have a systems networked together and you know the IP address of the system with PWS installed then you can run applications from other PC’s (workstations/clients) on your home network or LAN with “files and printer sharing” enabled.   For example, I can request a website on my server system (a desktop PC) from my laptop and the server will accept  my laptop’s request and send back a response to my laptop’s browser.  The exchange is made possible by setting static IP addresses each machine on my home network.  You can check IP address of a system by launching WINIPCFG from the RUN menu in Windows 95/98.

 

The PWS will offer the same support for ASP on your PC as does the IIS (Internet Information Server) software that is installed on ISP servers.  Also, the PWS is an excellent tool for creating an intranet at home or at school.

 

HTTP and FORM methods : GET (a single variable or value in a form)  POST (all variables and values associated with a form)

-  when a PWS receives a request, it returns an HTTP response or resource associated with an IP address  (ex. URL : underasp.html)

 
 

 

 

 


                                          

 

 

 

 

 

                         

Activity : Create your first ASP

 

 

Go to http://kdoginc.hypermart.net site and click on the “VB on the Web” graphic to load the underasp.html web page that serves as a resource for learning ASP.  Next, click on View option in MSIE browser and select Source Code in the submenu.   Cut an paste code from “my first ASP” into a new Notepad document, excluding the <xmp> and </xmp> tags.  Save the Notepad document as “first.asp”, including the quotation marks, to the WWWROOT subdirectory of C:\inetpub.  Next, load your browser and attempt to request the first.asp from the Address bar of browser by typing :  http://localhost/first.asp.  The PWS understands that localhost means that the resource is in wwwroot directory.

 

If the message “Hello, ASP world! Etc” appears in your browser then you have been successful.  If  you want to enable other users to run your application from you PWS then you must give them the IP address of your system.  For example, my PWS is installed on desktop with IP address 192.168.0.1  If I want to use another PC on my home network or LAN to access the underasp.html web page that resides on server then I will type http://192.168.0.1/underasp.html in address window of PC that wants to view the web page.  

 

Activity B

 

Use the browser on your school workstation to “request” a web page from a friend’s PWS.  Remember that you must know your friends IP address to make HTTP or the request-response protocol work.