210 likes | 391 Views
08 – Web applications: HTML and ActiveX controls. Session Aims & Objectives. Aims To introduce two fundamental ideas involved in web applications Objectives, by end of this week’s sessions, you should be able to: create a static web page, using HTML create an ActiveX control VB application,
E N D
Session Aims & Objectives • Aims • To introduce two fundamental ideas involved in web applications • Objectives,by end of this week’s sessions, you should be able to: • create a static web page, using HTML • create an ActiveX control VB application, • embed this ActiveX control in a web page • install IIS on server • deploy your ActiveX control to your web-site
Example: Multiplication Test • SPECIFICATION • User Requirements • allow children to practice multiplication • Software Requirements • Functional: software should • pick two numbers between 0 and 12 randomly • ask user what the result of multiplying them is • allow user to enter answer • check whether answer is correct • tell user • Non-functionalshould be interesting and colourful, and available on-line
Example: MulTest - Design • User interface design: • Functional design:
Example: MulTest - Test http://mdixon.soc.plym.ac.uk/soft131/multestX.htm
Web Hardware and Software network connection Client Server Browser Application (MS Explorer, Netscape) Web-server Application (MS IIS, Apache)
Request-Response Cycle <html> <head> <title>Mark Dixon's web site</title> </head> <body background="BackGround.JPG"> <font size=+3><center><b><p>Mark Dixon's web site</b></center> <font size=+2> <p>Welcombe to my web server. Please select from the following list: <ul> <li><a href="./Soft131/Index.htm">Soft131: Introduction to programming for Multimedia and Internet applications.</a> </ul> </font> </body> </html> Response Request http://mdixon.soc.plym.ac.uk/ Browser Application (MS Explorer, Netscape) Web-server Application (MS IIS, Apache)
HTML • Hyper-Text Markup Language • text files • edited with notepad • with tags, e.g. • bold: <b>This will be in bold</b> • italic: <i>This will be in italic</i> • work like brackets • start/open <b> • end/close </b> • reference: http://www.willcam.com/cmat/html/crossref.html
HTML page - Structure <html> <head> <title>Test</title> </head> <body> <p> This is a test <b>page</b>. </body> </html> head (info) body(content)
Example: Intro page <html> <head> <title>Mark Dixon's web site</title> </head> <body background="BackGround.JPG"> <font size=+3><center><b><p>Mark Dixon's web site</b></center> <font size=+2> <p>Welcombe to my web server. Please select from the following list: <ul> <li><a href="./Soft131/Index.htm"> Soft131: Introduction to programming for Multimedia and Internet applications.</a> </ul> </font> </body> </html>
HTML - Limitations • static • cannot change • no real interaction (only links)
ActiveX controls • VB can create • stand alone .exe files • ActiveX controls (.ocx files)
ActiveX Controls & HTML • Use <object> tag: <HTML> <HEAD> <TITLE>Multiplication Test</TITLE> </HEAD> <BODY> <p><font size=+2><center><b>Multiplication Test</b></center></font> <p>This page contains an ActiveX control (written in VB) that tests your multiplication skills. <center> <OBJECT ID="ctlMulTest" CLASSID="CLSID:0F8291D9-81A5-4E59-AF18-26F7515D3F82" CODEBASE="MulTestX.CAB#version=1,0,0,0"> </OBJECT> </center> <p>Good luck! </BODY> </HTML>
Obtaining CLID • Run ActiveX control in browser from VB (F5) • View Source • Copy HTML <object … > tag to new html file
Internet Information Services (IIS) Add/RemoveWindowsComponents IIS • IIS / personal web server on Windows CDStart, Settings, Control Panel, Add/Remove Programs
Enabling/Disabling IIS • Start, Settings, Control Panel, Administrative Tools, Internet Services Manager Stop Start
Making pages available on-line • For others to see your pages: • copy/move them to C:\INetPub\wwwroot folder (on server) • enable IIS (on server) • create installation package • deploy to server • give people address of your server, either: • Dynamic IP address: not practical as it changes on server re-boot • Static IP address fixed by ISP (e.g. 141.163.57.220) • register a domain name (e.g. mdixon.soc.plymouth.ac.uk)
Testing you Web-server (IIS) • Use localhost in browser:
Package & Deployment • Create installation program • Setup.Exe: standalone installation • cab files: installation via internet • Start menu, … • Visual Studio Toolsmenu • Package andDeployment item
Deployment to Web-server • Deploy to C:\INetPub\wwwroot folder on server: