Monday, July 02, 2007

Third-Party LINQ Implementations Update

LINQ to SharePoint

As promised, Bart De Smet has released the LINQ to SharePoint 0.2.0.0 Alpha for download from CodePlex with the following features:

  • SpMetal tool for SharePoint list entity creation
  • LINQ query provider for runtime LINQ query-to-CAML translation
  • A set of unit tests
  • Debugger visualizer for LINQ to SharePoint queries
  • Support for both C# 3.0 and VB 9.0

SharePoint Mapping Language

Bart's working on a major update to SpMetal.exe for Alpha version 0.3. He says:

However, there's more than just a new back-end to SpMetal. The cool thing about it is its potential for reuse elsewhere, including the VS 2008 IDE. Over time, the goal is to provide entity creation as easy as dragging and dropping lists from an add-in in Server Explorer to a designer surface. We're not there yet, but an important milestone is under development right now: SPML. Designers are just overlays on top of some source definition, for example a partial class with Windows Forms designer generated code or a resx file or ... In a similar way, SPML is the source-side of a SharePoint list mapping for LINQ to SharePoint. Currently it's very minimalistic, but over time it will get more and more expressiveness to drive the mapping process (e.g. you'll be able to decide which fields to include in the entity mapping and you'll be able to control a few aspects associated with entity updating, another 0.3 feature that's under development right now).

Note: For a recent OakLeaf post on LINQ to SharePoint see LINQ to SharePoint 0.2 Alpha to Meet Major WSS 3.0 Template/Apps Surge.

LINQ to Amazon Refactored

Rob Conery a developer from Kauai and the architect of the open-source Commerce Starter Kit for .NET 2.0 and the Subsonic "no-code" data access layer (DAL) has posted LINQ: How To Use LINQ To Query Just About Anything, in which he describes how he's refactoring Fabrice Marguerie's LINQ to Amazon project to .NET 3.5. Along the way, Rob provides one of the better explanations that I've see on expression trees. The IQueryable interface and expression trees enable LINQ to SQL and third-party LINQ implementations. He also includes a pointer to Paul Kimmel's June 28, 2007 Cigars, Lambda Expressions, and .NET article for DevLife that describes anonymous methods, lambda expressions. closures and currying in plain English.

Rob promises that the source code will be available the end of this week. Check his site or here for availability.

Update 8/8/2007: Rob published on August 2 a great LINQ to SQL screencast as SonicCast 6 - LINQ, LinqToSql, and SubSonic. His demo includes a simple technique to remove data source-related code from the page's code-behind file. He's considering adding support for LINQ to SubSonic or replacing its query generator with LINQ. No word so far on source code for his refactoring of Fabrice Marguerie's LINQ to Amazon to Beta 2.

i4o (Indexing for Objects) Article

Aaaron Erickson has written "Indexed LINQ" for .NET Developer's Journal. Subtitiled "Optimizing the performance of LINQ queries using in-memory indexes," the article covers the theory behind creating indexes on in-memory collections and applying an extension method to the Where() standard query operator to enable speeding queries by up to a factor of 100 or so with the indexes. You can download the source code, runtime binary or both for i4o at http://www.codeplex.com/i4o. (Update 8/7/2007)

Third-Party LINQ Providers List

A complete list of third-party LINQ implementations that I update periodically is: Third-Party LINQ Providers.