Hosting Browser Controls Jim Fawcett CSE 791 Distributed
Hosting Browser Controls Jim Fawcett CSE 791 – Distributed Objects Spring 2002
References 1. Web Browser/Content in a C# Application, Noah Coad · http: //www. devhood. com/tutorials/tutorial_details. aspx? tutorial_id =312&printer=t 2. Embedded Windows User Controls into Internet Explorer, Andrew Ma · http: //www. devhood. com/tutorials/tutorial_details. aspx? tutorial_id =187&printer=t 3. User Controls for Windows and the Web, Heath Stewart · http: //www. devhood. com/tutorials/tutorial_details. aspx? tutorial_id =388&printer=t
References 1. Introduction to Delegates, Kevin Chan · http: //www. devhood. com/tutorials/tutorial_details. aspx? tutorial_id =361&printer=t 2. Introduction to Events, Kevin Chan · http: //www. devhood. com/tutorials/tutorial_details. aspx? tutorial_id =380&printer=t
Web Programming Model · Web Programming supports distributed processing: – Client-side: • XHTML, scripts, Active. X controls, Java Applets – Server-side: • CGI (C, C++, Perl, …), ASP (Vbscript, Java. Script), ISAPI (C, C++)
Programming Models · Both browser and web-server support a programming model: – Browser – window/document/element – Web Server – Request & Response objects · In IE 5 and IIS the programming model is derived from a parse tree: – IE 5 builds parse tree from XHTML elements. – IIS builds parse tree from ASP pages and server-side scripts.
Window and Document · On the client side the browser presents a window with contents. – The window is represented by the class: mshtml. HTMLWindow 2 Class Which wraps the COM interfaces: mshtml. HTMLWindow 2 mshtml. HTMLWindow. Events 2 and many more – The contents are represented by a document class: mshtml. HTMLDocument. Class Which wraps the interfaces: mshtml. HTMLDocument. Disp. HTMLDocument mshtml. HTMLDocument. Events_event and many more
Powerful Programming Model · This is a very flexible, powerful model: – Can plug in reusable control components • Support methods, properties, events – Applications can support the browser and DHTML parser controls: • So both the application and the web page can determine what the user sees and how a user interacts with the system by interacting with the DHTML parse tree.
Programming Model · This web programming model allows us to do some very interesting things: – We can build GUIs that the user can change easily, in some fundamental ways, if we base it on the web model, e. g. : • An application that provides basic resources. • Controls that provide reusable blocks of behavior – Controls can simply provide intricate behavior – They can also bind to data sources, e. g. , xml or relational databases. • A web page that binds to controls, sets styles and behaviors, and provides most of the content. – The user can control the GUI by modifying DHTML
- Slides: 12