In my recent post entitled The MSDN Camp vs. The Raymond Chen Camp I wrote

Our team [and myself directly] has gone through a process of rethinking a number of decisions we made in this light. Up until very recently we were planning to ship the System.Xml.XPath.XPathDocument class as a replacement for the System.Xml.XmlDocument class
...
The problem was that the XPathDocument had a radically different programming model than the XmlDocument meaning that anyone who'd written code using the XmlDocument against our v1.0/v1.1 bits would have to radically rewrite their code to get performance improvements and new features. Additionally any developers migrating to the .NET Framework from native code (MSXML) or from the Java world would already be familiar with the XML DOM API but not the cursor-based model used by the XPathDocument. This was really an untenable situation. For this reason we've reverted the XPathDocument to what it was in v1.1 while new functionality and perf improvements will be made to the XmlDocument. Similarly we will keep the new and improved XPathEditableNavigator XPathNavigator class which will be the API for programming against XML data sources where one wants to abstract away what the underlying store actually is. We've shown the power of this model with examples such as the ObjectXPathNavigator and the DataSetNavigator.

I've seen some concerned statements about this posts from XML developers who use System.Xml such as Oleg Tkachenko, Fumiaki Yoshimatsu and Tomas Restrepo so it seems I should clarify some of the decisions we made and why we made them.

In version 1.0 of the .NET Framework we provided two primary classes for interacting with XML; the XmlDocument and XmlReader. The XmlReader provided an abstract interface for interacting with a stream of XML. One can create an XmlReader over textual XML using the XmlTextReader or over virtual XML data sources such as is done with the XmlCsvReader. On the other hand with the XmlDocument we decided to eschew the approach favored by the Java world which used interfaces. Instead we created a single concrete implementation. This turned out to be a bad idea. It tied the the interface for programming against XML in a random access manner with a concrete implementation of an XML store. This made it difficult for developers who wanted to expose their data sources as XML stores and led to inefficient solutions such as the XmlDataDocument.

To rectify this we needed to separate the programming model for accessing XML data sources from our concrete implementation of the XmlDocument. We chose to do this by extending the cursor based programming model we introduced in v1 with the XPathNavigator instead of moving to an interface based approach with XmlDocument. The reason for choosing to go with a cursor based model over a tree based model is summed up in this quote from my article Can One Size Fit All?

In A Survey of APIs and Techniques for Processing XML, I pointed out that cursor-model APIs could be used to traverse in-memory XML documents just as well as tree-model APIs. Cursor-model APIs have an added advantage over tree-model APIs in that an XML cursor need not require the heavyweight interface of a traditional tree-model API where every significant token in the underlying XML must map to an object.

So in Whidbey, the XPathNavigator will be the programming model for working with XML data sources when one wants to abstract away from the underlying source. The XPathNavigator will be changed from the v1.0 model in the following ways (i) it will be editable and (ii) it will expose the post schema validation infoset. I've already worked with Krzysztof Cwalina on updating the Design Guidelines for Exposing XML data in WinFX to account for this change in affairs.

As for the XPathDocument, it is what it always has been. A class optimized for use in XPath and XSLT. If you need 10% - 25% better perf [depending on your scenario] when running XPath over an XML document or running XSLT over in-memory XML then this class should be preferred to the XmlDocument.   


 

Categories: Life in the B0rg Cube | XML

September 3, 2004
@ 03:54 AM

Joe Beda is leaving his position as a dev lead on Avalon to go work at Google. I learned about this a couple of days ago but was waiting for him to blog the news first. I suspect there'll be a lot of attrition across various product teams across Microsoft given the recent news about Longhorn.


 

Categories: Life in the B0rg Cube

Yesterday I installed .NET Framework v1.1 service pack 1 and it messed up my ASP.NET permissions. I decided to use this opportunity to kill two birds with one stone. My weblog is currently hosted on my Windows XP machine using IIS meaning that there are several limitations on the web server. The limitation on number of connections means several times during the day people get "Too Many Users" errors when connecting to this website.

I decided to install Apache and try out Movable Type 3.1. That led to a wasted morning trying to install various Perl modules. I tried some more when I got back from work and eventually gave up. Torsten gave me some tips this morning which fixed my ASP.NET permissions and my weblog is back up.

In the mean time it turns out that the v1.2.0.114 SP1 installer for RSS Bandit turns out to have had a number of  issues. If you're an RSS Bandit user please upgrade to v1.2.0.117.


 

Categories: Ramblings | RSS Bandit

August 31, 2004
@ 05:52 AM

This release fixes a number of bugs in v1.2.0.114. Major features will show up in the next release as described in the RSS Bandit product roadmap.

Download the installer from here.  Differences between v1.2.0.117 and v1.2.0.114 below.

UPDATE: v1.2.0.117 replaces v1.2.0.114 SP1

  • FEATURE: French translation added.

  • FEATURE: Double clicking on an item in the list view opens the link in a new browser tab.

  • FIXED: In certain situations RSS Bandit crashes with the following error message 'StartMainGui() exiting main event loop on exception.'

  • FIXED: Mouse wheel now supported in embedded Web browser pane.

  • FIXED: Changing the maximum item age for a feed does not refresh the feed and download old items still available in the feed.

  • FIXED: Synchronizing feed lists caused exceptions if categories were renamed, moved or deleted.

  • FIXED: Feeds that use 302 redirects with relative URIs as the location no longer result in 'Unsupported URI format' errors

  • FIXED: Fetching feeds behind a proxy no longer results in 'The remote server returned an error: (407) Proxy Authentication Required.' when the feed references a DTD

  • FIXED: Duplicate entries when the title of an item changes

  • FIXED: Relative URIs in images and links show up with about:blank as their base URI for certain XSLT templates.

  • FIXED: Space bar sometimes does not always move to the next unread item

  • FIXED: Environment variables are not accepted within Options|Remote Storage configuration protocol "File Share"

  • FIXED: Toolbars don't remember that their visible state on restart when RSS Bandit closed via system tray context menu

  • FIXED: Feeds returning HTTP 410 status code now disabled automatically and report the error "The requested resource is not longer available"


 

Categories: RSS Bandit

August 30, 2004
@ 04:21 PM

Today I was going to release the RSS Bandit v1.2.0.114 service pack 1. However I will not be able to because even though everything worked fine when testing the application the moment I decided to build the installer and run it for the first time on my machine it crashed. The only difference I could tell was that while testing it I created 'Debug' builds but for the installer I created a 'Release' build. Even more annoying is the exception that occurs. It seems having an empty static constructor is causing a TypeInitializationException but only in 'Release' builds.

I hate this shit. I'll have to look into this when I get back from work this evening.

On the positive side, it looks like the RSS Bandit road map is on schedule. SP1 for v1.2.0.114 is basically done once I can track down the TypeInitializationException issue and then an installer should show up shortly afterwards. We've started the refactorings needed for NNTP support this weekend and should be done later this week. It's funny, I used to think the code was well factored because the infrastructure for supporting multiple  syndication formats was straightforward and flexible. Then supporting NNTP comes along and a lot of the assumptions we made in the code need to be thrown out of the Window.


 

Categories: Ramblings | Technology

August 28, 2004
@ 03:52 PM

According to the Microsoft press release Microsoft Announces 2006 Target Date for Broad Availability Of Windows "Longhorn" Client Operating System

Microsoft will deliver a Windows storage subsystem, code-named "WinFS," after the "Longhorn" release. The new storage system provides advanced data organization and management capabilities and will be in beta testing when the "Longhorn" client becomes available.

"We’ve heard loud and clear from customers that they want improved productivity, easier deployment, increased reliability and enhanced security, as well as the many innovations we’ve been working on. We’ve had to make some trade-offs to deliver the features corporate customers, consumers and OEMs are asking for in a reasonable time frame," said Jim Allchin, group vice president of the Platforms Group at Microsoft. "Our long-term vision for the Windows platform remains the same."
...
At a meeting today with several hundred of the company’s top developer evangelists from around the world, Microsoft also announced that the Windows WinFX developer technologies, including the new presentation subsystem code-named "Avalon" and the new communication subsystem code-named Indigo, will be made available for Microsoft® Windows XP and Windows Server 2003 in 2006. This availability will expand the scope of opportunity for developers by enabling them to write applications that can run on hundreds of millions of PCs, resulting in enhanced experiences for users of those operating systems.

I'm happy about this decision, but the cynic in me is thinking "better late than never". This has been an instructive experience in learning how long it takes information to go from the front lines to the ones pulling the strings in the B0rg cube.  And how long it takes folks to act on this information.


 

Categories: Life in the B0rg Cube

A few months ago in Joel Spolsky's  How Microsoft Lost the API War  he wrote

There are two opposing forces inside Microsoft, which I will refer to, somewhat tongue-in-cheek, as The Raymond Chen Camp and The MSDN Magazine Camp.
...
The Raymond Chen Camp believes in making things easy for developers by making it easy to write once and run anywhere (well, on any Windows box). The MSDN Magazine Camp believes in making things easy for developers by giving them really powerful chunks of code which they can leverage, if they are willing to pay the price of incredibly complicated deployment and installation headaches, not to mention the huge learning curve. The Raymond Chen camp is all about consolidation. Please, don't make things any worse, let's just keep making what we already have still work. The MSDN Magazine Camp needs to keep churning out new gigantic pieces of technology that nobody can keep up with.

When I first read the above paragraphs I disagreed with them because I was in denial. But as the months have passed and I've looked at various decisions my team has made in recent years I see the pattern. The patterns repeats itself in the actions of other product teams and divisions at Microsoft. I know realize this is an unfortunate and poisonous aspect of Microsoft's culture which doesn't work in the best interest of our customers. A few months ago I found some advice given to Ward Cunningham on joining Microsoft which read

 Take a running start and don't look back

  1. Recognize that your wonderful inventiveness is the most valuable thing you will own in a culture that values its employees solely by their latest contributions. In a spartan culture like this, you will rise quickly.

  2. Keep spewing ideas, even when those ideas are repeatedly misunderstood, implemented poorly, and excised from products for reasons that have nothing to do with the quality of the idea. When you give up on communicating your new ideas, you will just go insane waiting to vest.

The Microsoft culture is about creating the newest, latest greatest thing that 'changes the world' not improving what is already out there and working for customers. When I read various Microsoft blogs and MSDN headlines about how even though we've made paradigm shifts in developer technologies in the recent years we aren't satisfied and want to introduce radically new and different technologies all over again. This bothers me. I hate the fact that 'you have to rewrite a lot of your code' is a common answer to questions a customer might ask about how to leverage new or upcoming functionality in a developer technology.

Our team [and myself directly] has gone through a process of rethinking a number of decisions we made in this light. Up until very recently we were planning to ship the System.Xml.XPath.XPathDocument class as a replacement for the System.Xml.XmlDocument class. One of the driving reasons for doing this was XPath and XSLT performance. The mismatch between the DOM data model and that of XPath meant that XPath queries or XSLT transformations over the XmlDocument would never be as fast as XPathDocument. Another reason we were doing this was that since the XmlDocument is not an interface based design there isn't a way for people who implement their own XML document-like classes to plug-in to our world. So we decided to de-emphasize (but not deprecate) the XmlDocument by not adding any new functionality or performance improvements to it and focused all our energy on XPathDocument.

The problem was that the XPathDocument had a radically different programming model than the XmlDocument meaning that anyone who'd written code using the XmlDocument against our v1.0/v1.1 bits would have to radically rewrite their code to get performance improvements and new features. Additionally any developers migrating to the .NET Framework from native code (MSXML) or from the Java world would already be familiar with the XML DOM API but not the cursor-based model used by the XPathDocument. This was really an untenable situation. For this reason we've reverted the XPathDocument to what it was in v1.1 while new functionality and perf improvements will be made to the XmlDocument. Similarly we will keep the new and improved XPathEditableNavigator XPathNavigator class which will be the API for programming against XML data sources where one wants to abstract away what the underlying store actually is. We've shown the power of this model with examples such as the ObjectXPathNavigator and the DataSetNavigator.

It's good to be back in the Raymond Chen camp.


 

Categories: Life in the B0rg Cube | XML

From a Sports Ilustrated Article entitled Iraqi soccer players angered by Bush campaign ads 

Afterward, Sadir had a message for U.S. president George W. Bush, who is using the Iraqi Olympic team in his latest re-election campaign advertisements. In those spots, the flags of Iraq and Afghanistan appear as a narrator says, "At this Olympics there will be two more free nations -- and two fewer terrorist regimes."

(To see the ad, click here.)

"Iraq as a team does not want Mr. Bush to use us for the presidential campaign," Sadir told SI.com through a translator, speaking calmly and directly. "He can find another way to advertise himself."

Ahmed Manajid, who played as a midfielder on Wednesday, had an even stronger response when asked about Bush's TV advertisement. "How will he meet his god having slaughtered so many men and women?" Manajid told me. "He has committed so many crimes."

"The ad simply talks about President Bush's optimism and how democracy has triumphed over terror," said Scott Stanzel, a spokesperson for Bush's campaign. "Twenty-five million people in Iraq are free as a result of the actions of the coalition."

To a man, members of the Iraqi Olympic delegation say they are glad that former Olympic committee head Uday Hussein, who was responsible for the serial torture of Iraqi athletes and was killed four months after the U.S.-led coalition invaded Iraq in March 2003, is no longer in power.

But they also find it offensive that Bush is using Iraq for his own gain when they do not support his administration's actions. "My problems are not with the American people," says Iraqi soccer coach Adnan Hamad. "They are with what America has done in Iraq: destroy everything. The American army has killed so many people in Iraq. What is freedom when I go to the [national] stadium and there are shootings on the road?"

I find the We had to destroy the village to save it mentality an interesting and perhaps uniquely American perspective.  Based on some of the comments in my post So Why Are You Voting For George W Bush? it seems there are still people who feel the financial and human cost of the war in Iraq was worth it both for selfish reasons (it distracts Islamic terrorists who'd probably be focusing on attacking the American mainland) and for the fact that the war has made the Iraqi people "better off" despite the fact that many of them have gone from living in a relatively stable country to living in a bombed out warzone. This is a very interesting peek into the American psyche.

UPDATE: Based on some of the comments to this entry I decided to further clarify what I find so interesting. After it became clear that there were no WMDs in Iraq or strong ties to Al-Qaeda and 9/11 the reaction to this from the Bush Administration and American people could have been regret and sorrow (”I can't believe we killed thousands of civilians and spent billions of dollars without just cause”). Instead the Bush administration and certain portions of the American public instead have have reacted by stating that this invasion is actually good for Iraq and America should be commended for rescuing the Iraqi people. The reaction and the mentality behind it aren't what I'd expect after such a significant folly. Of course, history will be the judge of whether the current belief that America's interventions in Afghanistan and Iraq will improve the lives of the people of these nations for future generations.


 

August 22, 2004
@ 03:30 AM

Every once in a while I like to post a list of articles I'm either in the process of writing or considering writing to get feedback from people on what they'd like to see or whether the topics are even worthwhile. Below is a list of the next couple of articles I'm either in the process of writing or plan to write over the next few months.

  1. An Introduction to Validating XML Documents with Schematron (MSDN) : An introduction to Schematron including examples showing how one can augment a W3C XML Schema document using Schematron thus creating an extremely powerful XML schema language.  Code samples will use Schematron.NET

  2. Designing XML Formats: Versioning vs. Extensibility (XML 2004 Conference) : This is the presentation and paper for my XML 2004 talk. It will basically be the ideas in my article On Designing Extensible, Versionable XML Formats with more examples and less fluff.

  3. The XML Litmus Test - Deciding When and Why To Use XML (MSDN) : After seeing more and more people at work who seem to not understand what XML is good for or what the decision making process should be for adopting XML I decided to put this article together.  This will basically be an amalgamation of my XML Litmus Test blog post and my Understanding XML article on MSDN.  

  4. XML in Cw (XML.com)  : An overview of the XML based features of Cw. The Cw type system contains several constructs that reduce the impedance mismatch between OO and XSD by introducing concepts such as anonymous types, choices [aka union types], nullable types and constructing classes from XML literals into the .NET world. The ability to process such strongly typed XML objects using rich query constructs based on SQL's select operator will also be covered.

  5. A Comparison of Microsoft's C# Programming Language to Sun Microsystems' Java Programming Language 2nd edition : About 3 years ago I wrote a C# vs. Java comparison while I was still in school which has become the most popular comparison of both languages on the Web. I still get mail on a semi-regular basis from people who've been able to transition between both languages due to the information in my comparison document. I plan to update this article to reflect the proposed changes announced in Java 1.5 and C# 2.0

On top of this I've been approached twice in the past few months about writing a technology book. Based on watching the experiences of others my gut feel is that it isn't worth the effort. I'd be interested in any feedback on the above article ideas or even suggestions for new articles that you'd be interested in seeing on MSDN or XML.com from me.


 

Categories: Technology | XML

August 22, 2004
@ 02:53 AM

It seems a number of people are now using RSS Bandit v1.2.0.114 SP1 release candidate 1 and so far it doesn't seem like we've gotten any reports of crashing related to opening new browser tabs which plagued v1.2.0.114. However there are some bugs, in changing the feed parsing code to use less memory I ended up introducing a bug where Atom 0.3 feeds are no longer updated. This bug has since been fixed along with a few others. Torsten and I will likely produce a release candidate 2 next weekend.

The progress on the Wolverine release is slow and steady. We recently had to reorganize the code due to my pending addition of NNTP support to make the names and behaviors of certain internal classes less focused on RSS and more on processing news items be they RSS items, Atom entries or USENET posts. I should be checking in the infrastructure for NNTP support by the middle of next week. Once that is done the next major piece of work will be adding the ability to delete posts which is made trickier by the fact that we have to make sure that information is passed along when synchronizing instances of RSS Bandit. 

Now that Hotmail has begun to deliver on the announced 250MB of space for free users it is seeming more and more attractive to add Hotmail as a synchronization source for RSS Bandit users. It would be very cool if all you had to do was enter your Hotmail username and password then RSS Bandit simply used one of your Hotmail folders for synchronizing between instances without requiring you to setup an FTP or WebDAV server as is currently needed. I've talked to some people who work in the MSN/Passport part of MSFT such as Omar Shahine, Joshua Allen and Julien Couvreur about the feasibility of using Hotmail in this way from a .NET Framework application. They all implied it won't be easy. Since I spoke to them I've found an an article about talking to Hotmail from C# and a spec for the HTTPMail protocol which Outlook Express uses to talk to Hotmail. It probably won't be easy but it doesn't look like it'll be too hard either.

Back to coding.


 

Categories: RSS Bandit