More on LINQ, XLinq and perspectives.

On XLinq

A lot of the questions about XLinq are around how it will sit beside/replace XQuery (and other XML query/transform techniques). Back when I first started doing some .NET 2.0 training in February, I was a bit miffed that XQuery had not made it into the .NET Framework. Now don't get me wrong, it's not the most elegant thing in the world, but the excuse that “it's not a standard YET, so we can't put it in the framework“ seemed a little insincere given that the SQL team had managed to jump over that hurdle. But given LINQ/XLinq, maybe this now makes sense. We'll have to get our feet wet and see how LINQ evolves over time into a shipping product.

  • Michale Rys gives his thoughts on the relation between XLinq and XQuery. Interestingly he points out that XLinq uses about 30% less memory than the DOM.
  • Mike Champion's thoughts also comparing XLinq to the DOM.
  • Soumitra Sengupta also adds his 2 cents on how XLinq is positioned with the rest of the XML processing technologies.
  • Dave Remy gives some also talks about how XLinq's implementation was from the ground up, but inspired by lessons learned on the back of the DOM.

Other perspectives floating around....

  • On an unrelated note, M. David Peterson has an interesting post from one of his colleagues, with specific mention of comparisons between LINQ, and Haskell.
  • Kent Tegels also shares his first impressions.
  • Paul Wilson has a critical review of DLinq. He rightly questions the “sqlserver only“ aspect of DLinq. I'm hopeful that this is only a temporal condition. Paul also mentions, among other things, poor support for stored procedures in DLinq, but at this point, I'm not convinced that is all too important. I have to think about that some more.
  • Werner Moise has some in depth thoughts.

Some Articles...

  • Infoworld has an interview with Anders.
  • Scott Swigart has an article on VB 9 in Dr. Dobb's with interviews with Paul Vick, Amanda Silver, Erik Meijer, Rob Copeland, Alan Griver, and Jay Roxe.

And if you are at PDC and want to get more information, Don Box is hosting a LINQ Panel discussion tomorrow and he is looking for your questions in his blog comments.

Access VSTS information - from Unix, Mac, and Eclipse with Teamprise

This is often a common push back or at least concern with big shops whom are considering adopting Team Foundation. How do we integrate our Java Developers (or non .NET Developers) into the Zen of Team System?

Enter TeamPrise. This looks like a serious gap filler. On their site you can download a trial that works with the July CTP of the Team Foundation Server. Lastly, TeamPrise is a division of SourceGear.

UPDATE: Also check out devBiz X5 web client - work item tracking via the browser - everybody has been asking for this one, say for example to integrate customer change requests into the team work flow. It doesn't yet seem to allow you to only edit certain types of work item types (they really need that) or to have an external authentication scheme. [Eric Jarvi]

What is the world saying about Microsoft's C# and VB LINQ Project

I have to say that the LINQ syntax in VB hits much closer to the mark than C#. More on that later. What is everybody else saying out there about LINQ?

  • Erik Meijer says that VB has become his “programming language of choice.“
  • Sam Gentile “LINQ is freaking cool“, but he's feeling the beta pain because the VB and C# tech previews work with Beta 2 of 2005 and he just installed the VSTS release candidate.
  • Rédo believes LINQ “will represent a tectonic shift in the way that VB programmers will work with data“.
  • Somasegar believes that LINQ is a signifiicant developer productivity enhancement and he wants to hear your feedback.
  • Sean Chase points out some interesting ideas using lambda expressions with LINQ.
  • Frans Bouma compares DLinq to O/R mappers and points out the negative side of attribute based mapping for use in cross db platform support. There is a good follow up discussion in the comments on that post.
  • Marius Gheorghe likes the LINQ idea, but not so much the implementatio and seems to agree with Frans.
  • OrangeVolt hopes that Sun will adapt this for Java.
  • Ben Galbraith gives his comments on LINQ from a Java perspective. In particular, he's happy to see the type inference feature added to C# and wishes Java could do the same. The comments also contain some interesting discussion on Java and .NET.
  • Over at the SPS Weblog, LINQ is inspiring a Visual FoxPro Object-Oriented SQL. Don't get crazy, he's only got 1 hour of development under his belt.

There is also an interview with Anders Hejlsberg and Paul Vick worth reading. Why does Paul look so much happier than Anders in these photos? No doubt it is the VB syntax simplicity :)

Reflections on the PDC Day 1 Keynote

Bill Gates gave a pretty typical high level keynote to introduce the keynote this morning. He talked about the past, how far we've come, and how now is the most exciting time, and that we are in most exciting industry. Not that I don't disagree, but I swear I've heard this keynote before.

After Bill, a series of VP's and Architect's ran through more product details. Things started to get much more interesting at this point. Chris Capossela gave an end user run down of Windows Vista and Office 12 - which will be both released at the same time near the end of 2006.

The UI is just stunning (as it always is in these demos). It was also nice to see the QuickSearch text box integrated through both products. Not unlike Google Desktop Search, and using the same engine as MSN Desktop Search, the QuickSearch text box gives context sensitive searching through the application. If you're in a document explorer - you can search there for documents. If you are in the start menu, you can easily search for applications (and recent documents). If you are in outlook you can easily search your in-box, contacts, etc. Of course you can do broad computer searches too, but that context is nice.

Chris also showed off Sidebar which isn't really big news, but he also showed the audience Sideshow. Sideshow uses the same dock-able gadgets that Sidebar does, but re-use them on what I can only describe as a built in Pocket PC device that is built into the cabinetry of your laptop. This allows you to check real-time information (email, appointments, etc.) without turning on or booting up your laptop. Expedia had a nice gadget working in Sideshow that showed up to the minute flight status. Nice.

RSS is also taking a prominent position in Vista and Office. An RSS store was announced that would store subscribed RSS feed content. This content would be regularly downloaded automatically, and the content would be available to the Sidebar, Outlook, IE7, and your own applications. Cool.

Office 12 has a new user interface that hopes to make more of its features discoverable. At first glance I wasn't all too excited about this, but I'll reserve my judgment until I play around with it. The quick “wizard“ like features were absolutely stunning though.

The integration with Outlook and Sharepoint is quite impressive. We are all accustomed to having our email/contacts/appointments offline stored in our outlook store. With Office 12, you can keep in sync with any Sharepoint folder to keep those files on your local store. Sweet. Better yet, a special new Sharepoint List for sharing PowerPoint decks. When you upload a PowerPoint file, an item appears in the list for each slide. From within PowerPoint, I can create a new deck, and pull individual slides from the Sharepoint server. You can optionally have it keep that slide up to date so if a new version is uploaded to the server, you'll automatically get it. Corporate plagiarism has just become so much easier.

After Chris's “consumer“ demos, Jim Alchin came out with Don Box, Chris Anderson, Anders Hejlsberg and Scott Guthrie. Jim started by giving some demos of some interesting plumbing bits. One cool thing in Vista is Super Fetch. Super Fetch is a preloaded memory cache of things you'll likely need, but unlike typical hard drive caches, it basis it's decisions on analyzing your behavior over days, weeks, months to determine what an idle machine should be preloading. The second part of his demo tied in very nicely where he showed that any USB Memory Stick could be plugged into a Vista machine and it would automatically start using it for expanded virtual ram. That totally rocks for laptops which can quickly max out their ram capacities.

Don and Anders went on to talk about some big news, namely the Language Integrated Query (LINQ) project. Linq provides a query engine on top of XML, Object and Relational data stores using a common query language reminiscent of SQL. No, this isn't an O/R mapping tool, but you can see how they may have wanted to delay ObjectSpaces until they got Linq out the door. I'll have more on this in my blog in the coming days. Attendees at PDC are getting Linq bits to try out, and don't forget to stop by the track lounge to pick up a copy of a Linq whitepaper. 

Next Don and Chris messed around with Indigo, and they also created a goofy Avalon application. Scott Guthrie came out to show off the Atlas product which is a set of cross browser javascripts and server side ASP.NET 2 controls to make Ajax style programming a snap.

