Tải bản đầy đủ (.pdf) (44 trang)

Tài liệu Module 10: The Challenge of Designing XML Solutions pptx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.04 MB, 44 trang )










Contents
Overview 1
Lesson: Solutions That Use XML 2
Lesson: XML Web Services 17
Lesson: What Is Next? 27
Lab 10: Building a Menu System 32
Review 36
Course Evaluation 37

Module 10: The
Challenge of Designing
XML Solutions



Information in this document, including URL and other Internet Web site references, is subject to
change without notice. Unless otherwise noted, the example companies, organizations, products,
domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious,
and no association with any real company, organization, product, domain name, e-mail address,
logo, person, places or events is intended or should be inferred. Complying with all applicable
copyright laws is the responsibility of the user. Without limiting the rights under copyright, no
part of this document may be reproduced, stored in or introduced into a retrieval system, or


transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or
otherwise), or for any purpose, without the express written permission of Microsoft Corporation.

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual
property rights covering subject matter in this document. Except as expressly provided in any
written license agreement from Microsoft, the furnishing of this document does not give you any
license to these patents, trademarks, copyrights, or other intellectual property.

 2001 Microsoft Corporation. All rights reserved.

Microsoft, MS-DOS, Windows, Windows NT, ActiveX, BackOffice, bCentral, BizTalk,
FrontPage, MSDN, MSN, Netshow, PowerPoint, SharePoint, Visio, Visual Basic, Visual C++,
Visual C#, Visual InterDev, Visual Studio, Windows Media, and Xbox are either registered
trademarks or trademarks of Microsoft Corporation in the U.S.A. and/or other countries.

The names of actual companies and products mentioned herein may be the trademarks of their
respective owners.


Module 10: The Challenge of Designing XML Solutions iii


Instructor Notes
This module helps participants expand their understanding of how they can
use Extensible Markup Language (XML) technologies, the Microsoft
®
.NET
Framework, and XML Web services to create XML solutions. It should also
be a module that is fun for you and fun for the participants, and it should
communicate a clear sense of excitement about the many possibilities in

this area.
By the time participants get to this module, they have learned about a
considerable number of new technologies and ideas. Some participants might
feel overwhelmed. Hopefully, most are also excited by the capabilities that they
have learned about.
Throughout this module, you will need to be mindful of the time. Move through
this module quickly. Because it is at the end of the course, use the module to
review and relate the previous modules to one another.
Even though this is the final module, it still contains a significant amount of
new material. Be sure to prepare thoroughly for this module so that you can
lead the demonstrations and the lab smoothly.
You might want to do the challenge lab as a group exercise. This purpose of the
lab is to help the participants see the many possibilities provided by XML and
the .NET Framework.
After completing this module, participants will be able to:
!
List additional XML technologies that they can use in solution development.
!
List possible solutions to which you can apply XML and related
technologies.
!
Identify the skill sets required to design XML solutions.
!
Review a proposed solution and choose an appropriate mix of XML and
related technologies to address design requirements.

Presentation:
40 Minutes

Lab:

20-30 Minutes
iv Module 10: The Challenge of Designing XML Solutions


Materials and Preparation
This section provides the materials and preparation tasks that you need to teach
this module.
To teach this module, you need the following materials:
!
Microsoft PowerPoint
®
file 2500A_10.ppt
!
An Internet connection

To prepare for this module:
!
Read all of the materials for this module.
!
Complete the lab.
!
Review Web sites for .NET My Services, .NET Passport, and.NET Alerts.
!
Review the most recent announcements from the World Wide Web
Consortium (W3C).
!
Review the most recent announcements for Microsoft MSDN
®
.NET
courses and Microsoft Official Curriculum (MOC) .NET server courses.

!
Review the XML site on MSDN to see what additional examples and
articles are available if participants want to extend their learning beyond the
class. In particular, check to see if there are later versions of any of the
demonstration files used in the module.

Required Materials
Preparation Tasks
Module 10: The Challenge of Designing XML Solutions v


Instructor Setup for a Lab
This section provides setup instructions that are required to prepare the
instructor computer or classroom configuration for a lab.
!
Prepare for the lab
1. Internet Information Server (IIS) must be installed and running properly.
There will be no time to install IIS at this point in the course if it has not
been done.
2. The file msdntocc2.exe must be available in the install_folder\Labfiles\
Lab10\Starter folder.
3. Verify that the file installs and works properly on the instructor computer.

Multimedia Presentation
There are no media for this module. If the course is customized and extended,
use the various .NET media downloads to teach more about the relevant topics
covered in this module.
Lab 10: Building a Menu
System
vi Module 10: The Challenge of Designing XML Solutions



Module Strategy
Use the following strategy to present this module:
!
Solutions That Use XML
This first lesson is designed to provide more context for XML and
Microsoft .NET.
To get participants enthusiastic about learning more about XML, this lesson
describes types of XML solutions. This lesson is also designed to reinforce
the principle that XML technologies work together to do different things,
depending on the solution.
Use the topics in this lesson to emphasize the ways that you can use XML
and .NET. Use the examples and cross-references to help make these points.
However, do not spend excessive time on any one topic. The
cross-references are provided in some detail so that participants can study
these topics on their own.
In the Demonstration folder, you have copies of the Duwamish Online .NET
sample site files (Duwamish7-CS.cab and Duwamish Online VB.cab).
!
XML Web Services
This lesson provides more specific examples of XML Web services. Refer
participants to the extensive MSDN resources for learning about XML Web
services. The recent articles on .NET methods are the most relevant,
because XML Web services have changed since the early articles were
written in 1999.
Do not imply that Microsoft .NET is just about XML Web services.
Emphasize the complexity and extent of .NET and XML technologies
beyond XML Web services, but do not minimize the significance of XML
Web services themselves.

Stress the broader .NET context for participants to learn about across the
full range of the .NET Framework. The better you understand this yourself,
the easier this will be.
If you have time, open the Cold Storage Web site to demonstrate it to
students.
!
What Is Next?
This lesson is designed to help participants see where they can go beyond
this course for information and skills learning. Keep the main emphasis on
skills development. Do not sound like you are trying to sell other courses. If
the course is effective, participants will know how they can benefit by
developing their skill sets.
For the Jobs and Opportunities topic, stress that many traditional jobs will
be refined or redefined as a result of the .NET Framework. Even those who
are new to this field have many opportunities due to this fact.
Encourage participants to discuss the changing jobs and roles. If there is
extra time, lead a discussion on this topic. Refer participants to other events
that might help them.
Finally, stress that participants must constantly be learning in this rapidly
changing field about the many ways that they support this effort, and
encourage participants to get their home organizations involved in courses
like this to drive awareness and solutions.
Module 10: The Challenge of Designing XML Solutions 1


Overview
!
Solutions That Use XML
!
XML Web Services

!
What Is Next?

*****************************
ILLEGAL FOR NON
-
TRAINER USE
******************************
The previous modules covered a wide range of Extensible Markup Language
(XML) and Microsoft
®
.NET issues and ideas. This final module focuses on
some selected uses of XML, the use of XML in XML Web services, and ways
that you can enhance your skills in the XML and .NET arena.
Although the topics in this module are not exhaustive, they will help you begin
to expand your understanding of XML and .NET.
After completing this module, you will be able to:
!
List XML technologies that you can use in solution development.
!
List possible solutions to which you can apply XML and related
technologies.
!
Identify the skill sets required to design an XML solution.
!
Review a proposed solution and choose an appropriate mix of XML and
related technologies to address design requirements.

Introduction
Objectives

2 Module 10: The Challenge of Designing XML Solutions


Lesson: Solutions That Use XML
!
Layered Designs
!
XML-Based Menu Systems
!
Data Handling
!
Proprietary Systems

*****************************
ILLEGAL FOR NON
-
TRAINER USE
******************************
There are many ways that you can use and implement XML in solutions for the
handling of data, metadata, and data exchange. This lesson will briefly describe
several of these.
One particularly useful application of XML technologies is to use XML to
manage Web site navigation and menu systems. Combined with a sound
approach to layered architecture, you can use XML to manage communication
within and between particular layers of your solution. Many Microsoft MSDN
®

articles have addressed this topic since XML first came into focus in 1998.
After completing this lesson, you will be able to:
!

Identify ways in which you can use XML to build Web page menu systems.
!
Identify the key concepts of layered design architecture.
!
Identify places where XML data storage and handling provide efficient
solutions.
!
Explain how you can use XML to help integrate proprietary systems.
!
Explain how you can use XML to handle documents.
!
Identify items to assess when you develop applications that use XML
and .NET.

Introduction
Lesson objectives
Module 10: The Challenge of Designing XML Solutions 3


Layered Design
Architecture of Duwamish Online
Data Access
Layer
Business
Layer
Presentation
Layer
Windows 2000
Task Scheduler
Windows 2000

Task Scheduler
Fulfillment
Workflow
Fulfillment
Workflow
Active Server Pages with XSLT
Active Server Pages with XSLT
Fulfillment
Data Source
Fulfillment
Data Source
Duwamish
Database
Duwamish
Database
Queued
Workflow
Queued
Workflow
Workflow
Component
Workflow
Component
Business Logic Layer
Business Logic Layer
Data Access Layer
Data Access Layer

*****************************
ILLEGAL FOR NON

-
TRAINER USE
******************************
One of the particularly important Web design tasks that you can undertake
with XML technologies is the development of clearly defined layers in an
application design sense.
Using XML permits the Web designer to store all types of data in XML data
and XML documents to define the application layers and the communication
between them. The Web designer can create very lean and efficient code
structures that use the same or similar techniques for navigation, data exchange,
and configuration of metadata and data.
MSDN provides special sample projects that help you learn about the best ways
to implement XML. The Duwamish Online sample application is available on
the Internet at . You can find its various versions,
from its early implementations through the Microsoft Visual Studio
®
.NET
version, in the MSDN Library.

To read about the architecture of Duwamish version 5.0, go to Duwamish
Online Application Architecture at
default.asp?url=/library/en-us/dnduwon/html/d5ntierarch.asp?frame=true.
To download the C# version of Duwamish version 7.0, go to Duwamish7 (C#)
at
sample.asp?url=/MSDN-FILES/026/002/071/msdncompositedoc.xml.
To download the Microsoft Visual Basic
®
.NET version of Duwamish 7.0, go
to Duwamish7 (Visual Basic) at
default.asp?url=/code/sample.asp?url=/msdn-files/026/002/073/

MsdnCompositeDoc.xml&frame=true.

Introduction
Note
4 Module 10: The Challenge of Designing XML Solutions


When implementing layered design, the Web design team clearly separates the
various application functions from each other. This results in much easier
development routines, because each layer is maintained independently of each
other layer. You can manage code for each layer without impinging on any
other layer. Maintenance of the interaction between layers can be managed in
many different ways, including through XML data and XML documents.
The number of layers that you use depends on your conceptual framework and
the detail that you want to associate with each layer. Layers are thought of as
either top-down or bottom-up. Conventionally, the layers are as follows (using
a bottom-up listing).
Layer Purpose

Data access To provide access to data
Business logic To store business rules and logic processes
Presentation Actual display of information to the client

This does not provide the details about layers that are required in practical Web
design. The following table more specifically identifies layers and what they
do.
Layer Purpose

Data layer To provide the actual data storage (for example,
SQL Server)

Data access To provide access to data
Business logic To store business rules and logic processes
Business façade To manage workflow and abstraction of business actions
Presentation Actual display of information to the client

For the management of data, logic, workflow, and presentation between each
layer, data can be stored in Microsoft SQL Server

