Showing posts with label LINQ to Stored XML. Show all posts
Showing posts with label LINQ to Stored XML. Show all posts

Thursday, January 31, 2008

SD Times' "Does .NET With LINQ Beat Java?" Article Raises More Questions Than It Answers

David Worthington's Does .NET With LINQ Beat Java? Software Development Times article of January 30, 2008 has a snappy head but the article's deck, "Framework's data query capabilities give it an edge, experts claim," appears to be disputed by at least one "expert," namely Jonathan Bruce of DataDirect Technologies (see below.)

Worthington quotes Jonathan as saying:

DataDirect’s Bruce acknowledged that from a productivity point of view, LINQ combined with its tooling gives .NET shops a productivity advantage that the Java community cannot match. He credits Microsoft’s ability to “package [productivity patterns and tooling] all up into something useful."

That said, he noted that LINQ is an unproven technology that is new to the market and said that he could not imagine anyone making corporate bets on LINQ just yet. “On the Java side, data access is rounded and stable. As a technology officer, it is an easier bet to make [on] what will reduce risks from a data perspective,” he explained. [Emphasis added.]

If Bruce "could not imagine anyone making corporate bets on LINQ just yet," why has DataDirect announced their intention to provide EntityClient-enabled ADO.NET data providers for the Entity Framework? Java's "rounded and stable" data access sounds to me like an apologia for the status quo (a.k.a. JDBC).

Apparently, Bruce isn't aware of LINQ to Objects, LINQ to XML, and the widening variety of current third-party LINQ implemetations and upcoming Microsoft versions:

Another example is XQuery, a language designed to query XML data. XQuery, he said, does a better job with data from many venues because of XML’s flexibility. By contrast, he claimed, the current implementation of LINQ is very targeted to what the developer is querying and the ability to “mash up data sources” has not been delivered yet, Bruce explained.

One of LINQ's strong points is it's "ability to 'mash up data sources'." Jon Udell's LINQ 101 post of September 28, 2005 demonstrated a three-way join between an XML data source and two CLR objects with the PDC 2005's LINQ preview. You can now join generic sequences from sets of in-memory objects (LINQ to Objects), XML documents, relational databases (LINQ to SQL and LINQ to Databases), and other domains with LINQ to SharePoint, LINQ to ActiveDirectory, LINQ to Amazon, and LINQ to Streams. If this capability for joining IEnumerable<T> sequences doesn't enable mashups, I don't know what does.

I find LINQ to XML to be a much more approachable and practical method for querying and composing XML Infosets than XQuery and/or XSLT. It's interesting that Microsoft is working on LINQ to Stored XML to supplement or replace its pre-XQuery 1.0 implementation for the SQL Server 2005+ xml data type.

Note: I have some questions about Bruce's prognostications in the "Jonathan Bruce's Data Services and LINQ Crystal Ball Appears a Bit Cloudy" topic of LINQ and Entity Framework Posts for 1/28/2008+.

Tuesday, December 04, 2007

LINQ to XSD Redux and LINQ to Stored XML Coming

LINQ to XSD was a technology spearheaded by Ralf Lämmel while he was a member of Microsoft's Data Programmability/XML Team. He released an alpha version 0.1 for the LINQ to XML CTPs and 0.2 for the Orcas Beta 1 drop. No LINQ to XSD alpha appeared for Orcas Beta 2, probably because Dr. Lämmel returned in July 2007 to Germany to assume a full professorship in the new University of Koblenz-Landau's Computer Science Department.

Updated January 14, 2007: See below.

No one at Microsoft responded to my requests for an update to LINQ to XSD's status, including my following post of November 17, 2007 to the LINQ Project General Forum:

Ralf Lämmel updated his LINQ to XSD implementation that enables strongly-typed LINQ to XML queries from the November 2006 Preview Alpha 0.1 for the May 2006 LINQ CTP to Preview Alpha 0.2 for Orcas Beta 1 on June 5, 2007. Dr. Lämmel then returned to Germany to assume a full professorship in the Department of Computer Sciences of the University of Koblenz (Germany).

There’s been no word from the XML Team that’s responsible for LINQ to XML about an update to LINQ to XSD for the final VS 2008 bits. Hopefully, this very useful LINQ implementation won’t disappear as a result of attention attrition.

Today's LINQ to XSD Story

Out of the blue on December 5, 2007 comes Microsoft's Shyam Pather with his LINQ to XML: Visual Studio 2008, Silverlight, and Beyond presentation at the XML 2007 conference in Boston. Following the usual LINQ to XML in VB 9.0 marketing hype in the abstract, Shyam says:

We will also discuss incubation efforts for a post-Visual Studio 2008 technology, LINQ to XSD, which provides .NET developers with support for typed XML programming. LINQ to XSD contributes to the LINQ project (.NET Language Integrated Query); in particular, LINQ to XSD enhances the previously mentioned LINQ to XML technology that is expected to release in Visual Studio 2008. [Emphasis added.]

You can download the PowerPoint slides for the session here.

Shyam previously participated in the Microsoft-sponsored Interop Round Table & Happy Hour – Development Discussion on Interop and XML, which started at 4:00 PM on December 4, 2007. Douglas Crockford (Yahoo!), Miguel de Icaza (Novell Inc.), Mattew Weier O’Phinney (Zend), Vijay Rajagopalan (Microsoft), and Craig Kitterman (Microsoft) also participated. Vijay's presenting Document Interop: Ecma Office Open XML and OASIS ODF, Enterprise Interop: Identity and XML, Web Interop: Ajax with XML and JSON (with Crockford and O'Phinney).

I wonder why the XML Team and others at Microsoft had nothing to say in its blog about the apparent resurrection of LINQ to XSD. Are these "incubation efforts" secret? A "breaking news" story?

Update 1/14/2007: Hartmut Wilms reviewed Shayam's XML 2007 presentation in this December 5, 2007 InfoQ article: Post-VS 2008-Technology: LINQ to XSD and LINQ to Stored XML.

Background

Ralf posted a series of four articles on typed XML programming in mid- to late-2006:

And released the LINQ to XSD Preview Alpha 0.1 version for the and a LINQ to XSD Overview whitepaper with the last post. Following are my posts after the initial Preview Alpha 0.1 version:

Update 12/5/2007: VB MVP Bill McCarthy posted an interesting suggestion in his LINQ to XSD --> VB can do better! post of December 5, 2007 regarding implementing LINQ to XSD with a schema as a dynamic interface. Ralf discussed VB 9.0 dynamic interface implementation in his Generalized vs. dynamic interfaces post of December 23, 2006:

For instance, dynamic interfaces of some form or another would allow us to carry out XML-data binding very much in the LINQ to XSD manner, but without incurring the cost of extra objects for typed views.

VB 9.0 introduced dynamic interfaces, which Erik Meijer calls "Strong Duck Typing." You'll find an example of a simple dynamic interface implementation as part 11 of the "Overview of Visual Basic 9.0" XML 2005 conference session by Erik, Amanda Silver, and Paul Vick.

Stealth Topic: LINQ Queries Against the SQL Server 2005+ XML Data Source

Missing from the abstract is the topic that many forum participants have asked about: Queries against SQL Server 2005 and later's xml datatype.

Slide 27 introduces Future Work: LINQ to Stored XML whose goal is to "provide strongly-typed LINQ experience over data in XML database columns," which requires "[m]apping from XML schema to classes" and "[q]uery translation from LINQ expressions to [a] server XQuery expression."

Slides 28, 29 and 30 use AdventureWork's Resume table as the data source to:

  • Filter and Project on XML Scalar Attributes
  • Enumerate on Collection Type

Unfortunately, there's no word on when we might expect another alpha or beta of LINQ to SQL for Visual Studio 2008 or an early preview of LINQ to Stored XML.