A Sneak Peak at Favorites Phase II

 

Scott Seely
Microsoft Corporation

January 2, 2002

Introduction

Happy New Year! Right now, it's an exciting time to be working with Microsoft® products. Microsoft® Windows® XP has made it easier to use our computers through many of its enhancements. Word is that Microsoft® Visual Studio® .NET will be released to manufacturing any day now. As for playtime, even my family has no complaints (tough critics that they are) about the job the Microsoft® XBox™ team did. To build on all this excitement, I'd like to start out the year for "At Your Service" by introducing the next revision of our popular server-side Favorites example.

We are doing a lot that we hope will make the project better for both you and us. Instead of making you wait until everything is done, we are going to roll out the next revision of the sample in phases. By doing a phased rollout, we get to put content out to you on a more regular basis. The Favorites team will get a better mix of writing and coding, and you will get to see how things are going as the project unfolds. We have also begun posting meeting notes to the Web. Check out our Favorites Service Phase II Web Log to see how things are progressing and what we are running into from week to week. If you have any other suggestions, just send an e-mail to us at wsgmsdn@microsoft.com.

This article will look at what you can expect to see in each part of the rollout. Each drop will address a specific part of the sample. We will look at each one in the order we expect them to appear:

  • Update the Web site to use ASP.NET.
  • Update the Web Service to use Passport authentication. Also, we will remove the raw XML and instead send it using XSD-defined data types.
  • Update the Web site to use the revised Web Service.
  • Rich-client implementation using the Web Service.
  • Create a non-Microsoft-based client for the Web Service.

The following sections look at each of these items in more detail.

ASP.NET Update for the Web Site

We have talked a lot about how Web Services allow for language and platform interoperability. Reliable sources have been telling us that many of you have been using the Microsoft® SOAP Toolkit and want to know how this will affect the clients that use it. Are you stuck using Microsoft® Visual Basic® 6.0 when Visual Studio .NET gets released? Just to show you it isn't a concern (and because Matt was dying to do a project using ASP.NET), the client site will be updated to use ASP.NET. The same Web Service we introduced in the spring of 2001 will still do its job of storing and managing favorites for licensees and their end users.

This update will contain an ASP.NET server control to display and modify favorites. As we move through the iterations, this control will adapt to remain useful through any changes.

Finally, the installation will now have to handle installing an ASP.NET Web site. At this point in time, we have no idea what challenges this creates, or tasks this removes.

Web Service Update

When we looked at the current version of the Favorites Web Service, we noticed that we did a few things that, after living with them for almost a year, just seem wrong. We return favorites and report data as an XML-encoded string instead of as XSD-defined types. Identifying information is in the signature of every method, instead of being passed in as header information. Finally, there are some things that we could do to make the Web Service more accessible between licensees. These shortcomings will all be addressed.

One of the big things we will do is stick with the SOAP Toolkit. Yes, we could have done things easier and faster by just switching over to ASP.NET. However, we see two things happening that affected this decision:

  1. As a company, Microsoft is already producing a lot of ASP.NET Web Service content. Adding yet another example at this time seems foolish.
  2. We are not producing that much SOAP Toolkit content, and a lot of you will not have the luxury of moving over to ASP.NET for some time.

As a result, the Web Service will stick to its Visual Basic 6.0 roots. The licensee key and user identification will be passed using SOAP headers. To do this, and not break any clients using Phase I of the Cold Rooster example, we have to create new versions of the Account and Report endpoints. Look forward to some articles on versioning Web Services and using SOAP headers with the Microsoft SOAP Toolkit.

The favorites and report data will come through as XSD data types in real XML instead of encoded XML. Why? Tools such as ASP.NET do allow for easy serialization to and from XML if the XSD exists. Doing this makes it easier for others to consume and use the Web Service.

Finally, we will update the way the favorites are stored. Currently, favorites are tied to a specific user and licensee. This means that if an end user visits several Web sites that each license the Favorites Service, they should be able to see the same set of favorites on both Web sites. We will do this by using the end user's Passport ID to unite the user with their favorites. To add some value for licensees, we will let them know which favorites they did and did not save for the user. This way, a licensee can choose to filter out content the user did not save through the licensee's site.

Update the Web Site to Use Revised Web Service

Once the Web Service has been updated, the client site will need to be revised. This will cover a traditional Passport Web site that uses Passport as Microsoft originally intended. In other words, we won't be using the latest features like the Cold Storage team had to. Expect to see a lot of content covering how we activated the site using Passport, as well as anything interesting that happened while the Favorites server control was updated to use the new version of the Web Service.

Enhance the Cold Rooster Rich Client

The Cold Storage project provides a Windows-based client application that talks to their Web Service. This UI can be enhanced by adding extra tabs to its interface. To this set of controls, we will add a tab that lets you view and manage your favorites.

Create a Non-Microsoft-Based Client

We hear a lot of questions about making Microsoft-based SOAP endpoints work with other, non-Microsoft toolkits. Just to show that this is possible, we will create a fairly simple Web site that tentatively will run either on Apache or Apache Tomcat. If you have an opinion about what we should be using (either you agree or you think we are nuts), give us some feedback.

This Web site will have to do everything from Passport authentication to viewing and managing end user favorites. This ought to be pretty interesting—for you and for us.

Summary

We are covering a lot of new information and will be delivering the second phase of the example to you in phases. As the sample evolves, the setup download will change with it. Our group has not yet tried such an approach, so be sure to let us know what you do and do not like by sending us an e-mail at wsgmsdn@microsoft.com. We want to help you get the most out of this sample.

 

At Your Service

Scott Seely is a member of the MSDN Architectural Samples team. Besides his work there, Scott is the author of SOAP: Cross Platform Web Service Development Using XML (Prentice Hall—PTR) and the lead author for Creating and Consuming Web Services in Visual Basic (Sams).