2000 and retrieved by using
SQL XML. This technique can be used in combination with various forms of
stored procedures (with and without XML) and provide highly effective and
efficient data, workflow, and content management for the Web site.
Not all things can be done equally well by XML, so it is important to use the
most appropriate technology for each task. This depends in part on the mixture
of logical and physical architecture chosen by the development team.
The Duwamish Books example Web site uses SQL XML, C++, Component
Object Model (COM), Active Server Pages (ASP), and XSLT. In Visual Basic
.NET and Microsoft Visual C#

.NET, the newer .NET Framework techniques
are invoked.
If time permits, read the Visual Basic .NET or Visual C# .NET sample
Duwamish sites. The sample files are located in the install_folder\
Practices\Mod10 folder.

What is layered design?
XML and la
yered design
Optional practice
Module 10: The Challenge of Designing XML Solutions 5



XML-Based Menu Systems
!
XML-based menu systems use XML for content
and navigation
!
Microsoft.com site example
!
XML-based menus systems are a recurring theme
"
Menu articles in MSDN since 1998
XML Example

*****************************
ILLEGAL FOR NON
-
TRAINER USE
******************************
You can develop Web applications and menu systems by using XML. When
combined with data storage in SQL Server 2000 or other databases that support
XML, XML-based menu systems help to reduce page counts on a Web site. In
one example, the number of files was reduced by a factor of 10. The overall
efficiency of using XML also makes these systems very powerful.
You might not think that menu systems are important. However, every Web
site needs a menu system, and ideally they are as efficient and as easy to
maintain as possible. Many articles that are concerned with menu design and
implementation have appeared in MSDN publications. Combining XML
with .NET languages has resulted in a vigorous search for better ways of
creating menus.

This topic describes some of the core issues concerning menu design.

As one example of the efficiency of XML-based menus systems, part of
the Microsoft Web site was redeveloped by using XML. This produced
significant reductions in page counts and increases in speed of response times.
For more information, see one account of how beneficial this has been for
Microsoft at
en-us/dnexxml/html/xml09182000.asp.

Introduction
Note
6 Module 10: The Challenge of Designing XML Solutions


The basic XML data on the Microsoft.com site was processed by using
combinations of XSL and ASP. When .NET is implemented on the site, these
references rapidly date.
Using XSL resulted in extremely rapid page builds and tremendous
transportability. Other Microsoft sites used the schemas developed by the
Microsoft.com team, implemented them, and found they did not need to be
reworked. This results in very powerful and efficient Web development.
The following types of site features are supported by the indicated XML
technologies on Microsoft.com.
Application Technology

Product Catalog XML/XSL
/regsys/pic"
TABINDEX="0">Registration
XML/XSL
/downloads/search"

TABINDEX="0">Download Center
Mostly XML/XSL
/us/SearchMS25"
TABINDEX="0">Search
XML/XSL

The benefits that result from using XML on Microsoft.com include the
following:
!
Reduced numbers of pages
!
Greater granularity of code
!
Less code breakage
!
Less replication required across the Microsoft network
!
More robust and data-driven ASP pages
!
More rapid development


Links in these articles do not always work. The article contents are
still very useful, but do not be surprised if some of the links are broken. The
Microsoft site undergoes constant changes and some of the technical reference
pages no longer exist.

XML on Microsoft.com
Caution
Module 10: The Challenge of Designing XML Solutions 7



The following diagram shows how and where you can use XML to manage
Web site development. For each type of content development, there is a role for
XML in the management of content, style, presentation, and data manipulation.

In the end, you can use XML and XSL nearly anywhere. You can store the data
in SQL Server 2000 and in XML data documents.
Examples
8 Module 10: The Challenge of Designing XML Solutions


You can use XML to store the data for the menu items and for the navigation.
The following is an example of this code. The code creates the general menu
bar and then allows for the dynamic rendering of a specific menu within it.
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="

<xsl:template match="/">

<!-- BUILD MENU BAR -->
<DIV ID="divMenuBar">
<TABLE ID="tblMenuBar" BORDER="0">
<TR>
<xsl:for-each select="//TOPICS[TOPIC]">
<TD CLASS="clsMenuBarItem">
<xsl:attribute name="ID">
tdMenuBarItem<xsl:value-of select="@TYPE" />
</xsl:attribute>
<xsl:value-of select="@TYPE" />

</TD>
<xsl:if test="context()[not(end())]">
<TD>|</TD>
</xsl:if>
</xsl:for-each>
</TR>
</TABLE>
</DIV>
<!-- BUILD INDIVIDUAL MENUS -->
<xsl:for-each select="//TOPICS[TOPIC]">
<DIV CLASS="clsMenu">
<xsl:attribute name="ID">
divMenu<xsl:value-of select="@TYPE" />
</xsl:attribute>
<DIV CLASS="clsMenuSpacer"></DIV>
<xsl:for-each select="TOPIC">
<DIV>
<A>
<xsl:attribute name="HREF">

<xsl:value-of select="URL" />
</xsl:attribute>
<xsl:value-of select="TITLE" />
</A>
</DIV>
</xsl:for-each>
</DIV>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>


Module 10: The Challenge of Designing XML Solutions 9



Although there are many articles on this topic, remember that some are
now out of date in a strictly technological sense. For information about the
MSDN menu system in C#, see The MSDN Table of Contents in C# at

html/xml01152001.asp.
For a detailed description of the diagram, see Streamlining Your Web Site
Using XML at
en-us/dnexxml/html/xml01172000.asp.
For a detailed description of the code, see DXML Redux: Building Dynamic
HTML Menus from XML at
default.asp?url=/library/en-us/dncodecorn/html/corner052499.asp.

Note
10 Module 10: The Challenge of Designing XML Solutions


Data Handling
!
Excel
!
Access
!
SQL Server 2000
!
BizTalk Server 2000

!
Visio 2002
!
Technical vocabularies: MathML and VoiceXML
!
XML editors
XML Data for Visio Drawing MathML Examples

*****************************
ILLEGAL FOR NON
-
TRAINER USE
******************************
You can represent data of any type in XML. By using the other XML
technologies, you can render that data in many ways.
Microsoft Excel can store typical numeric business data in a worksheet in XML
format. Microsoft Access and SQL Server 2000 can store structured data.
Microsoft BizTalk

Server 2000 uses XML to store all types of data for
e-commerce and document management, and Microsoft Visio
®
uses XML to
store workflow and diagrammatic data. Other specialist languages such as
MathML use XML to render mathematical data, and various editors are
designed for document data handling.
To render data, you use XML with the following applications:
!
Microsoft Excel
The capabilities of XML worksheets are not identical to those of a standard

Excel worksheet. For example, if you store a worksheet, which contains a
chart or other computed graphical objects, as XML, the objects cannot be
rendered and are lost.
!
Microsoft Access
Natively and through Data Access Pages, Access can render XML data in
many ways and generate the associated schemas to go with it. Its
capabilities are similar to those of SQL Server 2000 but are not nearly
as extensive.
!
SQL Server 2000
In SQL Server 2000, XML can be used in many ways through templates,
stored procedures, and schemas. With the enhancements in XML for
SQL Server 2000, SQL Server is capable of even more extensive XML
data handling.
Introduction
Discussion examples
Module 10: The Challenge of Designing XML Solutions 11


!
BizTalk Server 2000
BizTalk Server 2000 uses XML and XSL data to store information about
channels, ports, maps for data translation, and virtually everything else it
uses. XML is the core mechanism for using disparate systems together to
exchange any type of business data.
!
Visio 2002
Visio 2002 uses XML to store Visio drawings and its templates and stencils.
By using XML capabilities with other technologies, you can build powerful

diagrammatic-driven environments that use XML data to manage other
processes, as is done with XLANG schedules in BizTalk Server 2000.
Visio uses XML in a particularly interesting way, because it allows you to
develop visual solutions that can be translated into XML and thereby used
in many different data-centric scenarios.
The following screen shot is a Visio drawing of the Microsoft WordPad
interface, saved as a VXD file.

×