Sunday, November 02, 2008

LINQ and Entity Framework Posts for 10/30/2008+

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

Update 11/2/2008 3:45 PM PDT: Additions
Update 11/1/2008 8:00 AM PDT: Additions
• Update 10/31/2008 3:00 PM PDT: Additions

Entity Framework and Entity Data Model (EF/EDM)

Danny SimmonsAttachAsModified – a small step toward simplifying EF n-tier patterns post of 10/31/2008 shows you how to “reduce your wire traffic and simplify the code both on the client and the mid-tier with the use of a couple simple extension methods to ObjectContext” if you use a single concurrency token, such as a rowversion or timestamp data type for optimistic concurrency conflict management.

Julie Lerman offers “a consolidated list of Entity Framework resources” on the blog for her forthcoming book, Programming Entity Framework.

Tim Mallalieu’s Entity Framework Futures PDC 2008 session (Tue 10/28 | 5:15 PM-6:30 PM | 151) has the following abstract:

The next version of the Entity Framework adds scenarios in the areas of model driven development, domain driven development, simplicity, and integration. See a preview of production and prototype code for the next version of the Entity Framework as well as a candid discussion with members of the development team.


•• Kristofer Andersson has this to say about the performance of Entity Framework versus LINQ to SQL in his Quiet blog, gone fishing, is Linq-to-SQL dead?, etc post of 11/3/2008:

There has been a lot written about [EF’s performance] already and it isn’t pretty. Somehow [the ADO.NET team] forgot to test EF and L2E beyond “Hello World”. Complex LINQ to Entities queries are translated into really poor SQL. Less complex queries like “from person p in oc.Persons where p.LastName.StartsWith(lastName) select p” are translated into equally bad SQL that will always force a table scan. EF v1 was simply released way too early, the current version should have been labelled “CTP” instead of “RTM”.

In contrast, [LINQ to SQL] generates remarkably good and efficient SQL queries from just about any LINQ expression thrown at it.

Note that Thailand is on the “other side” of the International Date Line if you’re in North, Central, or South America.

•• Simon Segal chimes in from Australia with his LINQ To SQL dead? Raise the damn building! post of 11/1/2008.

•• Damien Guard attempts to mitigate the damage in his LINQ to SQL next steps post of 10/31/2008. Damien explains:

This isn’t to say LINQ to SQL won’t ever get new features. The communities around LINQ to SQL are a continuous source of ideas but we need to consider how they fit the minimalistic lightweight approach LINQ to SQL is already valued for. Where these suggestions fit with this strategy we will be working hard to get them into the product. Some enhancements like the T4 templates can be released independently but runtime elements need to stick to the .NET Framework schedule.

Tim Mallalieu muddies the water with his Clarifying the message on L2S Futures obfuscation of 10/31/2008. Tim says:

The announcement really centers around the point that,  after looking hard  at this and triangulating with internal partners and customers, we decided to take the EF forward with regards to the overall convergence effort and over time provide a single solution that can address the various asks. [Emphasis added.]

Guess what that single solution is: Entity Framework.

Ayende Rahien (Orin Eini) claims in his Microsoft kills Linq to SQL post of 10/31/2008:

In a typical management speak post, the ADO.Net team has killed the Linq to SQL project. I think this is a mistake from Microsoft part. Regardless of how this affects NHibernate (more users to us, yeah!), I think that this is a big mistake. …

It doesn't matter how I turn this decision, I can't find any way in which it make sense from Microsoft perspective.

The LINQ to SQL bits are baked into .NET Framework 3.5+ and third parties, such as Huagati Systems, are overcoming some of the product’s limitations with add-ins. The SQL Server Data Programmability team has at least one developer, Damien Guard, working on LINQ to SQL. Damien’s T4 Template lets you solve the bidirectional (cyclic association) serialization issue. Thus there’s some hope that LINQ to SQL will see some future improvements to v1, even if there's not a v2.

Be sure to read the comments to Ayende’s post and these additional items:

Tim Mallalieu finally pays lip service to LINQ to SQL’s status in his Update on LINQ to SQL and LINQ to Entities Roadmap post of 10/29/2008:

Since the release of LINQ to SQL and the Entity Framework, many questions have been raised about the future plans for the technologies and how they will relate to each other long term. …

We’re making significant investments in the Entity Framework such that as of .NET 4.0 the Entity Framework will be our recommended data access solution for LINQ to relational scenarios.  We are listening to customers regarding LINQ to SQL and will continue to evolve the product based on feedback we receive from the community as well.

Sounds like damnation by faint support to me. Note the disparity of EF’s usage (643 of 4,899 respondents, 13%) compared to that of LINQ to SQL (1,734 of 4,899 respondents, 34%) in Scott Hanselman’s Informal .NET Subsystem Survey of 10/22/2008.

Huagati Systems Kristofer Andersson observes in a 10/30/2008 comment to my Is the ADO.NET Team Abandoning LINQ to SQL? post of 5/23/2008 that Tim’s post “appears to have been published as a response to this thread in the LINQ to SQL Forum: LINQ to SQL: vNext? Kris observes:

I think they mean that this is the vNext roadmap: (i.e. a pile of features from L2S is being merged into EF...)

LINQ to Objects, LINQ to XML, et al.

Ayende Rahien’s Developing Linq to NHibernate post of 11/1/2008 is a plea for “sponsorship from several companies that are willing to pay for the development of LINQ for NHibernate.” Ayende believes:

LINQ to NHibernate requires two to three months of full time development work in order to get to a really good usable state.

Andy Conrad, who hasn’t posted to his Man vs. Code blog since 3/24/2008, wants ideas for a “real esoteric LINQ provider” to add to his MDA04: LINQ to XML, SQL, Entities, DataSets and Co.: Data Access Technologies Explained session at the upcoming Dev Connections conference. Leave suggestions as comments to his Linq to anything post of 10/30/2008.

I suggested a generic managed data provider for LINQ to SQL that accommodates Oracle, IBM DB2, My SQL, PostgreSQL, et al.

ADO.NET Data Services (Astoria)

••• Pablo Castro describes the forthcoming Astoria client model front-end for SQL Data Services (SDS) in his ADO.NET Data Services in Windows Azure: pushing scalability to the next level post of 11/1/2008. The new client model front-end is an SQL Service Labs incubation project: Accessing SSDS using ADO.NET Data Services.

The rationale for the new client model front-end is:

.NET types are a great solution for the scenarios where the schema is known and more or less bounded, and will continue to be the primary way of creating services in that context. However, we needed something else to handle the high-end side of the spectrum.

However, Pablo adds a caveat:

At the same time, addressing the needs for the highest-end services out there is important, so many (if not all) of these changes will eventually make it into the shipping product so that other folks out there can use them if they chose to. Beware that these interfaces are not designed to be "nice", but rather optimized for control and efficiency, so it may not be exactly a fun experience, but you'll get all the scalability you'll need out of them.

Taking advantage of “highest-end services” involves a substantial amount of manually written code to provide an Astoria front end to even the trivial Azure TableServices that Pablo and Niranjan Nilakantan describe in their Windows Azure: Modeling Data for Efficient Access at Scale PDC 2008 session.

I believe most developers will stick with the original REST/SOAP front-end for SQL Server Data Services (SSDS), modified for SDS as described in the SQL Data Services (SDS) Test Harness Updated to the Windows Azure Services Platform post of 1/1/2008, until the Astoria team provides a graphical model designer and code generator for AtomPub and JSON wire formats that’s at least as sophisticated as LINQ to SQL’s O/RM designer.

Updated 11/3/2008: Above corrections (client model –> front-end) are based on Pablo’s comment to this post of 11/3/2008. Also note that Pablo says:

The Astoria client is the same as before, as simple as before; in fact, we did a lot of work so from the HTTP interface and client perspective servers using the "easy" and the "advanced" interfaces are indistinguishable.

So my last paragraph might not be valid for the final Astoria front-end.

Gil Fink explains how Astoria’s QueryInteceptor and ChangeInterceptor attributes work in his Interceptions in ADO.NET Data Services post of 11/1/2008.

• Mike Flasko’s Data Services Content @ PDC post of 10/31/2008 contains links to video segments of the three Astoria-related sessions at PDS 2008.

Gil Fink describes how to use the ADO.NET Data Services AJAX Client Library’s ActionSequence object to cache CRUD operations and submit them as a group in his Action Sequences in ADO.NET Data Services post of 10/31/2008.

Pablo Castro’s 10/29/2008 Offline-Enabled Data Services and Desktop Applications (Astoria Offline) PDC 2008 session should be available for viewing soon. In the meantime, here’s what it covers:

The ADO.NET Data Services Framework (a.k.a. Project "Astoria") introduced a way of creating and consuming flexible, data-centric REST services. By combining data services with the Microsoft Sync Framework, learn how to create offline-capable applications that have a local replica of their data, how to synchronize that replica with an online data service when a network connection becomes available, and how replicas can be used with the ADO.NET Entity Framework. Also, hear us talk about our plans, see the tools that help client- and server-side setup, and discuss the runtime components and APIs.

Jesus RodriguezAdding caching to WCF RESTful services using the REST Starter Kit post of 10/29/2008 is the “first of a series of posts that intend to cover the new capabilities implemented in the WCF REST Starter Kit to enhance the development of RESTful services using WCF.

ASP.NET Dynamic Data (DD)

Scott Hunter presented the ASP.NET 4.0 Roadmap PDC 2008 session (Mon 10/27 | 1:45 PM-3:00 PM | 153) on 10/28/2008. Here’s his abstract:

Take a walk through the 4.0 landscape from ASP.NET and learn how you can get involved in shaping ASP.NET future. This talk focuses on the next release of ASP.NET including web forms and MVC. Do you love web forms? See how you can taking control of your control IDs, display images using the new DynamicImage control, learn about better ViewState managment in GridView and ListView, and get more control over the CSS markup of ASP.NET server controls. See how Dynamic Data makes building you data-driven apps easy. If you're interested in AJAX, we show you further advancements in client rendering and binding. If you're considering MVC, we look at the feature set and understand how to create applications with this technology. [Emphasis added.]

SQL Data Services (SDS) and Cloud Computing

••• Ryan Dunn explains how to enable .NET Services’ Access Control feature for SQL Data Services in his Using SDS with Azure Access Control Service post of 11/1/2008.

••• Roger JenningsCloud Computing at PDC and Elsewhere: Day 4 (10/30) post of 11/2/2008 provides links to PDC 2008 presentations on 10/29/2008 about SQL Data Services and .NET Services.

••• Andrew E. Fitzhugh, chief technologist at HP start-up Magcloud, delivered How HP Built their Magcloud Service on Windows Azure (Wed 10/29 | 10:30 AM-11:45 AM | 411). Here’s the abstract:

Hear from an online magazine publishing service that was prototyped on Microsoft cloud services. Learn from the development team about what they built, why they built it, and what they learned about the platform along the way.

You can learn more about the project by reading Kurt Mackie’s PDC: HP Startup Tests Windows Azure Cloud Platform article of 10/31/2008.

••• Joe Wilcox’s How Can You Be So Sure about Azure? post of 11/1/2008 argues that his damnation of the Windows Azure Services Platform (WASP) in the earlier Microsoft's Server Stack Gets Higher post (see below) is appropriate. However, Joe includes NTFS in his list of Microsoft’s “past failures.” This gaffe detracts seriously from the authority of his analysis.

Be sure to read (or at least scan) the comments of both posts.

••• Jim Nakashima provides assistance with troubleshooting WASP Storage Services in his How to Diagnose and Fix Windows Azure Storage Service Issues post of 11/1/2008.


(1) Make sure the development storage tool is running (icon in the status bar; if not you can run it over the entry points in the Start menu)

To: Make sure the Development Storage service is running by observing the icon in the status bar. If it’s missing, choose Start | Programs | Widows Azure SDK (October 2008 CTP) | Development Storage to start the service.

Roger JenningsSQL Data Services (SDS) Test Harness Updated to the Windows Azure Services Platform post of 10/31/2008 (updated 11/1/2008) tests times to upload real-world (Northwind) data as SQL Data Services entities to the Windows Azure Services Platform (WASP).

Note the new four-letter acronym (FLA) for Azure.

•• Michael Graves offers 10 Tips for Taking Your Business to the Cloud that apply to vendors considering the switch from on-premises to cloud services in this 11/1/2008 article for ECommerce Times’ “Expert Advice” column.

• Jim Nakashima’s Windows Live Web Role for Windows Azure post of 10/31/2008 describes how the Windows Live Tools team added a Windows Live Web Role to the Visual C# Cloud Services’ Roles folder.

Jon Udell pays homage to Don Box and Chris Anderson’s “PDC performance art” and RESTful delivery of AtomPub documents from a list of processes running on their PC in his URI, XML, HTTP, REST, and the Azure Services Platform post of 10/31/2008. He also emphasized the pair’s demo of an Azure Web service running on their local PC and subsequently deployed to the Windows Azure cloud. You can watch their Day 2 Keynote 3, A Lap Around the Azure Platform, on Channel 9.

J. Nicholas Hoover asks Will Microsoft Shake Up Cloud Computing SLAs? in this 10/30/2008 post for InformationWeek, and goes on to answer it with quotations from Microsoft architect Gianpaolo Carrero, who appeared on PDC 2008’s Services Symposium: Expanding Applications to the Cloud and Services Symposium: Cloud or No Cloud, the Laws of Physics Still Apply on 10/30/2008.

Joe Wilcox’s Microsoft's Server Stack Gets Higher post of 10/30/2008 contends that Microsoft Azure is vaporware (pun apparently not intended) and cites Robert X. Cringely’s "Azure Blues" column of the same date as evidence but doesn’t completely agree with Cringely’s analysis. Wilcox concludes:

[T]he seeming prematureness of the Azure announcement, the not-fully-formed tool sets and frameworks, and Microsoft's nearly absent mobile strategies are cause for pause. …

I expect next year's [PDC] will further extend the discussion opened this week about Microsoft's cloud OS. Maybe, in 13 months today's vaporware will have become Cumulus humilis.

Larry Dingan analyzes Forrester Research’s Talking To Your CFO About Cloud Computing report in his Cloud computing: Will the financial geeks give it a boost? column of 10/31/2008. Larry quotes liberally from the report, so it’s obvious he has the whole shebang.

Definitely worth reading.

John Fontana appears to respond to my post below in his Microsoft reveals Windows Azure ship date, pricing metrics NetworkWorld article of 10/30/2008. He notes that:

Buried on the [Azure] site is the cloud operating system's "availability time frame," which is listed as the second half of 2009. Microsoft further explains that Azure will be available directly through the Microsoft Online Customer Portal and through independent software vendors when users purchase an ISV application that uses the Azure Services Platform. Users that go through an ISV will pay based on that ISV's licensing and pricing model.

This means a six-month slip for SQL Data Services (formerly SQL Server Data Services), which promised Release to Web (RTW) in 2009H1 in its original time line. Microsoft’s metrics are the same as its competitors, but Fontana didn’t find any hard numbers.

Roger Jennings says Microsoft Must Publish Azure Project Service Levels and Pricing Now on 10/30/2008, noting that the ES18 Business Considerations for Cloud Computing session at 4:45PM on 10/29/2008 in Petree Hall was CANCELLED. It’s not easy to explain “business considerations” for an unpriced service.

Patrick MacElroy presented the SQL Services: Futures session (Wed 10/29 | 10:30 AM-11:45 AM | 408B) at PDC 2008. The video should be available shortly. Until then, here’s the abstract:

Learn about new capabilities in upcoming versions of SQL Services. See demonstrations of services like advanced query processing, sync services, and reporting services running in the cloud. Also learn about plans to integrate with other services.

CMS Wire’s Open Text Heads Into the Windows Azure Cloud article of 10/30/2009 by Marisa Peacock says:

Enterprise content management provider Open Text has announced a “first-of-its-kind” records management and archiving capability for Microsoft’s new cloud-based operating system Windows Azure. …

[B]y adding capabilities that extend across Azure, customers will be able to manage Microsoft SharePoint content, Microsoft Outlook e-mail and other business information they want to store on Windows Azure, allowing them to apply records rules, archive content and address compliance mandates.

You can read Open Text’s side of the story in their Open Text Unveils Industry’s First Records Management and Archiving Services for Microsoft’s Cloud Storage press release of 10/27/2008.

(Marisa isn’t related to Northwind’s Margaret Peacock, who celebrated her 71st birthday on 9/9/2008.)

Ryan Dunn’s Azure Services Platform Management Console post of 10/29/2008 announces a managed console for “your cloud based workflows, identity and access control rules, and SQL Data Services data” that you can download from the MSDN Code Gallery:

Ryan says:

In later iterations, I can imagine we will beef up the editors and keep the tools in sync with the live services as they evolve.  However, for pure utility - this thing is better than the Azure portal today.

Mary Jo Foley observes in her Microsoft’s Live Framework: A (revised) picture is worth a thousand words post of 10/29/2008:

Microsoft will be moving more of its Live services onto the base Red Dog cloud operating system, officials said. Right now, Live Mesh is the first of those services that is (partially) hosted in Microsoft’s cloud.

Jim Nakashima’s PDC Hands on Labs post of 10/29/2008 notes the availability of the Azure Services Training Kit - PDC Preview:

The Azure Services Training Kit will include a comprehensive set of technical content including samples, demos, hands-on labs, and presentations that are designed to help you learn how to use the Azure Services Platform. This initial PDC Preview release includes the hands-on labs that were provided at the PDC 2008 conference. These labs cover the broad set of Azure Services including Windows Azure, .NET Services, SQL Services, and Live Services. Additional content will be included in future updates of this kit.

