1 / 22

Create Document/View Web Applications With XML Dino Esposito Wrox Press 6-404

Create Document/View Web Applications With XML Dino Esposito Wrox Press 6-404. Agenda. Documents and views XML and ASP HTML and XMLDOM XML and MFC. Doc/View Background. Model-View-Controller architecture Foundation of SmallTalk 25 yrs ago MFC Doc/View model simplification

julian-best
Download Presentation

Create Document/View Web Applications With XML Dino Esposito Wrox Press 6-404

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Create Document/View Web Applications With XML Dino EspositoWrox Press 6-404

  2. Agenda • Documents and views • XML and ASP • HTML and XMLDOM • XML and MFC

  3. Doc/View Background • Model-View-Controller architecture • Foundation of SmallTalk 25 yrs ago • MFC Doc/View model simplification • Separation between data and presentation

  4. XML And XSL • Two distinct files: Data and presentation • XSL applies transformations to XML data • XSL knows about the XML code structure

  5. Doc-View On The Web Win32 - MFC IE 5.0 XSL XSL XSL CView CView CView XML Data CDocument HTML Page

  6. Three Scenarios For XML/XSL • Different stylesheets via ASP • Different stylesheets via XMLDOM and Dynamic HTML • Different stylesheets via MFC classes

  7. Agenda • Documents and views • XML and ASP • HTML and XMLDOM • XML and MFC

  8. XSL Selection Via ASP • Frame-based page • Surrounding graphics and controls • An <IFRAME> window gets the XML text through an ASP page

  9. Ex. 1: Web Doc-View Stylesheets <IFRAME src=content.asp?XSL=…>

  10. Using ASP: Trade-Offs • Easy to design and code • Everything happens on the server • Serious overhead • XML data is continuously downloaded • Each representation requires a new page with the same data

  11. Agenda • Documents and views • XML and ASP • HTML and XMLDOM • XML and MFC

  12. Using Data-Islands • The HTML page embeds the XML code to display • The <xml> tag in IE5.0+ • Retrieve the data-island text through the Dynamic HTML DOM • Apply the necessary transformation on the client

  13. What’s A Data-Island? <html> <body> <xml id=MyData> <% ‘ Enter ASP code to ‘ produce XML data %> </xml> <!-- Rest of the page --> </body> </html> • The <xml> tag supports the src attribute • <xml> is IE50-specific • Use DHTML

  14. Ex. 2: Using XMLDOM Stylesheets <DIV> filled at runtime via XMLDOM transformations

  15. Using XMLDOM Request for Page.asp Browser (IE 5.0) Web Server HTML page with embedded XML code Instantiate XMLDOM, convert to HTML and use Dynamic HTML to display the final code

  16. Using XMLDOM: Trade-Offs • Browser-dependent • Everything takes place on the client • XML data downloads only once • Only additional XSLs download • DHTML script code on the client

  17. Agenda • Documents and views • XML and ASP • HTML and XMLDOM • XML and MFC

  18. Using MFC And CHtmlView • A MFC application using CHtmlView • Internet Explorer 5.0+ gives you automatic support for XML and XSL • Force WebBrowser to display XML • Use temp files • Everything takes place locally

  19. Ex. 3: Using CHtmlView Load OLE DB data and convert to XML Stylesheets WebBrowser displays a temporary XML file

  20. Using MFC: Trade-Offs • A familiar programming model • WebBrowser (IE 5.0) dependent • Everything takes place on the client • Take advantage of XML support in SQL Server™ 2000

More Related