Monday, March 9, 2009

XML Processing Options

This document provides an overview of the technologies Microsoft delivers for processing XML data. Further investigation of these options can help in deciding which to use for a particular application.

Option

Namespace

Description

LINQ to XML

System.Xml.Linq

LINQ to XML provides an in-memory interface for accessing XML data that is comparable to an updated, redesigned DOM interface. LINQ to XML leverages the .NET Framework Language-Integrated Query (LINQ), new capability in the .NET Framework 3.5.

XmlReader

System.Xml

The XmlReader class provides a fast, non-cached, forward-only means of accessing XML data.

XmlWriter

System.Xml

The XmlWriter class provides a fast, non-cached, forward-only means of generating XML data.

XmlDocument

System.Xml

The XmlDocument class implements the W3C DOM Level 1 Core and DOM Level 2 Core interfaces for reading and creating XML documents.

XPathNavigator

System.Xml.XPath

The XPathNavigator class provides several editing options and navigation capabilities over XML in an XmlDocument or an XPathDocument

XslCompiledTransform

System.Xml.Xsl

The XslCompiledTransform class provides options for transforming XML data using XSL transformations. The new XSLTC.exe tool allows pre-compiled transformations to be referenced in an application.

Option

Description

XmlLite

XmlLite is a fast, secure, non-caching, forward-only XML parser that allows developers to build high-performance XML applications. XmlLite works with any language that can use dynamic link libraries (DLLs); Microsoft recommends using C++.

MSXML

MSXML is the COM-based technology for processing XML that is included with Microsoft Windows. MSXML provides a native implementation of the Document Object Model (DOM) with support for XPath and XSLT. MSXML also contains the SAX2 event-based parser.

.NET Framework 3.5

The .NET Framework is an integral Windows component that supports building and running the next generation of applications and Web services. The key components of the .NET Framework are the common language runtime (CLR) and the .NET Framework class library, which includes ADO.NET, ASP.NET, Windows Forms, and Windows Presentation Foundation (WPF). The .NET Framework provides a managed execution environment, simplified development and deployment, and integration with a wide variety of programming languages. For a brief introduction to the architecture of the .NET Framework, see .NET Framework Conceptual Overview. For a discussion of .NET Framework version 3.5 and its relationship to previous versions of the .NET Framework, see .NET Framework 3.5 Architecture.

The documentation for the .NET Framework includes an extensive class library reference, conceptual overviews, step-by-step procedures, and information about samples, compilers, and command-line tools. To locate the information that interests you, see the following list of main topic areas.


What's New in the .NET Framework Version 3.5 SP1

Updated: July 2008

This topic contains information about new and enhanced features in the .NET Framework version 3.5 Service Pack 1.

New ASP.NET features include ASP.NET Dynamic Data, which provides a rich scaffolding framework that allows rapid data driven development without writing code, and an addition to ASP.NET AJAX that provides support for managing browser history (back button support). For more information, see What’s New in ASP.NET and Web Development.

Core improvements to the common language runtime include the following:

  • Improved application startup and working set performance.

  • Better layout of .NET Framework native images.

  • Opting out of strong-name verification of fully trusted assemblies.

  • Better generated code that improves end-to-end application execution time.

  • Detecting approaching full garbage collections with Garbage Collection Notifications.

  • Opting for managed code to run in ASLR (Address Space Layout Randomization) if supported by the operating system.

  • Managed applications that are opened from network shares have the same behavior as native applications by running with full trust.

The .NET Framework Client Profile is a subset of the full .NET Framework that targets client applications. This improves the installation experience on computers that do not already have the .NET Framework installed.

Performance improvements have been made to Windows Presentation Foundation, including a faster startup time and improved performance for Bitmap effects. Additional functionality for Windows Presentation Foundation includes better support for line of business applications, native splash screen support, DirectX pixel shader support, and the new WebBrowser control.

ClickOnce application publishers can decide to opt out of signing and hashing as appropriate for their scenarios, developers can programmatically install ClickOnce applications that display a customized branding, and ClickOnce error dialog boxes support links to application-specific support sites on the Web. For more information about ClickOnce, see ClickOnce Deployment for Windows Forms Applications.

The .NET Framework Data Provider for SQL Server (System.Data.SqlClient) provides full support for all the new features of the SQL Server 2008 Database Engine. For more information about .NET Framework support for SQL Server 2008, see New Features in SQL Server 2008 (ADO.NET).

The ADO.NET Data Platform is a multi-release strategy to decrease the amount of coding and maintenance required for developers by enabling them to program against conceptual entity data models. This platform includes the ADO.NET Entity Framework, the Entity Data Model (EDM), Object Services, LINQ to Entities, Entity SQL, EntityClient, ADO.NET Data Services and Entity Data Model Tools. For more information, see ADO.NET Data Platform.

The Windows Communication Foundation (WCF) now makes the DataContract Serializer easier to use by providing improved interoperability support, enhancing the debugging experience in partial trust scenarios, and extending syndication protocol support for wider usage in Web 2.0 applications.

The Microsoft.VisualBasic.PowerPacks namespace introduces the new DataRepeater control that displays data in a customizable list format. This namespace also includes new vector shapes.

Introducing Visual SourceSafe

Microsoft Visual SourceSafe is a file-level version control system that permits many types of organizations to work on several project versions at the same time. This capability is particularly beneficial in a software development environment, where it is used in maintaining parallel code versions. However, the product can also be used to maintain files for any other type of team.

Visual SourceSafe supports cross-platform development by allowing collaborative editing and sharing of data. It is designed to handle the tracking and portability issues involved in maintaining one source control base, for example, a software code base, across multiple operating systems. For developers, Visual SourceSafe accommodates reusable or object-oriented code. It makes it easier for you to track the applications that use particular code modules.

At a minimum, Visual SourceSafe does the following:

  • Helps protect your team from accidental file loss.

  • Allows back-tracking to earlier versions of a file.

  • Supports branching, sharing, merging, and management of file releases.

  • Tracks versions of entire projects.

  • Tracks modular code (one file that is reused, or shared, by multiple projects).

Compatibility

The current release of Visual SourceSafe is fully compatible with database versions 6.0 and earlier.

Version Control and File Sharing

Visual SourceSafe allows the quick and efficient sharing of files among projects. The organization of files into projects makes team coordination intuitive. When you add a file to Visual SourceSafe, the file is stored on the database and made available to other users. Changes that have been made to the file are saved so that any user can recover an old version at any time. Members of your team can see the latest version of a file, make changes to local file copies, and save new versions in the database. When a set of files is ready to deliver, Visual SourceSafe makes it easy to share and obtain different versions of the selected set of files.

Extensibility

Using the Visual SourceSafe automation interfaces, you can write extensions based on Visual SourceSafe as needed for your environment. Extensions are usually provided in the form of stand-alone applications written to the automation interfaces. You can also extend Visual SourceSafe functionality by writing an add-in or plug-in that is compatible with the integrated development environment (IDE) of the third-party program that will run the software package.

Parallel Development

Visual SourceSafe supports parallel development and cross-platform development techniques. Such support allows individual team members to complete different parts and versions of a project at the same time, instead of being stalled while waiting for each to other to finish certain tasks. Two- and three-way file merging operations are supported, and Visual SourceSafe includes a number of mechanisms for resolving merge conflicts. File merge operations enable independent work without the need to synchronize changes with those made by other individuals.

In support of parallel operations, Visual SourceSafe also includes a label promotion feature to advance files as needed to different versions of a project. It also supports the use of share, pin, and branch operations for parallel development on a project over an extended period of time.

Developer Support

More and more, developers are accessing Visual SourceSafe functions from their development environments within third-party programs. Visual SourceSafe can be easily integrated with Visual Studio and other development tools, such as Microsoft Access. Visual SourceSafe supports a developer environment in many ways by allowing:

  • Setting of folder policies to enable group development scenarios.

  • Bug fixes

  • Easy transition to a new release of an existing project

  • Batch/nightly builds

  • Automation of source code control events

  • Access to automation interfaces

  • Source control over slow connections

  • Configuration of new projects for isolated Web development

  • Addition of a new Web developer to an existing team Web project

  • Tracking of programming modules to allow reusable or object-oriented code

Database Maintenance

Visual SourceSafe provides a number of powerful database maintenance tools to keep your databases operating efficiently and securely. It supports archival and restoration through easy-to-use wizards, as well as several command line-based maintenance utilities.

Creating a Simple Web Application

In this walkthrough, you will create a simple Web application to use as the basis for a Web test in Walkthrough: Recording and Running a Web Test.

For the purpose of creating a sample Web test, you should use a Web application to which you can make arbitrary changes.

In this walkthrough, you will perform the following tasks:

  • Create a simple Web application.

  • Test the Web application manually.

For this walkthrough you will need:

  • Microsoft Visual Studio 2005

To create the Web application

  1. In Microsoft Visual Studio 2005, on the File menu, click New and then click Web Site.

    The New Web Site dialog box appears.

  2. Under Visual Studio installed templates, click ASP.NET Web Site.

  3. In the Location box, select File System, and then type the name of the folder where you want to keep your Web application. Make the end of the folder name ColorWebApp\ColorWebApp. For example, type the folder name C:\WebSites\ColorWebApp\ColorWebApp.

    ms243156.alert_note(en-us,VS.90).gifNote:

    Include the name two times so that you can add a Web test project to the first folder, and it will be separated from the Web application itself in the second folder.

  4. In the Language list, choose the programming language you prefer.

    ms243156.alert_note(en-us,VS.90).gifNote:

    You will write minimal code in this walkthrough.

  5. Click OK.

To add controls to the Web application

  1. In Solution Explorer, right-click Default.aspx and choose View Designer.

    A blank page is displayed.

  2. If the toolbox is not visible click View and then click Toolbox.

  3. From the Standard group, drag a RadioButtonList onto the page.

    A RadioButtonList control is added to the design surface.

  4. On the RadioButtonList Tasks smart tag pane, click the EditItems link.

    A ListItem Collection Editor appears.

    ms243156.alert_note(en-us,VS.90).gifNote:

    You can also display the ListItem Collection Editor by editing the Items collection from the Properties window.

  5. Click Add to add a new item.

  6. Under ListItem properties:

    1. Change the Text property to Red.

    2. Set the Selected property to True.

  7. Click Add to add another item.

  8. Under ListItem properties change the Text property to Blue.

  9. Click OK to close the ListItem Collection Editor.

  10. Drag a Button onto the page and change the Text property to Submit.

  11. On the File menu, click Save All.

To add pages to the Web application

  1. On the Website menu, click Add New Item.

  2. In the Add New Item dialog box, click the Web Form template, name it Red.aspx, and then click Add.

  3. At the bottom of the document window, click the Design tab to switch to design view.

  4. Drag a Label onto the page. Set the Text property to Red, and the ForeColor property to Red.

  5. On the Website menu, click Add New Item.

  6. In the Add New Item dialog box, click the Web Form template, name it Blue.aspx, and then click Add.

  7. At the bottom of the document window, click the Design tab to switch to design view.

  8. Drag a Label onto the page. Set the Text property to Blue, and the ForeColor property to Blue.

  9. On the File menu, click Save All.

To add functionality to the Web application

  1. In Solution Explorer right-click Default.aspx and click View Designer.

  2. Double-click the Submit Button. Visual Studio switches to the page code, and creates a skeleton event handler for the Button control's Click event.

  3. Add the following code to the event handler:

    if (this.RadioButtonList1.SelectedValue == "Blue")
    {
    Response.Redirect("Blue.aspx");
    }
    else
    {
    Response.Redirect("Red.aspx");
    }

    Visual Basic
    If RadioButtonList1.SelectedValue = "Blue" Then
    Response.Redirect("Blue.aspx")
    Else
    Response.Redirect("Red.aspx")
    End If

  4. On the File menu, click Save All.

To test the Web application manually

  1. In Solution Explorer, right-click Default.aspx and then click Set As Start Page.

  2. Press CTRL+F5 to run the Web application in the browser. You will see the first page.

  3. Click Red and then click Submit. If the application is working correctly you will go to the page with the Label that says Red.

  4. Go back to the first page.

  5. Click Blue and then click Submit. If the application is working correctly you will go to the page with the Label that says Blue.

Hello To Every One


Just Wait