Ryan Dunn announced on 10/27/2008 availability of the Ruby on SQL Data Services SDK source code on GitHub and upcoming samples as gems from RubyForge. The samples provide a Ruby REST library for SDS as well as an ActiveRecord provider and an ActiveResource provider.

SQL Server Compact (SSCE) 3.5 and Sync Services

Steve Lasker’s PDC 2008 - Embedding SQL Server Compact In Desktop And Device Applications post describes his SQL Server Compact: Embedding in Desktop and Device Applications PDC 2008 session. Topics include:

  • Connection Pooling
  • Query Plan Caching
  • Trace Listener
  • Using SQL Server Compact as a Doc format

The last three items have downloadable source code for test harnesses.

Liam Cavanaugh provides an overview of sync-related sessions at PDC 2008 and links to their video segments in PDC Session Recordings on Sync Framework of 10/29/2008, which appeared in the Microsoft Sync Framework blog on 11/1/2008.

Liam Cavanaugh’s 10/28/2008 Sync Framework: Enterprise Data in the Cloud and on Devices PDC 2008 presentation is available for download. Here’s its abstract:

See how synchronization plays a pivotal role in transitioning to a managed cloud environment by creating a central hub of information in the cloud. Using synchronization, organizations can enable more efficient mobile and enterprise-to-enterprise scenarios.

Moe Khosravy and Jason Roberts presented the Windows 7: Programming Sync Providers That Work Great with Windows (Tue 10/28 | 12:45 PM-1:30 PM | 408B) session at PDC 2008:

Learn how you can enable your application to synchronize with other applications that use the Microsoft Sync Framework. This session covers how to implement sync for contacts and other PIM data, how to package sync providers for distribution and installation, and how to register sync provider for use on Windows.

Liam Cavanaugh’s New Sync Samples - Sync101 Updated for Sync Framework v2.0 CTP1 post of 10/29/2008 suggests that you “check out the latest version of our Sync101 samples updated to reflect the new features of the release” at the MSDN Code Gallery.

One of the newest additions to Sync101 is a new sample that makes use of the Sync Framework Simple Provider API now part of v2.0.  As you will see in this sample ("Sync101 using Simple Sync Provider"), the Simple Provider API makes it simpler then ever to create providers as it gives developers a lot of the power and flexibility of the core Sync Framework APIs, but with less of a learning curve and less code, especially for replicas that have little or no change-tracking support. 

Miscellaneous (WPF, WCF, MVC, Silverlight, etc.)

Michael Murray’s Lazy Loading with LINQ of 10/28/2008 analyzes Rob Conery’s design and implementation of the “LazyList object that holds the IQueryable expression until you need to iterate over it or retrieve one of its elements, where it executes the query and fetches real data from the data source.”

Tim Anderson says “CardSpace is damn clever, and reflects [Kim] Cameron's work on the Laws of Identity, which like Isaac Asimov's Three Laws of Robotics are intended to prevent technology from doing us harm” in his Microsoft's Geneva Server: Hailstorm done right article of 10/30/2008 for The Register.

Mike Ormond’s PDC 2008 Session Video Downloads post of 10/30/2009 suggests:

If you want to watch any of the PDC 2008 sessions, you can simple peruse the session list at, select the session you want to watch, and click the "Watch Session Recording" icon.

On the other hand, if you want to download sessions, you might do better referring to the following feed: From here you can just right-click the linked wmv and "Save Target As..."

Phil Haack presented the ASP.NET MVC: A New Framework for Building Web Applications session at PDC 2008.

Joe Wilcox offers a PDC Three-Day Wrap-up with links to his and other eWeek writers’ and bloggers’ efforts for the first three days of PDC (10/30/2008).


Pablo Castro said...

Regarding the observations on the high-scalability changes for Astoria, I think I didn't explain one aspect clearly. Perhaps I should clarify in the post.

Whenever I said "front-end" I meant the servers you hit when you're talking to the tables or sds services (those things have a front-end tier here the HTTP traffic goes and a back-end tier where the actual data is stored).

This is *not* the Astoria client layer.

I guess that what I see as a front-end is everybody else's back-end, as that's the thing that you see as your store.

So the important thing to keep in mind is that the extra complexity I mentioned around implementation is for the folks using the Astoria server runtime in a extremely scalable way. The Astoria client is the same as before, as simple as before; in fact, we did a lot of work so from the HTTP interface and client perspective servers using the "easy" and the "advanced" interfaces are indistinguishable.