To close out the lengthy presentation, Jim brought out a few other people to demonstrate complete applications to bring up the wow factor, including Microsoft Max and a kiosk application created for the North Face.

UPDATE: Dinesh Kulkarni gives some inside scoop on how ObjectSpaces is dead, or rather morphed into DLinq. It would appear ObjectsSpaces is not something you'll see built down the road on top of Linq.

Download Avalon Indigo Peer to Peer Sample App Project Max

The MicrosoftMax application that was demoed today at PDC is now available for download here.

The application allows you to share and publish photo slide shows using an Indigo Peer to Peer channel. The beautiful presentation layer is provided by Avalon.

Download ATLAS Toolkit for AJAX development on ASP.NET 2.0

The community preview site for ATLAS is now available as announced by Scott Guthrie at today's keynote during the PDC Conference in LA.

Now availalable is:

  • Documentation
  • Hands-On-Lab
  • Quickstart Tutorials
  • Project add-in for Visual Studio 2005 Beta2 (with it's own hands on labs)

UPDATE: Scott Guthrie has code snippets posted from the keynote demo.

Visual Studio and SQL Server 2005 Canadian Launch Dates Announced

Check out the dates for the Canadian Launch Events for Visual Studio 2005 and SQL Server 2005. Don't forget to subscribe to the RSS feed to learn more about when registration opens. I can almost guarantee that these events will be sold out. Did I mention you'll receive a free copy of Visual Studio 2005 and SQL Server 2005 just for showing up?

Visual Studio Team Suite 2005 - Release Candidate Now Available

The VS Team Suite Release Candidate is now available on MSDN Subscriber Downloads. I'm downloading now - I'm assuming you'll also need the Sql Server 2005 September CTP which was also released today. Happy downloading.


Static Code Analysis made easier in VS 2005

The built in Static Code analysis in Visual Studio 2005 is pretty cool, and quit intuitive to use.

There are a couple of nice features worth mentioning that are accessible right from the Error List.

If you come across warnings in your error list put there by the Static Code Analyzer. There are a couple of quick ways to deal with them.

Create a Work Item:
This is a nice way to remind yourself to deal with the issue later. You could even assign the Work Item to someone else so they can deal with it later. :)

I wish you could add a Todo: to the code from here. Sometimes I don't want a Work Item I just want a reminder in my code to fix it up. Maybe next version.

Suppress Message:
If this is not an issue for this particular project or class you can suppress the warning by selecting Suppress Message.

For example if you create an Enum and its members have values 1 - 4 you will get the warning CA1008 Enums should have zero value. For this instance you are knowingly breaking the rule, although you would like to continue to be warned when this happens. When you select Suppress Message from the context menu it will add an attribute to the enum telling the Static Code Analyzer to ignore the rule. If it's a project level rule a new file is created in the project called ModuleSuppressions.cs and attributes will be added to it.

Getting the schema for an XML column in SQL Server 2005

There is no question that the XML column data type in SQL Server 2005 opens up a large number of interesting possibilities. Some that I’ve even been lucky enough to work on myself. In this particular instance, I needed to find out the schema against which a typed XML document will be validated. The idea is to provide some client-side validation for the XML before submitting it to the database server. This doesn’t prevent SQL Server from redoing the validation (there isn’t any way to prevent that from happening that I’ve found), but it does reduce network traffic in the case of bad data.

The problem I faced was that the schema information is not readily apparent. After some digging, the I found that the following SQL will get the string representation of the schema.

SELECT Object_Name(Object_id) [TableName],,, XML_SCHEMA_NAMESPACE(,
   FROM (sys.columns col INNER JOIN sys.xml_schema_collections s ON col.xml_collection_id = s.xml_collection_id)
      JOIN sys.schemas sch on s.schema_id = sch.schema_id
WHERE Object_Name(Object_id) = @TableName 
   AND = @ColumnName

The first two columns are the table and column name. The third column is the name of the schema used for the column. This is the name as found in XML_SCHEMA_COLLECTIONS. The fourth and final column contains the string representation of the schema.