Active X Microsoft’s Answer to Dynamic Content Reference: Using Active X by Brian Farrar QUE
Static Content Client www Internet Server Browser asks for a page 2- Server returns page and Browser displays
CGIs Client www Internet Server CGI program Browser invokes CGI program 2- Server runs CGI program to create page 3- Server returns result of CGI to browser to display
Does CGI make page dynamic? Yes result of whatever CGI produced created on the fly No page itself doesn’t do anything browser renders it and is finished looks like any other page
More Dynamic Activity Needed at Client Helper apps launched by browser as external program based on MIME type of file. Examples –Adobe acrobat files –Quicktime video –RealTime audio
Helper App Problems User needs to know what to download –not as much of a problem now: automatic –more software to install on client –author must figure out how to distribute code –version control maintenance problems –still widely used in past
Versions of HTML HTML 1.0 CGIs and HTML 2.0 HTML 3.0 …. STILL NO DYNAMIC CONTENT MANAGED BY THE CLIENT
Other Ways to Make Dynamic Client Pull after a delay client asks for another page to display uses tag Server Push Basically a cgi –Sends a file –delays –sends another file
Forms and CGIs Forms uses standard input controls to get user input Browser invokes the CGI indicated on the page with data from the from Server can respond to users differently! Use GET or POST methods
SUN adds dynamic content Java applets Java Java Script Hot Java Browser (not a hot item)
Java A language designed by SUN to be executed by an interpreter INSIDE THE BROWSER! Client downloads a program and executes it rather than displaying a page Any browser which adopts java can run the program - multi-platform! All major browsers quickly adopted it.
What else does Java add? Authors distribute programs over web User clicks and gets latest program rather than a static page Always the latest version Browser can be user interface for all programs Authors control distribution / authenticate
Java Applets java programs which run in the browser security concerns addressed in browser by crippling access to disk etc. Java Applications like applets run OUTSIDE the browser standalone programs compilable like c++ applications security not an issue Applets vs Applications
Java Script Whole new beast Much less powerful Allows for –user controls on form –handlers for events Dynamically and Locally control browser LOGIC in html Procedures actually at top of html source
VB Script A Microsoft thing Same concept as Java Script Only in Internet Explorer (3.0 +) NETSCAPE JavaScript Internet Explorer VBScript
Another approach Not as general as a new language Easier to display MIME types Netscape has an API to let program actually be absorbed into the browser Called PLUG-INS
A look back! Programming Development OOP/OOD RAD Tools (graphical) interprogram/process communication
Interprocess/program Communication Unix –sockets –pipes Microsoft adds –DDE –Drag n Drop OLE embedded or linked Manual –export and import
Objects and Design
Object Communication Objects interact by invoking methods and passing messages to handlers Would like to have objects ask –what another object can do –what methods are available and then use the functionality available
Similarities apps and html scripts Message/event handlers window controls but apps can be OO design extensibility Message/event handlers window controls
OLE Microsoft View Application Application & OLE object have strict boundaries ActiveX Application Application & ActiveX object have loose boundaries
Microsoft View Browser ActiveX Application Same Active X objects used in Browser AND application ActiveX Application program/design effort more usable