6-404 Create Document/View Web Applications with XML - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

6-404 Create Document/View Web Applications with XML

Description:

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 ... – PowerPoint PPT presentation

Number of Views:155
Avg rating:3.0/5.0
Slides: 23
Provided by: Dino102
Category:

less

Transcript and Presenter's Notes

Title: 6-404 Create Document/View Web Applications with XML


1
Create Document/View Web Applications With
XML Dino EspositoWrox Press 6-404
2
(No Transcript)
3
Agenda
  • Documents and views
  • XML and ASP
  • HTML and XMLDOM
  • XML and MFC

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

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

6
Doc-View On The Web
Win32 - MFC
IE 5.0
XSL
XSL
XSL
CView
CView
CView
XML Data
CDocument
HTML Page
7
Three Scenarios For XML/XSL
  • Different stylesheets via ASP
  • Different stylesheets via XMLDOM and Dynamic HTML
  • Different stylesheets via MFC classes

8
Agenda
  • Documents and views
  • XML and ASP
  • HTML and XMLDOM
  • XML and MFC

9
XSL Selection Via ASP
  • Frame-based page
  • Surrounding graphics and controls
  • An ltIFRAMEgt window gets the XML text through an
    ASP page

10
Ex. 1 Web Doc-View
Stylesheets
ltIFRAME srccontent.asp?XSLgt
11
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

12
Agenda
  • Documents and views
  • XML and ASP
  • HTML and XMLDOM
  • XML and MFC

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

14
Whats A Data-Island?
lthtmlgt ltbodygt ltxml idMyDatagt lt Enter ASP
code to produce XML data gt lt/xmlgt lt!-- Rest
of the page --gt lt/bodygt lt/htmlgt
  • The ltxmlgt tag supports the src attribute
  • ltxmlgt is IE50-specific
  • Use DHTML

15
Ex. 2 Using XMLDOM
Stylesheets
ltDIVgt filled at runtime via XMLDOM
transformations
16
Using XMLDOM
Request for Page.asp
Web Server
Browser (IE 5.0)
HTML page with embedded XML code
Instantiate XMLDOM, convert to HTML and
use Dynamic HTML to display the final code
17
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

18
Agenda
  • Documents and views
  • XML and ASP
  • HTML and XMLDOM
  • XML and MFC

19
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

20
Ex. 3 Using CHtmlView
Load OLE DB data and convert to XML
Stylesheets
WebBrowser displays a temporary XML file
21
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

22
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com