Sunday, May 04, 2008

LINQ and Entity Framework Posts for 5/1/2008+

Note: This post is updated daily or more frequently, depending on the availability of new articles.

Streaming LINQ Shows Potential for Complex Event Processing

Marc Adler's On Entitlements, Coral8 CCL, SQL, and LINQ post of May 4, 2008 describes difficulties he encountered in when porting an T-SQL query with two inner and two outer joins to Coral8's Continuous Computation Language (CCL) for a financial analysis project. He was able to implement the LINQ equivalent of his T-SQL query in about 10 minutes. His conclusion:

LINQ has a lot of goodness to it. LINQ is pervasive, and all flavors of LINQ are being developed. I can very well imagine that Microsoft is looking at versions of LINQ that could handle streaming data. Right now, I think that it would be fairly easy to hook up LINQ queries in a pipeline that would handle simple queries on streaming data. Adding streaming SQL constructs is very doable.

If Microsoft was to come out with a Streaming LINQ that is available as part of .NET, how would this affect the world of CEP? An immediate casualty might be NEsper.* ... But, longer term, I think that a combination of WCF, Streaming LINQ, and a version of Microsoft Analysis Services that was further geared to real-time streams would be a killer to the rest of the CEP industry.

* NEsper is an Open Source ESP/CEP Engine for .NET. ESP is an abbreviation for Event Stream Processing, which encompasses Complex Event Processing (CEP).

Marc is the technical lead for a CEP project at a major Wall Street investment bank. Entitlements in this post's context refers to persons entitled to view CEP results, not Social Security or Medicare.

In a comment to the post, Jon Riecke, Lead Platform Architect for Aleri, Inc., a CEP software vendor, mentioned that the upcoming 3.0 release of the Aleri Streaming Platform will base its pattern-matching facilities on LINQ syntax.

To find out more about CEP, tune into the Complex Event Processing Blog and Marco on CEP.

P.S. Bart De Smet just posted the final episode of his C# 3.0 Pattern Matching Series: The Return of the Pattern Matcher - Sample Code Available

Added: 5/4/2008 12:30 PDT

Andrew Matthews Updates LINQ to RDF v0.6 to VS 2008

From the How Did I Miss This Department: Andrew (a.k.a. the Wandering Glitch) released LINQ to RDF v0.6 on April 5, 2008. His Announcing LinqToRdf v0.6 post of the same date lists these improvements:]

  • LinqToRdf Designer and VS.NET 2008 extension completely rewritten
  • LinqToRdf Installer now includes the installer of LinqToRdf Designer (at no extra cost)
  • Project and Item templates now installed as part of LinqToRdf Designer
  • Generated object and data properties now get their own EntitySet or EntityRef.
  • Generates LINQ to SQL-style DataContext objects to hide query creation. Much Cleaner.

You can download LINQ to RDF v0.6 from GoogleCode.

Note: I probably missed this because there's no obvious RSS/Atom feed for the Wandering Glitch blog, only a Twitter feed.

Added: 5/4/2008 12:30 PDT

This Nine-Minute Video Gets You Up and Running with the Google App Engine

I received my Invitation to Try Google App Engine on Friday but didn't have time to try deploying my Google App Engine (GAE) SDK desktop test project until today. Fortunately, I found this 09:15 clip by a fast-talking Google Python guru on YouTube.

The clip covers building a simple UI with a Django template that stores messages in the data store and retrieves text messages by author with a GQL query. The segment on deploying the app to GAE starts at about 08:25.

Note: GoogleDevelopers has 122 videos about Google Web services, et al., including the Campfire One release presentation. If you're new to Python and like video tutorials, ShowMeDo is the place to start. Joscha Feth's Google App Engine & eclipse (PyDev) post has fully illustrated instructions for getting code completion with Eclipse, PyDev, and the GAE working.

As time permits, I plan to determine whether GAE is a contender for "data store in the cloud" status and a viable competitor to SQL Server Data Services.

Added: 5/4/2008 12:30 PDT

Colin Meek: Composing LINQ to Entities Predicates

In his LINQ to Entities: Combining Predicates post of May 2, 2008, Colin offers three choices to compensate for LINQ's lack of an Or operator when composing predicates:

  1. Chain Unions instead of Where clauses, which is inefficient.
  2. Build the predicate by hand with ParameterExpression and Expression statements, which is a pain.
  3. Write a utility function called Compose() to implement LINQ to Entities-friendly And and Or builder methods by leveraging the ParameterRebinder implementation of Matt Warren's Expression Visitor from his IQuerable Providers series.

Interesting approach.

Added: 5/3/2008 11:45 PDT

Live Mesh and LINQ to Mesh Updates

Live Mesh Blog and Forum

The Live Mesh Blog has a detailed Behind Live Mesh: How we run cloud services post of April 30, 2008 by dev lead Alex Mallet.

Early Live Mesh adopters don't seem to have found the Live Mesh Forum. It had only 145 users as of May 3, 2008 10:00 PDT.

LINQ to Mesh (From Ori Amiga's Channel9 Video)

The Mesh Operating Environment (MOE) SDK currently has Silverlight, Javascript and desktop C# libraries. (The SDK also supports IronPython, as Ori demonstrated, but not VB.) Unfortunately, the Mesh team won't say when the SDK might be available, other than vague references to PDC 2008.

Here's the sample code for a LINQ to Mesh query against a Mesh object that Ori didn't attempt to execute because of a bug found earlier (~50:00):

Mesh mesh = Mesh.Load(new Uri(@"https://preview/mesh.com"), 
                new NetworkCredential("someone@somewhere.com", "Basic", myCred))

var meshQuery = from meshObject in mesh.CreateQuery<CoreObject>()
                where meshObject.Title == "title"
                orderby meshObject.Title
                select meshObject;

According to Ori at ~51:00, "the query processor can figure out three things:

  1. Which part of the query can execute most efficiently in our back-end storage using fine-grained indices in the cloud and execute that query as close to the data as possible.
  2. In our Mesh Operating Environment, we can keep on processing and linking and querying over that data to answer the question you're asking in the LINQ query.
  3. And you can query over the data in your local machine."

SSDS and Live Mesh

Jamie Thomson's SSDS and Mesh post of May 1, 2008 proposes using Live Mesh to sync SSDS data, perhaps even between two Authorities. Here's the story on potential SSDS and Live Mesh interop:

  • Pablo Castro and the Astoria team are working on a sync model for "Astoria Offline."
  • The SSDS team said they "will support the full EDM/EF/ADO.Net V3 model in due time."
  • Nigel Ellis demonstrated in his Introducing SQL Server Data Services session at MIX08 using the Sync Framework to synchronize vCard contact data between Microsoft Access 2007 and SSDS v1.
  • Francois Ajenstadt, director of project management for SQL Server, said "The goal is to bring the API's between SSDS and Astoria closer together closer to Release."
  • Ari Amiga says the Mesh team has been "working a lot with the Astoria team to make sure that our query syntax is the same, our URL syntax is the same, so it all looks nice and beautiful."
  • Astoria now uses, Mesh supports and SSDS will support the Atom Publication Protocol (AtomPub).

Added: 5/3/2008 10:30 PDT

ADO.NET Data Services Article in Visual Studio Magazine

My "Manipulate Data in the Cloud with ADO.NET [Data Services]" is the cover story for Visual Studio Magazine's May 2008 issue. Here's the deck:

ADO.NET Data Services (formerly code-named "Project Astoria") delivers data from relational tables and Windows Live services to Web mashups and Visual Studio 2008 projects, including ASP.NET AJAX and Silverlight 2.0 rich Internet applications, as Representational State Transfer (REST) resources over HTTP in response to URI-based requests or LINQ to REST queries.

Mesh Connection: At about 50:00 into the Ori Amiga: Programming the Mesh Channel 9 video segment of April 24, 2008 Ori mentions that the Mesh team is working with the Astoria folks to make sure their query and URL syntaxes are the same.

Related Topics: John Udell suggests taking advantage of Astoria's record-level URL addressability to implement loosely-coupled collaborative list-making in his Stonewall Farm, Darby Brook Farm, and the collaborative curation of data post of May 2, 2008. Because of its flexible entity feature (ad-hoc addition of attributes to an entity) SQL Server Data Services might be even a better choice when the SSDS team enables offering public read-only access to a container.

Moved: 5/3/2008 to Manipulate Data in the Cloud with ADO.NET [Data Services] due to length.

Kevin Hoffman Releases Continuous LINQ (CLINQ) v.1.1

According to Kevin's CLINQ v1.1.0.0 Released! post of May 2, 2008, CLINQ 1.1 now includes:

  • Support for Continuous Aggregation. Now, in addition to being able to have your result sets automatically update themselves in response to changes in the source set as well as changes to items in the source set, you can have aggregate scalar values that continuously update in the same fashion. The following is a list of the supported aggregation types that can now be done continuously:
    • Average
    • Min
    • Max
    • Sum
    • Standard Deviation
    • Count
  • Brand new demo application. This demo application not only shows off the power of continuous queries and WPF data binding, but also shows you how to use continuous aggregates, create your own continuous aggregates, and how to databind a WPF GUI to a continuous aggregate value.
His post has a screen shot of the Stock Monitor demo application in action.

Added: 5/2/2008 10:30 PDT

Jeff Currier Wants Questions to Address in SSDS Best Practices Tech*Ed Session

Jeff says in his Speaking at TechEd post of May 1, 2008:

I'm heading down to Orlando in a couple of weeks to give a talk about best practices when it comes to SSDS.  I'm working on my talk outline and was curious if there were any topics in particular that the community wanted to hear about in the talk?

I've posted my topics in a comment.

Jeff's session is "Best Practices in Building Applications with Microsoft SQL Server Data Services," which has the following description:

This interactive session provides a hands-on roadmap for developing and managing applications that use Microsoft SQL Server Data Services (SSDS), details best coding practices, and answers questions related to using on-demand storage services for business solutions.

This appears to be the sole SSDS session at Tech*Ed 2008.

Added: 5/2/2008 10:00 PDT

Popularity of SaaS/PaaS and Web Services/SOA Gain 1% Over 2006 According to McKinsey/Sandhill Survey

This 19-page Enterprise Software Customer Survey 2008 report by consultants McKinsey & Co. and Sandhill Partners finds that:

Innovation in the software industry is on the upswing, with Software as a Service (SaaS) being a key driver. The SaaS model is becoming mainstream and this has led to the rise of a new generation of SaaS platforms (also referred to in the industry as Platform as a Service – PaaS).

The distribution of 857 responses to "Please select the most important trend impacting your business" are shown in the following table for 2006 and 2008:

Most Important Trend, Percent 2006 2008
SaaS/SaaS or PaaS Platform 30 31
Web Services/Service Oriented Architecture 24 25
Open Source 10 8
Offshoring/Globalization 15 13
Software Industry Consolidation 17 7
Others 4 16

A detailed analysis of SaaS/PaaS platforms, which include "cloud computing" starts on page 5. Page 6 concludes:

The momentum toward adoption of SaaS platforms is surprising. Nearly three-quarters of the companies surveyed prefer to adopt platforms in at least one of the three archetypes we identify here.

For platform vendors, the only falloff in interest comes at the largest enterprises, those employing more than 25,000 people. In short, nearly every company – or division of a larger enterprise – is a customer or a prospect for SaaS platforms.

Exhibits on pages 6 - 9 provide additional details on interest in various models SaaS/PaaS models.

BEA's Understanding the Cloud Computing/SaaS/PaaS markets: a Map of the Players in the Industry post of May 2, 2008 by Peter Laird and Kent Dickson has clear definitions of cloud computing, SaaS, PaaS, and Core Cloud Services, as well as a map and list of major players with links to their sites.

Added: 5/2/2008 11:30 PST

SSDS Finally Provisioning Private Beta Users at a Faster Pace

KellyAlt says in Onboarding early beta customers of May 2, 2008:

Over the past 4 weeks, we have been onboarding customers slowly.  Since the response to our restricted beta invitation was quite overwhelming, quite a few of you will experience some delays in getting an account.  The SSDS team is doing everything possible to get you onboarded as soon as possible.  I am happy to say that I am seeing the pace pick up a bit over the last week.

I've been working with SSDS for about three weeks and have written a WinForm test harness to give SSDS v1 a thorough workout. Here's the UI when using the REST protocol to upload a Northwind Employee entity with a base64Binary-encoded bitmap:

Watch for my "Test-Drive SQL Server Data Services" feature article coming in the July 2008 issue of Visual Studio Magazine, which will include complete C# source code for the test harness.

Added: 5/2/2008 08:30 PDT

Ryan Dunn Interviews Tudor Toma and Soumitra Sangupta About the Business Value of SSDS

In Channel9's Tudor Toma and Soumitra Sengupta: SQL Server Data Services Business Value segment of May 1, 2008 (28:19):

Ryan sits down and talks with the Group Program Manager Tudor Toma and Architect Soumitra Sengupta about the business value of SSDS.

Added: 5/1/2008 17:00 PDT

David DeWinter Adapts T4 Templates to Generate T-SQL Stored Procedure Scripts for Entity Data Models

The Text Template Transformation Toolkit (commonly called T4) is a free Microsoft code generation engine for VS 2005 and later that supports their Domain Specific Languages and Software Factories toolkits. The Hilton Giesenow and Oleg Sych blogs have posts about T4.

David's Entity Framework Stored Procedure Generation post of April 26, 2008 describes the template:

The T4 template we created is designed to be a general purpose way to generate CUD procedures for an Entity Framework model. ...

The template not only generates EF-compliant sprocs, but it also considers only the tables that are in the SSDL of the model file. Unfortunately, the template must query the database (SQL Server 2005 only!) in order to make all the decisions necessary to create the output file. However, this is usually quite fast on generations other than the first one.

The template would have been a big time saver when I wrote 40+ stored procedures for my forthcoming book's test project.

Added: 5/1/2008 13:40 PDT

Rick Strahl Posts LINQ to SQL and WCF JSON/REST Samples from His ASP.NET Connections Presentations

Rick's ASP.NET Connections Slides and Samples Posted item of May 1, 2008 provides links to sample code and PowerPoint slides from his three presentations at the ASP.NET Connections conference in Orlando. Following are Rick's abstracts of the sessions:

Building a LINQ to SQL Business Layer for ASP.NET Applications

LINQ to SQL - although completely object based, is still little more than a sophisticated data access layer and so a business object layer is still needed to abstract business logic and provide common functionality that every business related entity requires. The business layer provides a few high level abstractions to the CRUD layer as well as a host of low level features that allow better control for low level data access in case LINQ to SQL queries are ill suited for queries and operations that cannot be performed with LINQ to SQL at all.

This session and its sample code is the culmination of Rick's extensive writing about LINQ to SQL in enterprise-grade projects.

WCF 3.5 JSON and REST Services

WCF 3.5's AJAX support has been made nearly as easy and comprehensive as ASMX functionality and there are many options of how data can be accessed over HTTP now with official protocol support for the webHttpBinding. This session starts of with examples of pure REST URLS and demonstrates features like URL templating, different response formats (wrapped, bare, XML, JSON) as well as the various different options for serving in this fashion. There are also examples of serving up raw data such as images or HTML content out of the REST based API. The remainder of the session focuses on AJAX functionality and explores different ways that WCF services can be called.

If you're interested in ADO.NET Data Objects, which support WCF JSON and REST protocols, don't miss this session.

Ajax Alternatives: Using jQuery with ASP.NET

Off-topic for this blog, but very interesting if you're into AJAX.

Note: Slides are the last file in the ZIP containers.

Frans Bouma Adds LINQ to SQL Refactoring and ASP.NET Dynamic Data Support to LLBLGen Pro

LLBLGen Pro has its own native LINQ implementation, but Frans announces in his Linq to Sql support added to LLBLGen Pro post of May 1, 2008 that latest version (2.6 beta) of LLBLGen Pro includes templates for generating LINQ to SQL classes and mapping (*.dbml) files.

This means you can use LLBLGen Pro's code generator to update your LINQ to SQL data model from SQL Server metadata automatically. Microsoft's LINQ to SQL implementation requires manually updating the data model for schema changes. (ADO.NET Entity Framework's Model Browser has an Update Model from Database context menu command.)

Frans says, "The only downside is that you can't update your model in the Linq to Sql designer anymore. But, why would you?"

LLBLGen Pro ASP.NET Dynamic Data Support

Frans' Dynamic Data and 3rd party o/r mappers is a fact post of May 1, 2008 describes how he convinced Scott Guthrie to open ASP.NET Dynamic Data products to third-party object/relational mapping (O/RM) tools, which in turn enables substituting LLBLGen Pro for LINQ to SQL or Entity Framework.

Steele Price Finds LINQ to SQL Frustrating

In his Some of my frustrations with Linq to Sql post of May 1, 2008, Steel Price complains about:

  • Duplication of the "one" object of a many:one association (such as a Customer for a new Order) with the InsertOnSubmit() method if the entity has both an ID field and association.
  • Lack of a method of assuring that deletions precede insertions with multiple updates to the DataContext.
  • Loading an Association does not automatically set the ID if that field is also in the map.

These are legitimate issues that the LINQ to SQL team should fix in VS 2008 SP1.

LINQ to SQLite Accepted as a Google Summer of Code Project

Kevin Kubasik, who wrote a fledgling LINQ to SQLite provider, reports in his Mono GSOC Projects: Linq to SQLite post of May 1, 2008 that he "noticed that one of the accepted proposals for the Mono project is to create a LINQ provider for SQLite."

This project appears to be related to the "Linq to SQL for open source databases" topic of Mono's Student Projects page and is listed in Current Projects on Google Code's Mono Project page.

An Open Source Project for a SQLMetal.exe and SQL Server Compact Edition 3.5 UI

LINQ to SQL's graphic designer doesn't support SQL Server Compact Edition (SSCE) 3.5, so you must use the SQLMetal.exe command-line tool to create LINQ to SQL classes for *.sdf database files.

J. Torres has started a open source project on CodePlex to create a front end for SQLMetal.exe that's compatible with SSCE 3.5.

However, it's a good bet that SSCE 3.5 support will be included in VS 2008 SP1, so the project might have a short shelf life.

Derek Whittaker Explains How to Group LINQ to SQL Sequences on Multiple Columns

Derek explains in his Multi-Column Grouping with Linq2Sql post of April 30, 2008 how to write the LINQ to SQL equivalent of the following T-SQL query.

SELECT  COUNT(*) AS Count,   
        cs.SendID,   
        cs.Name AS SendName,   
        cts.ListID,   
        cts.ListName,   
        ctom.EmailAddress   
FROM    CampaignTrackingOpenedMail AS ctom   
        INNER JOIN CampaignTrackingSummary AS cts    
            ON ctom.CampaignTrackingSummaryID = cts.[ID]   
        INNER JOIN CampaignSend AS cs    
            ON cts.SendID = cs.SendID   
GROUP BY cs.SendID,   
        cs.Name,   
        cts.ListID,   
        cts.ListName,   
        ctom.EmailAddress  

The translation isn't obvious.

Alex James Starts a Fantasy Football Project with Entity Framework as the Data Source

Back in late March, Alex published his Statement of Intent:

I'm going to start creating 'real world' applications using the Entity Framework, and I'm going to blog about all the tradeoffs I make, the hoops I have to jump through, the gotcha's I encounter, the workarounds, the design considerations etc.

In Real world App - Part 1 - Choosing an Application of April 30, 2008, Alex decides on Fantasy Soccer (a.k.a. Fantasy Football).

In Fantasy Soccer - Part 2 - an overview of the rules of May 1, 2008, Alex says:

At this stage only one thing is certain, it will use the Entity Framework for data access.

Fantasy Soccer - part 3 - Unit of Measure of May 3, 2008 discusses using the Entity Data Model's ComplexProperty feature to handle issues with English versus metric measurements and using a helper class to enable sorting by a scaled value, such as weight in lbs. or kg. (Stones for en-uk?>

Updated: May 3, 2008

The clip covers building a simple UI with a Django template that stores messages in the data store and retrieves text messages by author with a GQL query. The segment on deploying the app to GAE starts at about 08:25.

Note: GoogleDevelopers has 122 videos about Google Web services, et al., including the Campfire One release presentation. If you're new to Python and like video tutorials, ShowMeDo is the place to start. Joscha Feth's Google App Engine & eclipse (PyDev) post has fully illustrated instructions for getting code completion with Eclipse, PyDev, and the GAE working.

As time permits, I plan to determine whether GAE is a contender for "data store in the cloud" status and a viable competitor to SQL Server Data Services.

Added: 5/4/2008 12:30 PDT

Colin Meek: Composing LINQ to Entities Predicates

In his LINQ to Entities: Combining Predicates post of May 2, 2008, Colin offers three choices to compensate for LINQ's lack of an Or operator when composing predicates:

  1. Chain Unions instead of Where clauses, which is inefficient.
  2. Build the predicate by hand with ParameterExpression and Expression statements, which is a pain.
  3. Write a utility function called Compose() to implement LINQ to Entities-friendly And and Or builder methods by leveraging the ParameterRebinder implementation of Matt Warren's Expression Visitor from his IQuerable Providers series.

Interesting approach.

Added: 5/3/2008 11:45 PDT

Live Mesh and LINQ to Mesh Updates

Live Mesh Blog and Forum

The Live Mesh Blog has a detailed Behind Live Mesh: How we run cloud services post of April 30, 2008 by dev lead Alex Mallet.

Early Live Mesh adopters don't seem to have found the Live Mesh Forum. It had only 145 users as of May 3, 2008 10:00 PDT.

LINQ to Mesh (From Ori Amiga's Channel9 Video)

The Mesh Operating Environment (MOE) SDK currently has Silverlight, Javascript and desktop C# libraries. (The SDK also supports IronPython, as Ori demonstrated, but not VB.) Unfortunately, the Mesh team won't say when the SDK might be available, other than vague references to PDC 2008.

Here's the sample code for a LINQ to Mesh query against a Mesh object that Ori didn't attempt to execute because of a bug found earlier (~50:00):

Mesh mesh = Mesh.Load(new Uri(@"https://preview/mesh.com"), 
                new NetworkCredential("someone@somewhere.com", "Basic", myCred))

var meshQuery = from meshObject in mesh.CreateQuery<CoreObject>()
                where meshObject.Title == "title"
                orderby meshObject.Title
                select meshObject;

According to Ori at ~51:00, "the query processor can figure out three things:

  1. Which part of the query can execute most efficiently in our back-end storage using fine-grained indices in the cloud and execute that query as close to the data as possible.
  2. In our Mesh Operating Environment, we can keep on processing and linking and querying over that data to answer the question you're asking in the LINQ query.
  3. And you can query over the data in your local machine."

SSDS and Live Mesh

Jamie Thomson's SSDS and Mesh post of May 1, 2008 proposes using Live Mesh to sync SSDS data, perhaps even between two Authorities. Here's the story on potential SSDS and Live Mesh interop:

  • Pablo Castro and the Astoria team are working on a sync model for "Astoria Offline."
  • The SSDS team said they "will support the full EDM/EF/ADO.Net V3 model in due time."
  • Nigel Ellis demonstrated in his Introducing SQL Server Data Services session at MIX08 using the Sync Framework to synchronize vCard contact data between Microsoft Access 2007 and SSDS v1.
  • Francois Ajenstadt, director of project management for SQL Server, said "The goal is to bring the API's between SSDS and Astoria closer together closer to Release."
  • Ari Amiga says the Mesh team has been "working a lot with the Astoria team to make sure that our query syntax is the same, our URL syntax is the same, so it all looks nice and beautiful."
  • Astoria now uses, Mesh supports and SSDS will support the Atom Publication Protocol (AtomPub).

Added: 5/3/2008 10:30 PDT

ADO.NET Data Services Article in Visual Studio Magazine

My "Manipulate Data in the Cloud with ADO.NET [Data Services]" is the cover story for Visual Studio Magazine's May 2008 issue. Here's the deck:

ADO.NET Data Services (formerly code-named "Project Astoria") delivers data from relational tables and Windows Live services to Web mashups and Visual Studio 2008 projects, including ASP.NET AJAX and Silverlight 2.0 rich Internet applications, as Representational State Transfer (REST) resources over HTTP in response to URI-based requests or LINQ to REST queries.

Mesh Connection: At about 50:00 into the Ori Amiga: Programming the Mesh Channel 9 video segment of April 24, 2008 Ori mentions that the Mesh team is working with the Astoria folks to make sure their query and URL syntaxes are the same.

Related Topics: John Udell suggests taking advantage of Astoria's record-level URL addressability to implement loosely-coupled collaborative list-making in his Stonewall Farm, Darby Brook Farm, and the collaborative curation of data post of May 2, 2008. Because of its flexible entity feature (ad-hoc addition of attributes to an entity) SQL Server Data Services might be even a better choice when the SSDS team enables offering public read-only access to a container.

Moved: 5/3/2008 to Manipulate Data in the Cloud with ADO.NET [Data Services] due to length.

Kevin Hoffman Releases Continuous LINQ (CLINQ) v.1.1

According to Kevin's CLINQ v1.1.0.0 Released! post of May 2, 2008, CLINQ 1.1 now includes:

  • Support for Continuous Aggregation. Now, in addition to being able to have your result sets automatically update themselves in response to changes in the source set as well as changes to items in the source set, you can have aggregate scalar values that continuously update in the same fashion. The following is a list of the supported aggregation types that can now be done continuously:
    • Average
    • Min
    • Max
    • Sum
    • Standard Deviation
    • Count
  • Brand new demo application. This demo application not only shows off the power of continuous queries and WPF data binding, but also shows you how to use continuous aggregates, create your own continuous aggregates, and how to databind a WPF GUI to a continuous aggregate value.
His post has a screen shot of the Stock Monitor demo application in action.

Added: 5/2/2008 10:30 PDT

Jeff Currier Wants Questions to Address in SSDS Best Practices Tech*Ed Session

Jeff says in his Speaking at TechEd post of May 1, 2008:

I'm heading down to Orlando in a couple of weeks to give a talk about best practices when it comes to SSDS.  I'm working on my talk outline and was curious if there were any topics in particular that the community wanted to hear about in the talk?

I've posted my topics in a comment.

Jeff's session is "Best Practices in Building Applications with Microsoft SQL Server Data Services," which has the following description:

This interactive session provides a hands-on roadmap for developing and managing applications that use Microsoft SQL Server Data Services (SSDS), details best coding practices, and answers questions related to using on-demand storage services for business solutions.

This appears to be the sole SSDS session at Tech*Ed 2008.

Added: 5/2/2008 10:00 PDT

Popularity of SaaS/PaaS and Web Services/SOA Gain 1% Over 2006 According to McKinsey/Sandhill Survey

This 19-page Enterprise Software Customer Survey 2008 report by consultants McKinsey & Co. and Sandhill Partners finds that:

Innovation in the software industry is on the upswing, with Software as a Service (SaaS) being a key driver. The SaaS model is becoming mainstream and this has led to the rise of a new generation of SaaS platforms (also referred to in the industry as Platform as a Service – PaaS).

The distribution of 857 responses to "Please select the most important trend impacting your business" are shown in the following table for 2006 and 2008:

Most Important Trend, Percent 2006 2008
SaaS/SaaS or PaaS Platform 30 31
Web Services/Service Oriented Architecture 24 25
Open Source 10 8
Offshoring/Globalization 15 13
Software Industry Consolidation 17 7
Others 4 16

A detailed analysis of SaaS/PaaS platforms, which include "cloud computing" starts on page 5. Page 6 concludes:

The momentum toward adoption of SaaS platforms is surprising. Nearly three-quarters of the companies surveyed prefer to adopt platforms in at least one of the three archetypes we identify here.

For platform vendors, the only falloff in interest comes at the largest enterprises, those employing more than 25,000 people. In short, nearly every company – or division of a larger enterprise – is a customer or a prospect for SaaS platforms.

Exhibits on pages 6 - 9 provide additional details on interest in various models SaaS/PaaS models.

BEA's Understanding the Cloud Computing/SaaS/PaaS markets: a Map of the Players in the Industry post of May 2, 2008 by Peter Laird and Kent Dickson has clear definitions of cloud computing, SaaS, PaaS, and Core Cloud Services, as well as a map and list of major players with links to their sites.

Added: 5/2/2008 11:30 PST

SSDS Finally Provisioning Private Beta Users at a Faster Pace

KellyAlt says in Onboarding early beta customers of May 2, 2008:

Over the past 4 weeks, we have been onboarding customers slowly.  Since the response to our restricted beta invitation was quite overwhelming, quite a few of you will experience some delays in getting an account.  The SSDS team is doing everything possible to get you onboarded as soon as possible.  I am happy to say that I am seeing the pace pick up a bit over the last week.

I've been working with SSDS for about three weeks and have written a WinForm test harness to give SSDS v1 a thorough workout. Here's the UI when using the REST protocol to upload a Northwind Employee entity with a base64Binary-encoded bitmap:

Watch for my "Test-Drive SQL Server Data Services" feature article coming in the July 2008 issue of Visual Studio Magazine, which will include complete C# source code for the test harness.

Added: 5/2/2008 08:30 PDT

Ryan Dunn Interviews Tudor Toma and Soumitra Sangupta About the Business Value of SSDS

In Channel9's Tudor Toma and Soumitra Sengupta: SQL Server Data Services Business Value segment of May 1, 2008 (28:19):

Ryan sits down and talks with the Group Program Manager Tudor Toma and Architect Soumitra Sengupta about the business value of SSDS.

Added: 5/1/2008 17:00 PDT

David DeWinter Adapts T4 Templates to Generate T-SQL Stored Procedure Scripts for Entity Data Models

The Text Template Transformation Toolkit (commonly called T4) is a free Microsoft code generation engine for VS 2005 and later that supports their Domain Specific Languages and Software Factories toolkits. The Hilton Giesenow and Oleg Sych blogs have posts about T4.

David's Entity Framework Stored Procedure Generation post of April 26, 2008 describes the template:

The T4 template we created is designed to be a general purpose way to generate CUD procedures for an Entity Framework model. ...

The template not only generates EF-compliant sprocs, but it also considers only the tables that are in the SSDL of the model file. Unfortunately, the template must query the database (SQL Server 2005 only!) in order to make all the decisions necessary to create the output file. However, this is usually quite fast on generations other than the first one.

The template would have been a big time saver when I wrote 40+ stored procedures for my forthcoming book's test project.

Added: 5/1/2008 13:40 PDT

Rick Strahl Posts LINQ to SQL and WCF JSON/REST Samples from His ASP.NET Connections Presentations

Rick's ASP.NET Connections Slides and Samples Posted item of May 1, 2008 provides links to sample code and PowerPoint slides from his three presentations at the ASP.NET Connections conference in Orlando. Following are Rick's abstracts of the sessions:

Building a LINQ to SQL Business Layer for ASP.NET Applications

LINQ to SQL - although completely object based, is still little more than a sophisticated data access layer and so a business object layer is still needed to abstract business logic and provide common functionality that every business related entity requires. The business layer provides a few high level abstractions to the CRUD layer as well as a host of low level features that allow better control for low level data access in case LINQ to SQL queries are ill suited for queries and operations that cannot be performed with LINQ to SQL at all.

This session and its sample code is the culmination of Rick's extensive writing about LINQ to SQL in enterprise-grade projects.

WCF 3.5 JSON and REST Services

WCF 3.5's AJAX support has been made nearly as easy and comprehensive as ASMX functionality and there are many options of how data can be accessed over HTTP now with official protocol support for the webHttpBinding. This session starts of with examples of pure REST URLS and demonstrates features like URL templating, different response formats (wrapped, bare, XML, JSON) as well as the various different options for serving in this fashion. There are also examples of serving up raw data such as images or HTML content out of the REST based API. The remainder of the session focuses on AJAX functionality and explores different ways that WCF services can be called.

If you're interested in ADO.NET Data Objects, which support WCF JSON and REST protocols, don't miss this session.

Ajax Alternatives: Using jQuery with ASP.NET

Off-topic for this blog, but very interesting if you're into AJAX.

Note: Slides are the last file in the ZIP containers.

Frans Bouma Adds LINQ to SQL Refactoring and ASP.NET Dynamic Data Support to LLBLGen Pro

LLBLGen Pro has its own native LINQ implementation, but Frans announces in his Linq to Sql support added to LLBLGen Pro post of May 1, 2008 that latest version (2.6 beta) of LLBLGen Pro includes templates for generating LINQ to SQL classes and mapping (*.dbml) files.

This means you can use LLBLGen Pro's code generator to update your LINQ to SQL data model from SQL Server metadata automatically. Microsoft's LINQ to SQL implementation requires manually updating the data model for schema changes. (ADO.NET Entity Framework's Model Browser has an Update Model from Database context menu command.)

Frans says, "The only downside is that you can't update your model in the Linq to Sql designer anymore. But, why would you?"

LLBLGen Pro ASP.NET Dynamic Data Support

Frans' Dynamic Data and 3rd party o/r mappers is a fact post of May 1, 2008 describes how he convinced Scott Guthrie to open ASP.NET Dynamic Data products to third-party object/relational mapping (O/RM) tools, which in turn enables substituting LLBLGen Pro for LINQ to SQL or Entity Framework.

Steele Price Finds LINQ to SQL Frustrating

In his Some of my frustrations with Linq to Sql post of May 1, 2008, Steel Price complains about:

  • Duplication of the "one" object of a many:one association (such as a Customer for a new Order) with the InsertOnSubmit() method if the entity has both an ID field and association.
  • Lack of a method of assuring that deletions precede insertions with multiple updates to the DataContext.
  • Loading an Association does not automatically set the ID if that field is also in the map.

These are legitimate issues that the LINQ to SQL team should fix in VS 2008 SP1.

LINQ to SQLite Accepted as a Google Summer of Code Project

Kevin Kubasik, who wrote a fledgling LINQ to SQLite provider, reports in his Mono GSOC Projects: Linq to SQLite post of May 1, 2008 that he "noticed that one of the accepted proposals for the Mono project is to create a LINQ provider for SQLite."

This project appears to be related to the "Linq to SQL for open source databases" topic of Mono's Student Projects page and is listed in Current Projects on Google Code's Mono Project page.

An Open Source Project for a SQLMetal.exe and SQL Server Compact Edition 3.5 UI

LINQ to SQL's graphic designer doesn't support SQL Server Compact Edition (SSCE) 3.5, so you must use the SQLMetal.exe command-line tool to create LINQ to SQL classes for *.sdf database files.

J. Torres has started a open source project on CodePlex to create a front end for SQLMetal.exe that's compatible with SSCE 3.5.

However, it's a good bet that SSCE 3.5 support will be included in VS 2008 SP1, so the project might have a short shelf life.

Derek Whittaker Explains How to Group LINQ to SQL Sequences on Multiple Columns

Derek explains in his Multi-Column Grouping with Linq2Sql post of April 30, 2008 how to write the LINQ to SQL equivalent of the following T-SQL query.

SELECT  COUNT(*) AS Count,   
        cs.SendID,   
        cs.Name AS SendName,   
        cts.ListID,   
        cts.ListName,   
        ctom.EmailAddress   
FROM    CampaignTrackingOpenedMail AS ctom   
        INNER JOIN CampaignTrackingSummary AS cts    
            ON ctom.CampaignTrackingSummaryID = cts.[ID]   
        INNER JOIN CampaignSend AS cs    
            ON cts.SendID = cs.SendID   
GROUP BY cs.SendID,   
        cs.Name,   
        cts.ListID,   
        cts.ListName,   
        ctom.EmailAddress  

The translation isn't obvious.

Alex James Starts a Fantasy Football Project with Entity Framework as the Data Source

Back in late March, Alex published his Statement of Intent:

I'm going to start creating 'real world' applications using the Entity Framework, and I'm going to blog about all the tradeoffs I make, the hoops I have to jump through, the gotcha's I encounter, the workarounds, the design considerations etc.

In Real world App - Part 1 - Choosing an Application of April 30, 2008, Alex decides on Fantasy Soccer (a.k.a. Fantasy Football).

In Fantasy Soccer - Part 2 - an overview of the rules of May 1, 2008, Alex says:

At this stage only one thing is certain, it will use the Entity Framework for data access.

Fantasy Soccer - part 3 - Unit of Measure of May 3, 2008 discusses using the Entity Data Model's ComplexProperty feature to handle issues with English versus metric measurements and using a helper class to enable sorting by a scaled value, such as weight in lbs. or kg. (Stones for en-uk?>

Updated: May 3, 2008

The clip covers building a simple UI with a Django template that stores messages in the data store and retrieves text messages by author with a GQL query. The segment on deploying the app to GAE starts at about 08:25.

Note: GoogleDevelopers has 122 videos about Google Web services, et al., including the Campfire One release presentation. If you're new to Python and like video tutorials, ShowMeDo is the place to start. Joscha Feth's Google App Engine & eclipse (PyDev) post has fully illustrated instructions for getting code completion with Eclipse, PyDev, and the GAE working.

As time permits, I plan to determine whether GAE is a contender for "data store in the cloud" status and a viable competitor to SQL Server Data Services.

Added: 5/4/2008 12:30 PDT

Colin Meek: Composing LINQ to Entities Predicates

In his LINQ to Entities: Combining Predicates post of May 2, 2008, Colin offers three choices to compensate for LINQ's lack of an Or operator when composing predicates:

  1. Chain Unions instead of Where clauses, which is inefficient.
  2. Build the predicate by hand with ParameterExpression and Expression statements, which is a pain.
  3. Write a utility function called Compose() to implement LINQ to Entities-friendly And and Or builder methods by leveraging the ParameterRebinder implementation of Matt Warren's Expression Visitor from his IQuerable Providers series.

Interesting approach.

Added: 5/3/2008 11:45 PDT

Live Mesh and LINQ to Mesh Updates

Live Mesh Blog and Forum

The Live Mesh Blog has a detailed Behind Live Mesh: How we run cloud services post of April 30, 2008 by dev lead Alex Mallet.

Early Live Mesh adopters don't seem to have found the Live Mesh Forum. It had only 145 users as of May 3, 2008 10:00 PDT.

LINQ to Mesh (From Ori Amiga's Channel9 Video)

The Mesh Operating Environment (MOE) SDK currently has Silverlight, Javascript and desktop C# libraries. (The SDK also supports IronPython, as Ori demonstrated, but not VB.) Unfortunately, the Mesh team won't say when the SDK might be available, other than vague references to PDC 2008.

Here's the sample code for a LINQ to Mesh query against a Mesh object that Ori didn't attempt to execute because of a bug found earlier (~50:00):

Mesh mesh = Mesh.Load(new Uri(@"https://preview/mesh.com"), 
                new NetworkCredential("someone@somewhere.com", "Basic", myCred))

var meshQuery = from meshObject in mesh.CreateQuery<CoreObject>()
                where meshObject.Title == "title"
                orderby meshObject.Title
                select meshObject;

According to Ori at ~51:00, "the query processor can figure out three things:

  1. Which part of the query can execute most efficiently in our back-end storage using fine-grained indices in the cloud and execute that query as close to the data as possible.
  2. In our Mesh Operating Environment, we can keep on processing and linking and querying over that data to answer the question you're asking in the LINQ query.
  3. And you can query over the data in your local machine."

SSDS and Live Mesh

Jamie Thomson's SSDS and Mesh post of May 1, 2008 proposes using Live Mesh to sync SSDS data, perhaps even between two Authorities. Here's the story on potential SSDS and Live Mesh interop:

  • Pablo Castro and the Astoria team are working on a sync model for "Astoria Offline."
  • The SSDS team said they "will support the full EDM/EF/ADO.Net V3 model in due time."
  • Nigel Ellis demonstrated in his Introducing SQL Server Data Services session at MIX08 using the Sync Framework to synchronize vCard contact data between Microsoft Access 2007 and SSDS v1.
  • Francois Ajenstadt, director of project management for SQL Server, said "The goal is to bring the API's between SSDS and Astoria closer together closer to Release."
  • Ari Amiga says the Mesh team has been "working a lot with the Astoria team to make sure that our query syntax is the same, our URL syntax is the same, so it all looks nice and beautiful."
  • Astoria now uses, Mesh supports and SSDS will support the Atom Publication Protocol (AtomPub).

Added: 5/3/2008 10:30 PDT

ADO.NET Data Services Article in Visual Studio Magazine

My "Manipulate Data in the Cloud with ADO.NET [Data Services]" is the cover story for Visual Studio Magazine's May 2008 issue. Here's the deck:

ADO.NET Data Services (formerly code-named "Project Astoria") delivers data from relational tables and Windows Live services to Web mashups and Visual Studio 2008 projects, including ASP.NET AJAX and Silverlight 2.0 rich Internet applications, as Representational State Transfer (REST) resources over HTTP in response to URI-based requests or LINQ to REST queries.

Mesh Connection: At about 50:00 into the Ori Amiga: Programming the Mesh Channel 9 video segment of April 24, 2008 Ori mentions that the Mesh team is working with the Astoria folks to make sure their query and URL syntaxes are the same.

Related Topics: John Udell suggests taking advantage of Astoria's record-level URL addressability to implement loosely-coupled collaborative list-making in his Stonewall Farm, Darby Brook Farm, and the collaborative curation of data post of May 2, 2008. Because of its flexible entity feature (ad-hoc addition of attributes to an entity) SQL Server Data Services might be even a better choice when the SSDS team enables offering public read-only access to a container.

Moved: 5/3/2008 to Manipulate Data in the Cloud with ADO.NET [Data Services] due to length.

Kevin Hoffman Releases Continuous LINQ (CLINQ) v.1.1

According to Kevin's CLINQ v1.1.0.0 Released! post of May 2, 2008, CLINQ 1.1 now includes:

  • Support for Continuous Aggregation. Now, in addition to being able to have your result sets automatically update themselves in response to changes in the source set as well as changes to items in the source set, you can have aggregate scalar values that continuously update in the same fashion. The following is a list of the supported aggregation types that can now be done continuously:
    • Average
    • Min
    • Max
    • Sum
    • Standard Deviation
    • Count
  • Brand new demo application. This demo application not only shows off the power of continuous queries and WPF data binding, but also shows you how to use continuous aggregates, create your own continuous aggregates, and how to databind a WPF GUI to a continuous aggregate value.
His post has a screen shot of the Stock Monitor demo application in action.

Added: 5/2/2008 10:30 PDT

Jeff Currier Wants Questions to Address in SSDS Best Practices Tech*Ed Session

Jeff says in his Speaking at TechEd post of May 1, 2008:

I'm heading down to Orlando in a couple of weeks to give a talk about best practices when it comes to SSDS.  I'm working on my talk outline and was curious if there were any topics in particular that the community wanted to hear about in the talk?

I've posted my topics in a comment.

Jeff's session is "Best Practices in Building Applications with Microsoft SQL Server Data Services," which has the following description:

This interactive session provides a hands-on roadmap for developing and managing applications that use Microsoft SQL Server Data Services (SSDS), details best coding practices, and answers questions related to using on-demand storage services for business solutions.

This appears to be the sole SSDS session at Tech*Ed 2008.

Added: 5/2/2008 10:00 PDT

Popularity of SaaS/PaaS and Web Services/SOA Gain 1% Over 2006 According to McKinsey/Sandhill Survey

This 19-page Enterprise Software Customer Survey 2008 report by consultants McKinsey & Co. and Sandhill Partners finds that:

Innovation in the software industry is on the upswing, with Software as a Service (SaaS) being a key driver. The SaaS model is becoming mainstream and this has led to the rise of a new generation of SaaS platforms (also referred to in the industry as Platform as a Service – PaaS).

The distribution of 857 responses to "Please select the most important trend impacting your business" are shown in the following table for 2006 and 2008:

Most Important Trend, Percent 2006 2008
SaaS/SaaS or PaaS Platform 30 31
Web Services/Service Oriented Architecture 24 25
Open Source 10 8
Offshoring/Globalization 15 13
Software Industry Consolidation 17 7
Others 4 16

A detailed analysis of SaaS/PaaS platforms, which include "cloud computing" starts on page 5. Page 6 concludes:

The momentum toward adoption of SaaS platforms is surprising. Nearly three-quarters of the companies surveyed prefer to adopt platforms in at least one of the three archetypes we identify here.

For platform vendors, the only falloff in interest comes at the largest enterprises, those employing more than 25,000 people. In short, nearly every company – or division of a larger enterprise – is a customer or a prospect for SaaS platforms.

Exhibits on pages 6 - 9 provide additional details on interest in various models SaaS/PaaS models.

BEA's Understanding the Cloud Computing/SaaS/PaaS markets: a Map of the Players in the Industry post of May 2, 2008 by Peter Laird and Kent Dickson has clear definitions of cloud computing, SaaS, PaaS, and Core Cloud Services, as well as a map and list of major players with links to their sites.

Added: 5/2/2008 11:30 PST

SSDS Finally Provisioning Private Beta Users at a Faster Pace

KellyAlt says in Onboarding early beta customers of May 2, 2008:

Over the past 4 weeks, we have been onboarding customers slowly.  Since the response to our restricted beta invitation was quite overwhelming, quite a few of you will experience some delays in getting an account.  The SSDS team is doing everything possible to get you onboarded as soon as possible.  I am happy to say that I am seeing the pace pick up a bit over the last week.

I've been working with SSDS for about three weeks and have written a WinForm test harness to give SSDS v1 a thorough workout. Here's the UI when using the REST protocol to upload a Northwind Employee entity with a base64Binary-encoded bitmap:

Watch for my "Test-Drive SQL Server Data Services" feature article coming in the July 2008 issue of Visual Studio Magazine, which will include complete C# source code for the test harness.

Added: 5/2/2008 08:30 PDT

Ryan Dunn Interviews Tudor Toma and Soumitra Sangupta About the Business Value of SSDS

In Channel9's Tudor Toma and Soumitra Sengupta: SQL Server Data Services Business Value segment of May 1, 2008 (28:19):

Ryan sits down and talks with the Group Program Manager Tudor Toma and Architect Soumitra Sengupta about the business value of SSDS.

Added: 5/1/2008 17:00 PDT

David DeWinter Adapts T4 Templates to Generate T-SQL Stored Procedure Scripts for Entity Data Models

The Text Template Transformation Toolkit (commonly called T4) is a free Microsoft code generation engine for VS 2005 and later that supports their Domain Specific Languages and Software Factories toolkits. The Hilton Giesenow and Oleg Sych blogs have posts about T4.

David's Entity Framework Stored Procedure Generation post of April 26, 2008 describes the template:

The T4 template we created is designed to be a general purpose way to generate CUD procedures for an Entity Framework model. ...

The template not only generates EF-compliant sprocs, but it also considers only the tables that are in the SSDL of the model file. Unfortunately, the template must query the database (SQL Server 2005 only!) in order to make all the decisions necessary to create the output file. However, this is usually quite fast on generations other than the first one.

The template would have been a big time saver when I wrote 40+ stored procedures for my forthcoming book's test project.

Added: 5/1/2008 13:40 PDT

Rick Strahl Posts LINQ to SQL and WCF JSON/REST Samples from His ASP.NET Connections Presentations

Rick's ASP.NET Connections Slides and Samples Posted item of May 1, 2008 provides links to sample code and PowerPoint slides from his three presentations at the ASP.NET Connections conference in Orlando. Following are Rick's abstracts of the sessions:

Building a LINQ to SQL Business Layer for ASP.NET Applications

LINQ to SQL - although completely object based, is still little more than a sophisticated data access layer and so a business object layer is still needed to abstract business logic and provide common functionality that every business related entity requires. The business layer provides a few high level abstractions to the CRUD layer as well as a host of low level features that allow better control for low level data access in case LINQ to SQL queries are ill suited for queries and operations that cannot be performed with LINQ to SQL at all.

This session and its sample code is the culmination of Rick's extensive writing about LINQ to SQL in enterprise-grade projects.

WCF 3.5 JSON and REST Services

WCF 3.5's AJAX support has been made nearly as easy and comprehensive as ASMX functionality and there are many options of how data can be accessed over HTTP now with official protocol support for the webHttpBinding. This session starts of with examples of pure REST URLS and demonstrates features like URL templating, different response formats (wrapped, bare, XML, JSON) as well as the various different options for serving in this fashion. There are also examples of serving up raw data such as images or HTML content out of the REST based API. The remainder of the session focuses on AJAX functionality and explores different ways that WCF services can be called.

If you're interested in ADO.NET Data Objects, which support WCF JSON and REST protocols, don't miss this session.

Ajax Alternatives: Using jQuery with ASP.NET

Off-topic for this blog, but very interesting if you're into AJAX.

Note: Slides are the last file in the ZIP containers.

Frans Bouma Adds LINQ to SQL Refactoring and ASP.NET Dynamic Data Support to LLBLGen Pro

LLBLGen Pro has its own native LINQ implementation, but Frans announces in his Linq to Sql support added to LLBLGen Pro post of May 1, 2008 that latest version (2.6 beta) of LLBLGen Pro includes templates for generating LINQ to SQL classes and mapping (*.dbml) files.

This means you can use LLBLGen Pro's code generator to update your LINQ to SQL data model from SQL Server metadata automatically. Microsoft's LINQ to SQL implementation requires manually updating the data model for schema changes. (ADO.NET Entity Framework's Model Browser has an Update Model from Database context menu command.)

Frans says, "The only downside is that you can't update your model in the Linq to Sql designer anymore. But, why would you?"

LLBLGen Pro ASP.NET Dynamic Data Support

Frans' Dynamic Data and 3rd party o/r mappers is a fact post of May 1, 2008 describes how he convinced Scott Guthrie to open ASP.NET Dynamic Data products to third-party object/relational mapping (O/RM) tools, which in turn enables substituting LLBLGen Pro for LINQ to SQL or Entity Framework.

Steele Price Finds LINQ to SQL Frustrating

In his Some of my frustrations with Linq to Sql post of May 1, 2008, Steel Price complains about:

  • Duplication of the "one" object of a many:one association (such as a Customer for a new Order) with the InsertOnSubmit() method if the entity has both an ID field and association.
  • Lack of a method of assuring that deletions precede insertions with multiple updates to the DataContext.
  • Loading an Association does not automatically set the ID if that field is also in the map.

These are legitimate issues that the LINQ to SQL team should fix in VS 2008 SP1.

LINQ to SQLite Accepted as a Google Summer of Code Project

Kevin Kubasik, who wrote a fledgling LINQ to SQLite provider, reports in his Mono GSOC Projects: Linq to SQLite post of May 1, 2008 that he "noticed that one of the accepted proposals for the Mono project is to create a LINQ provider for SQLite."

This project appears to be related to the "Linq to SQL for open source databases" topic of Mono's Student Projects page and is listed in Current Projects on Google Code's Mono Project page.

An Open Source Project for a SQLMetal.exe and SQL Server Compact Edition 3.5 UI

LINQ to SQL's graphic designer doesn't support SQL Server Compact Edition (SSCE) 3.5, so you must use the SQLMetal.exe command-line tool to create LINQ to SQL classes for *.sdf database files.

J. Torres has started a open source project on CodePlex to create a front end for SQLMetal.exe that's compatible with SSCE 3.5.

However, it's a good bet that SSCE 3.5 support will be included in VS 2008 SP1, so the project might have a short shelf life.

Derek Whittaker Explains How to Group LINQ to SQL Sequences on Multiple Columns

Derek explains in his Multi-Column Grouping with Linq2Sql post of April 30, 2008 how to write the LINQ to SQL equivalent of the following T-SQL query.

SELECT  COUNT(*) AS Count,   
        cs.SendID,   
        cs.Name AS SendName,   
        cts.ListID,   
        cts.ListName,   
        ctom.EmailAddress   
FROM    CampaignTrackingOpenedMail AS ctom   
        INNER JOIN CampaignTrackingSummary AS cts    
            ON ctom.CampaignTrackingSummaryID = cts.[ID]   
        INNER JOIN CampaignSend AS cs    
            ON cts.SendID = cs.SendID   
GROUP BY cs.SendID,   
        cs.Name,   
        cts.ListID,   
        cts.ListName,   
        ctom.EmailAddress  

The translation isn't obvious.

Alex James Starts a Fantasy Football Project with Entity Framework as the Data Source

Back in late March, Alex published his Statement of Intent:

I'm going to start creating 'real world' applications using the Entity Framework, and I'm going to blog about all the tradeoffs I make, the hoops I have to jump through, the gotcha's I encounter, the workarounds, the design considerations etc.

In Real world App - Part 1 - Choosing an Application of April 30, 2008, Alex decides on Fantasy Soccer (a.k.a. Fantasy Football).

In Fantasy Soccer - Part 2 - an overview of the rules of May 1, 2008, Alex says:

At this stage only one thing is certain, it will use the Entity Framework for data access.

Fantasy Soccer - part 3 - Unit of Measure of May 3, 2008 discusses using the Entity Data Model's ComplexProperty feature to handle issues with English versus metric measurements and using a helper class to enable sorting by a scaled value, such as weight in lbs. or kg. (Stones for en-uk?>

Updated: May 3, 2008

0 comments: