Showing posts with label O/RM Persistence Ignorance. Show all posts
Showing posts with label O/RM Persistence Ignorance. Show all posts

Monday, January 26, 2009

LINQ and Entity Framework Posts for 1/19/2009+

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

• Update 1/23/2009: Minor additions
• Update 1/26/2009 10:00 AM PST: Minor additions

Entity Framework and Entity Data Model (EF/EDM)

•• Greg Duncan’s LINQPad and the Entity Framework post of 1/25/2009 cites Simon Segal’s LinqPad for the Entity Framework, Shawn Wildermuth’s Using LinqPad and Entity Framework Models and Stefan Cruysberghs’ .NET - ADO.NET Entity Framework & LINQ to Entities – Part 2LINQPad post as evidence that using LINQPad with Entity Framework is “officially cool.”

•• Udi Dahan discusses issues with value objects, many:many associations and aggregated roots in his DDD & Many to Many Object Relational Mapping post of 1/24/2009.

Sanjay Nagamangalam’s detailed Customizing Entity Classes in VS 2010 post of 1/23/2009 describes expected improvement to code generation in EF v2 and VS 2010.

• Julie Lerman reports that my new “LINQ and the Entity Framework” book from WROX/Wiley has reached Amazon.com in her Roger Jennings' ADO.NET 3.5 is now "In Stock" on Amazon! post of 1/23/2009. My post about the arrival is here.

• Julie Lerman’s EntityObject Class Constructors post of 1/22/2009 observes that the entity classes generated by the EDM Designer don’t have a default constructor. This lets you add your own constructor to set default values for foreign keys, which is supported in by the Designer.

Julie Lerman will present two sessions about Entity Framework at Philly.NET Wednesday night (Jan 21) - Thanks INETA.

David Klein’s Why the Oakton Microsoft Application Framework (OMAF) Will Not Be Moving to The Entity Framework (EF) 1.0 or any 3rd Party ORM Products Right Now post of 1/20/2009 explains why OMAF will stick with LINQ to SQL until the ADO.NET team releases EF v2.

Many comments to the ADO.NET Team’s Migrating from LINQ to SQL to the Entity Framework: Stored Procedures for data retrieval post of 12/4/2008 reflect sentiments similar to David’s.

Kristofer Andersson describes in his Tools - Part 9 - Add-ins - Filtering intellisense dropdowns on required vs optional members post of 1/21/2009 how he used Alex James’ “simple and elegant way to filter Visual Studio’s Intellisense dropdowns by using interfaces and properties returning those interfaces” in the latest version of his Huagati DBML/EDMX Tools.

A beta version of Huagati DBML/EDMX Tools version 1.60 including this new feature is available for download here. Kris writes:

Unlike the other features in the add-in, this feature don’t require any license/activation. You can use it with or without having a license for the other add-in features.

Ken Cox’s Learning CRUD and Data Forms in Silverlight 2, Creating a Silverlight 2 Data Form - Episode 1 and Creating a Silverlight 2 Data Form - Episode 2 posts of 1/19/2009 show:

[A] small, but realistic example of how to create a CRUD (Create, Read, Update, Delete) application against the familiar Northwind database. It uses the latest stuff from Microsoft including Windows Communication Foundation, ADO.NET Data Services (Astoria), and the Entity Framework.

Ken uses VB because, in his words:

“I’m more comfortable in VB (although I write lots of C#); there’s a dearth of sample Silverlight code in VB; and people who write only in C# don’t need beginner-level content because they already know everything. <grin>”

Alex James continues his posts about Composable Services for EF v2 with The problem with Function Signatures of 1/17/2009, which introduces the issue of different representations of the same object, as analyzed by Stefan Tilkov in his link and self post of 1/16/2009 about the Atom Syndication Format’s use of the “self” relation. Stefan cites the ambiguity of using “self”:

[T]o refer to a canonical resource, i.e. the one that represents the object or entity itself in the default way. …

This has the downside that retrieving the resource identified by the outermost self link would yield something different than what you’re looking at. Whether this is acceptable or not depends on whether you consider these two resources to be “identical”. I’m undecided whether the official definition of the self link relation allows for this usage.

But in conclusion, I stand by my opinion that URIs can and should be used for identity – whatever “identity” might mean for you.

Alex concludes:

This is why things like hyperdata / and lazy-loading is so important.

A signature alone is not enough to help me call functions.

Particularly when the target function is called from somewhere with different context, data availability, and trustworthiness.

Hmm… lots of questions

PS: starting to solve this problem seems like a pre-requiste of truly Composable Services.

It seems to me to be an issue for ADO.NET Data Services also.

LINQ to SQL

Matt Warren’s Building a LINQ IQueryable Provider - Part XIII is the latest (13th) episode in his IQueryable series, which covers:

    • Updates - Insert, Update & Delete operations.
    • Batch processing - true SQL Server batch processing.
    • Server language type systems - correct parameter types.
    • Mapping Changes - use the same class with multiple tables, etc.

Be prepared: The post is several feet long and contains a substantial amount of source code. Complete source code for Matt’s project to date is available at http://www.codeplex.com/IQToolkit.

• Damien Guard writes Multiple outputs from T4 made easy on 1/22/2009 to explain how his updated T4 templates can split the output into a single entity class per file.

Jim Wooley’s LINQ supported data types and functions post of 1/21/2009 relates:

I happened upon a listing on MSDN showing the functions and methods which are and are not supported. The full list of LINQ to SQL supported and unsupported members is available online at http://msdn.microsoft.com/en-us/library/bb386970.aspx.

As an example the following methods are shown as having translations for DateTime values: Add, Equals, CompareTo, Date, Day, Month, Year. In contrast methods like ToShortDateString, IsLeapYear, ToUniversalTime are not supported.

David Klein’s Why the Oakton Microsoft Application Framework (OMAF) Will Not Be Moving to The Entity Framework (EF) 1.0 or any 3rd Party ORM Products Right Now post of 1/20/2009 explains why OMAF will stick with LINQ to SQL until the ADO.NET team releases EF v2. (Copied from the “Entity Framework and Entity Data Model (EF/EDM)” section.)

Damien Guard announces that his LINQ to SQL templates [are] updated, now on CodePlex on 1/19/2009. The latest updates include:

  • Now licensed under the Microsoft Public License and hosted at CodePlex
  • User options specified with a var options block at the start of the template
  • Option for each class to be a separate file that is reflected in the VS project (EntityPerFile=true)
  • Detection and support of IsComposable functions
  • General code clean-up and better error handling such as missing DBML file

You can download a 05:00 screencast that shows how to use the templates here.

See Kristofer Andersson’s Tools - Part 9 - Add-ins - Filtering intellisense dropdowns on required vs optional members post that’s described in the “Entity Framework and Entity Data Model (EF/EDM)” section.

John Opincar recommends in his Expressions versus Delegates in LINQ to SQL Performance post of 1/18/2009:

Favor Expressions over Delegates when using LINQ. If you have to have a Delegate, you can always use Compile to turn your Expression into a Delegate as needed. But you can’t turn a Delegate into an Expression (that I’m aware of).

LINQ to Objects, LINQ to XML, et al.

•• Daniel Moth’s PLINQ post of 1/25/2009 demonstrates code to use “PLINQ as a black box” and create a simple demo example.

•• Jon Skeet starts a project to add LINQ operators that he believes are missing in LINQ to Objects with his Designing LINQ operators post of 1/23/2009.

Barry Dahlberg’s LINQ to NHibernate, IEnumerable vs IQueryable post of 1/21/2009 and Virtual Methods vs Extension Methods post of 1/23/2009 discuss his initial tests of the LINQ to NHibernate alpha in conjunction with Ayende’s new NHibernate Profiler.

Alex JamesLINQ to Objects and Buffer<T> post of 1/20/2009 analyzes the OrderBy() extension method’s implementation of Buffer<T>, and concludes:

[I]f the Buffer<T> class encounters an ICollection<T> it has a little optimization, that uses Count and CopyTo(..)to initialize an array with the correct size and take a copy of the data, rather enumerating and re-sizing a target array as needed.

When I thought about this I realized that my little Lazy Loading Collection class would return a Count of 0 until it is enumerated. And because the count was 0, the collection would never actually get enumerated.

So when I used OrderBy() over my collection, I get no results.

His solution to the dilemma is to “trigger… a LazyLoad whenever Count is called”.

Keith Brown creates an aggregating LINQ operator for TimeSpan types in his Linq and TimeSpan post of 1/19/2009.

ADO.NET Data Services (Astoria)

•• Udi Dahan’s Building Super-Scalable Web Systems with REST post of 12/29/2008 suggests “leveraging the Internet” with RESTful caching for a highly scalable custom weather reporting mashup. The techniques Udi describes apply to Astoria’s resource mapping to URIs.

Beth Massi adds an Office-related member to her ADO.NET Data Services series with the ADO.NET Data Services - Building an Excel Client post of 1/21/2009.

Beth Massi continues her ADO.NET Data Services series with ADO.NET Data Services - Intercepting Queries and Adding Validation of 1/21/2009.

Jon Udell’s Unifying HTTP success and failure in .NET discusses the differences in how Python’s httplib and .NET’s HttpWebRequest/HttpWebResponse pair handle some HTTP headers and respond to HTTP status codes.

Beth Massi’s ADO.NET Data Services - Enforcing FK Associations and a Fix for Deleting Entities post of 1/20/2009 describes a problem with disallowing nulls in foreign key fields for associated entities and saving changes to the parent entity and its solution. Beth also observes:

You may have issues deleting entities that are involved in an association (regardless of whether they are enforced or not). This was a bug in ADO.NET Data Services described in KB958484 and is fixed with this update. (This should be flowing along with your regularly scheduled Windows Updates but you may not have gotten it yet so if you're experiencing this issue make sure you install this fix.)  In our example I was forced to detach the category object from the client context before submitting the deletes.

ASP.NET Dynamic Data (DD)

Steve Naughton’s Setting the Initial Sort Order – Dynamic Data post of 1/23/2009 supplements the post below.

Steve Naughton makes up for an earlier posting hiatus with his Getting Default Values from List page Filters for Insert – Dynamic Data tutorial of 1/23/2009.

Steve Naughton’s Writing Attributes and Extension Methods for Dynamic Data of 1/20/2009 is “a short article on some useful tips I’ve found for writing Attributes for Dynamic Data.”

Scott Hanselman warns that the ASP.NET team’s “ASP.NET Dynamic Data 4.0 Preview 2 that was quietly put up just a month ago with this scary disclaimer:

NOTE: These previews contains features that may not be in the next version of the framework. These previews are not production quality and should be used at your own risk.

but then goes on to analyze Preview 2 in his lengthy ASP Dynamic Data Preview - More ways to exploit ADO.NET Data Services for fun and profit post of 1/19/2008.

Steve Naughton’s Dynamic Data – Cascading FieldTemplates post of 1/19/2009 discusses how to handle pairs of dropdown lists in which one list filters the source of the other list. For example, a selection in a Category dropdown changes the list of a paired (dependent)Products dropdown.

The solution is more complex that you’d think.

SQL Data Services (SDS) and Cloud Computing

This topic moved on 1/3/2009 to Azure and Cloud Computing Posts for 1/5/2009+.

SQL Server Compact (SSCE) 3.5 and Sync Services

This topic was dropped as of 1/3/2009.

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

No significant posts in the Miscellaneous category were found as of 1/21/2009 11:30 AM PST.

Tuesday, July 29, 2008

LINQ and Entity Framework Posts for 7/28/2008+

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

“Generate Web Sites Automatically” Cover Story About ASP.NET Dynamic Data for Visual Studio Magazine

My “Generate Web Sites Automatically” cover story for the August 2008 issue of Visual Studio Magazine is available from the above link or by clicking the cover image.

Visual Studio 2008 Service Pack 1's new ASP.NET Dynamic Data templates automatically generate code for DataGrid, ListView, DetailsView, and FormView display and editing controls on dynamic pages derived from a master page and CSS stylesheet. Dynamic Data leverages AJAX to smooth page transitions and delivers scaffolding for codeless, key-based page routing with Entity Framework or LINQ to SQL object/relational mapping tools.

Read more about it in my “Generate Web Sites Automatically” Cover Story About ASP.NET Dynamic Data for Visual Studio Magazine post of July 29, 2008

“A Vote for Transparency” Guest Opinion for Visual Studio Magazine’s August 2008 Issue

My “Guest Opinion: A Vote for Transparency” about Entity Framework’s overdue move to more transparency in its design process for the August 2008 issue of Visual Studio Magazine is available from the above link or by clicking the cover image.

My take is that the Data Programmability group’s Entity Framework team could have saved themselves considerable grief, consternation, and bad press if they had initiated the Entity Data Model and Entity Framework project with the Astoria Team’s approach.

Read more about it in my “A Vote for Transparency” Guest Opinion for Visual Studio Magazine’s August 2008 Issue post of July 29, 2008.

Lazy Loading With The LazyList

LINQ to SQL log to debug window, file, memory or multiple writers

Overloading Entity Framework Methods: More GetObjectStateEntries

Implementing IExpandProvider for NHibernate.LINQ

Handy Visual Studio Add-In to View Office 2007 Files

Steve Naughton Completes His Dynamic Data and Field Templates  Series with an AutoCompleteFilter Web Service

Steve’s An Advanced FieldTemplate post of July 29, 2008 is the final episode of his three-part Dynamic Data and Field Templates Series. In part 3:

[W]e are going to use the AutoCompleteFilter web service from Dynamic Data Futures example to make an AutoCompleteText_Edit FieldTemplate. What this will do is look up values in the column that we are editing for matches i.e. if we had a column for category names and we typed in con we may get list like Condiments, Confections, Containers etc.

The first two parts are:

  1. The Anatomy of a FieldTemplate.
  2. Your First FieldTemplate.

Michael Arrington: Yahoo, Intel and HP Hype Vaporware in the Cloud

TechCrunch’s Mike Arrington posts Cloud Computing Test Bed: Live Notes From The Conference Call, a blow-by-blow account of a July 29, 2008 conference call announcing participation by Yahoo, Intel and HP in “a globally distributed, Internet-scale testing environment designed to encourage research on the software, data center management and hardware issues associated with cloud computing at a larger scale than ever before.”

My comment to the post is:

This is simply hype to prevent the real players, Amazon, Google and Microsoft (and potentially IBM) from monopolizing the PR chips. IBM’s Blue Cloud “initiative” started with similar blather from the flacks and, as far as I can determine, went nowhere.

Mike’s later HP, Yahoo, Intel Launch Cloud Computing Test Bed post the same day has more agitprop about the six erstwhile “centers of excellence.”

GigaOm’s Stacey Higginbotham’s HP, Yahoo and Intel Create Compute Cloud post of the same date has additional background on the project, which will restrict “access to academics and research institutions trying to build out services and work within the clouds.”

The test bed project has the same odor as IBM’s Blue Cloud project that IBM announced last year. Here’s my recent take on Blue Cloud from my All’s Quiet on the SQL Server Data Services Front post of June 17, 2008:

Backstory: IBM’s November 15, 2007 announcement of its Blue Cloud distributed computing initiative generated 754,000 hits for the past year with a Google search on ibm “blue cloud”. Only 39,300 hits occurred in the past three months, which indicates quickly diminishing interest as Big Blue failed to expose its purported service to actual users.

A possible reason for the reduced press coverage is the company’s schizophrenic view of cloud computing, as reported by RedMonk’s Michael Coté in the “IBM and cloud computing” topic of his May 27, 2008 IBM Tivoli Pulse: Tivoli product updates and cloud confusion article for SearchDataCenter.com. Meanwhile, Amazon and Google maintain their headlock on what cloud mindshare there exists among developers.

According to a subsequent IBM press release, IBM opens Africa’s first “cloud computing” center, second cloud center in China, IBM currently has three “cloud computing centers” in Dublin, Beijing, and Johannesburg.

That’s a lot of computing horsepower for a customer list limited to “Wuxi City of China, Sogeti, the Local Professional Services Division of Capgemini, the Vietnamese government institutions and universities, and iTricity, a computing host service company based in the Netherlands.” It’s surprising that IBM couldn’t come up with a more inspiring customer list.

Jamie Thompson Posts a SQL Server Data Services Console Application on Codeplex

Jamie’s SSDS demo code now on Codeplex post of July 29, 2008 contains a link to the source code for a simple .NET console project that creates an authority and container, and then adds a entity to the container.

Mike Taulty Posts Four More ADO.NET Data Services Screencasts

So far, Mike hasn’t gotten around to posting about these four Screencasts added to his Channel 9 collection on July 29, 2008:

  • ADO.NET Data Services (VS08 Sp1 B1), Optimistic Concurrency: With Data Services, it's most likely that you'd use an optimistic locking strategy for the underlying data and the framework has built-in support which we take a look at here.
  • ADO.NET Data Services (VS08 Sp1 B1), Batching: We can cut down the number of HTTP round-trips that we make from client to service by using the batching feature of Data Services. A service exposes a $batch endpoint that we can send multiple "CRUD" operations to in a single HTTP request.
  • ADO.NET Data Services (VS08 Sp1 B1), Service Operations: Service operations provide a way in which we can add to the core functionality of Data Services in order to expose your own arbitrary functionality by writing server-side functions that can still be invoked (with parameters) via the URI. Here, we take a quick look at how we can do this.
  • ADO.NET Data Services (VS08 Sp1 B1), Query Interceptors: Query interceptors (and change interceptors) allow us to plug code into the dispatch mechanism server side in order to run some of your own code as part of returning a result set or modifying data. Here, we take a quick look.

Here are the fist five from the “Mike Taulty Posts Five ADO.NET Data Services Screencasts” topic of LINQ and Entity Framework Posts for 7/24/2008+:

Danny Simmons on dnrTV: Entity Framework Screencast Part 2

In show 118 of July 28, 2008, Dan Simmons on The Entity Framework Part 2, Danny “demonstrates using the Entity Framework with ASP.NET applications and web services” in a 55:10 screencast that covers the following topics:

  • Danny starts by moving the Northwind.edmx files and a partial entity class to a separate assembly with a reference from an ASP.NET Web Application which uses the EntityDataSource as a data source to bind a GridViewControl.
  • He continues at 14:00 with an ASP.NET Dynamic Data Web application, explains issues with disconnected operation at 19:00 and does a disconnected demo at 13:00.
  • Creating a Web services app with ADO.NET Data Services (Astoria) starts at 26:00.
  • Creating a WCF Service Application starts at 45:45 with GetOrderById() and UpdateOrder() operations.

The earlier Dan Simmons on The Entity Framework Part 1 of July 14, 2008 was an introduction to the Entity Framework.

Amazon SimpleDB Update Adds New and Improves Features

The Amazon Web Services Blog’s New features come to Amazon SimpleDB post of July 28, 2008 discusses SimpleDB’s new-found sort capability and does-not-start-with operator and points to a page with the following list of new features:

  • Query Sort: Amazon SimpleDB now supports the sorting of query result sets on a single attribute.
  • Query “does-not-start-with” operator: Amazon SimpleDB now provides the new comparison operator “does-not-start-with.”  For example,  [‘title’ does-not-start-with ‘Old’].
  • Increased number of predicates in query expressions: Amazon SimpleDB increases the number of predicates allowed in query expressions from 5 to 10.
  • Increased number of comparisons per predicate in query expressions: Amazon SimpleDB increases the number of comparisons per predicate allowed in query expressions from 5 to 10.
  • XML-restricted character handling: Amazon SimpleDB now automatically Base64 encodes strings that contain XML-restricted characters. This ensures responses with restricted characters are successfully returned.

Mike Taulty and Mike Ormond Post 52 Silverlight Screencasts: Eight with Data or LINQ Overtones

The “Two Mikes” have been busy capturing content for a series of 52 (as of July 29, 2008) screencasts for download from the Screencasts for Silverlight 2 list. Here are the eight that are most relevant to his blog topics:

Three New Tech-Talk Interviews from Tech*Ed 2008 Developers

Three new Tech-Talks of peripheral interest to developers using LINQ and Entity Framework or related technologies posted July 28 and 29, 2008 are:

  • REST and SOAP…Battle Royal or Peas in a Pod?: Ron Jacobs discusses REST and SOAP with Bob Familiar: the differences, the similarities, and how Windows Communication Foundation supports these distributed networking protocols.
  • Introducing Velocity: a Distributed Caching Platform: Join us as we present project "Velocity," an explicit application cache that provides increased performance, scale and availability. With Anil Nori, Muralidhar Krishnaprasad, Subramanian Muralidhar, and Nithya Sampathkumar.
  • The Road to Oslo: The Microsoft Services and Modeling Platform: Microsoft's "Oslo" project aims at creating a unified platform for model-based, service-oriented applications. This new approach will affect the next versions of several products and technologies, including the Microsoft .NET Framework, Microsoft Visual Studio, Microsoft BizTalk Server, Microsoft System Center, and more. Although many details of "Oslo" won't be public until later in 2008, this session provides an overview of what Microsoft has revealed so far. Along with a description of the problems it addresses, the session includes a look at several new "Oslo" technologies, including a general-purpose modeling language, role-specific modeling tools, a shared model repository, and a distributed service bus. With David Chappell and Ron Jacobs.

“A Vote for Transparency” Guest Opinion for Visual Studio Magazine’s August 2008 Issue

My “Guest Opinion: A Vote for Transparency” about Entity Framework’s overdue move to more transparency in its design process for the August 2008 issue of Visual Studio Magazine is available from the above link or by clicking the cover image.

Pablo Castro originated a more open approach for developer participation in a new product’s early design stage with his Transparency in the design process methodology for ADO.NET Data Services (formerly code-named Astoria.)

My take is that the Data Programmability group’s Entity Framework team could have saved themselves considerable grief, consternation, and bad press if they had initiated the Entity Data Model and Entity Framework project with the Astoria Team’s approach.

Note: See my Current Commentary About the “ADO.NET Entity Framework Vote of No Confidence” Manifesto post of June 28, 2008 and Stephen Forte’s Impedance Mismatch Post Elicits Responses from Domain-Driven Designers of July 27, 2008 for more about the “bad press.”

I also recommend that the SQL Server Data Services (SSDS team) increase the transparency in their design process in my SQL Server Data Services Needs an Open Development Process Similar to that for ADO.NET Data Services and Entity Framework post of June 27, 2008.

Monday, July 28, 2008

LINQ and Entity Framework Posts for 7/24/2008+

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

Updated SQL Server Data Services (SSDS) Test Harness: Northwind REST and SOAP Uploads

The SSDSNwindEntitiesCS.sln sample project for my “Test-Drive SQL Server Data Services” cover article for the July 2008 issue of Visual Studio Magazine has been updated to SSDS Sprint 3, adds a couple of features, and has a few start-up bugs excised.

New Features:

  • The program attempts to create an authority if you haven’t added one.
  • A splash screen opens during the initial query for ACE container and entity object because the process is very slow with a moderate number of objects.

Updates:

  • The new 'application/x-ssds+xml' MIME type replaces ‘application/xml’.
  • The containerUri = response.Headers[HttpResponseHeader.Location]; instruction which now returns null has been replaced with concatenated constants as the containerUri value. This eliminates a problem when creating new containers with REST operations.

Download: You can download the SSDSNwindEntitiesCS project here (114-KB SSDSNwindEntities.zip file at Skydrive).

My Updated SQL Server Data Services (SSDS) Test Harness: Northwind REST and SOAP Uploads of July 27, 2008 has more details and screen captures.

Added: July 28, 2008

Stephen Forte’s Impedance Mismatch Post Elicits Responses from Domain-Driven Designers

The “Stephen Forte Embraces the Impedance Mismatch” topic of my LINQ and Entity Framework Posts for 7/14/2008+ post quotes Steve’s Impedance Mismatch post of June 27, 2008, which eschewed “object-fist” in favor of “data-first” design.

I assumed that Steve’s post would brew a storm of controversy, especially since he’s a member of the Entity Framework’s new Advisory Council. However, it turned out to be a tempest in a teapot as described in my Stephen Forte’s Impedance Mismatch Post Elicits Responses from Domain-Driven Designers of July 27, 2008.

Bidirectional Serialization of LINQ to SQL Object Graphs with Damien Guard’s T4 Template in VS 2008 SP1

LINQ to SQL developer Damien Guard, who joined the DPG in May 2008, announced the availability of a customizable T4 template to generate LINQ to SQL classes from the *.dbml file in his LINQ to SQL T4 template reloaded post of July 23, 2008.

A couple of minor modifications to the L2ST4.tt template file and addition of a reference to and using directive for the System.Runtime.Serialization namespace enables full-object-graph serialization of LINQ to SQL entities. This brings parity to both VS 2008 OR/M tools in the serialization department.

Read more at Bidirectional Serialization of LINQ to SQL Object Graphs with Damien Guard’s T4 Template in VS 2008 SP1 of July 24, 2008 (updated 7/27/2008) and download the sample C# project.

Mike Taulty Posts Five ADO.NET Data Services Screencasts

Following are titles with links to the five Astoria screencasts that Mike posted on July 25, 2008:

Ryan Dunn Makes IE Display SQL Server Data Services New application/x-ssds+xml MIME Type

Internet Explorer now prompts you to download SQL Server Data Services (SSDS) content that uses the new (post-Sprint 3) application/x-ssds+xml MIME type instead of application/xml.

Ryan’s Rendering POX for SSDS in Internet Explorer post of July 25, 2008 gives you the magic Registry hack to make IE display SSDS’s POX wire format.

Matthieu Mezil Shows You How to Instantiate a New EntityKey

Entity Framework uses EntityKeys to represent unique entities in its cache. EntityKeys are immutable, so Matthieu shows you how to instantiate new ones in his EntityReference change key post of July 25, 2008.

Phani Raju Demonstrates Using the AJAX 4.0 Preview’s DataView Control with ADO.NET Data Services

Phani’s ASP.NET AJAX 4.0 Master-Details View with the DataView and ASP.NET AJAX 4.0 Master-Details View with the DataView , Part 2 posts of July 24 and 25, 2008 use the ASP.NET AJAX 4.0 CodePlex Preview 1’s templating engine and DataView control to build master-details pages.

Phani uses Astoria and its AJAX Client Library for ADO.NET Data Services from CodePlex as the data source.

Jim Wooley: Quickly create an IEnumerable<T> from a DataReader

Jim’s Filling an object from a DataReader with LINQ using DataContext.Translate post of July 25, 2008 shows you how to use the DataContext.Translate<T>() method to create an entity set from a database table without mapping for the DataContext.GetTable() method.

Eric White Analyzes Responses to his “Are Developers Using LINQ?” Post

Eric received many detailed responses to his Are Developers Using LINQ? post of July 23, 2008. In his Are Developers Using LINQ? (Part 2) post of July 25, 2008, he describes these four common LINQ usage scenarios:

  • Using LINQ to Objects and LINQ to XML … .
  • Using query expressions … to access objects and XML.
  • Using LINQ to SQL or LINQ to Entities to access a database.
  • Using LINQ implemented using an IQueryable provider to something other than a SQL database.

and noted that there were only a few negative responses.

Keith J. Farmer points out in a comment to the first post that folks still call LINQ “link,” consider LINQ to SQL to be the only implementation, and believe SQL Server is the only LINQ-enabled data provider.

Ruurd Boeke Joins Microsoft’s Silverlight (not Entity Framework) Team

Ruurd notes in his I’m joining Microsoft!! post of July 25, 2008 that:

I was torn between working on EF (which, I’ve been very involved with lately) and on Silverlight. In the end, Silverlight won, because I strongly believe it to be the strongest contender in the client space.

I’m disappointed that Ruurd didn’t choose to join the Entity Framework team. His six-part Introducing Entity Framework Contrib: Easy IPoco implementation V 0.1 series used Postsharp to “[a]utomatically implement the IPoco interfaces. The project is aimed at helping you build your domain layer in a more persistence ignorant way than is possible at this moment.”

Note: Ruurd’s eight-part Workflow as controller: Introducing <M,V,C> where M: ViewModel, V : WPF, C : WF describes an inventive framework that uses WF in an unconventional role, although he won’t call his tutorial a framework.

Jeff Currier Defends SQL Server Data Services’ Missing PUT/POST Response Bodies

Mike Amundsen’s REST PUT/POST Responses contain ETag, but not body - Oops! thread of July 24, 2008 in the SQL Server Data Services (SSDS) - Getting Started says:

I note that the PUT results in a return that includes an ETag (yay!), but that there is no body returned for this PUT. I think this is a problem. ETags act as a version hash for the document body. Yet this Response has no body!

Jeff’s What happened to SSDS PUT/POST responses? post of July 25 replies:

Prior to this rollout the only mechanism that we had to communicate version information to you was via the entity body of the response (specifically the version element in the body).  However, now that we have true ETag support we now can simply return this value back to caller via the ETag header per the Http spec.

Jeff attributes the reason for the change to future ingress and egress charges; returning the body would increase downloaded bytes.

Beth Massi Posts Four WPF Forms Over Data Video Segments to the Code Gallery

Her WPF Forms over Data: 2 More Videos! post of July 24, 2008 announces #3 and #4 in the following series about data binding in WPF:

  1. How Do I: Create a Simple Data Entry Form in WPF?
  2. How Do I: Display Data in a List in WPF?
  3. How Do I: Create Lookup Combobox in WPF?
  4. How Do I: Hook Up and Display Validation in WPF?

Click the Watch Video link to substitute MediaPlayer for the miniature Silverlight window. VB and C# sample code is downloadable.

Charlie Calvert Continues with Aggregate Operators in his Revived LINQ Farm Series

Charlie’s LINQ Farm: More on the LINQ Aggregate Operators discusses the following LINQ aggregate operators and their overloads:

  • Count and LongCount
  • Min and Max
  • Average
  • Sum
  • Aggregate

Jeremy D. Miller and Ward Bell Discuss Object/Relational Modeling and the Entity Framework in a Two-Part Podcast

The first ALT.NET Object-Relational Mapping podcast with Jeremy D. Miller and Ward Bell covers Object/Relational Mapping (O/RM) tools and when to use them. Topics include:

  • Object-Relational Mapping
  • Object-first vs. Data-first Approaches
  • Evolutionary Database Design
  • Evolutionary Design
  • Code Generation
  • Persistence Ignorance
  • POCO
  • Domain-Driven Design
  • The Vietnam of Computer Science

    The second part “discusses the Vote of No Confidence on Microsoft's Entity Framework and what it means for the Alt.NET and .NET communities.”

    Scott Hanselman Does a Video Deep Dive on LINQ and the Entity Framework

    The actual title of Scott’s Jumpstart Data Driven Web Applications with ASP.NET 3.5 (Part 1 of 2) presentation for Tech*Ed 2008 Developer is “WUX101: Jumpstart Data-Driven Web Applications with ASP.NET 3.5 Dynamic Data Controls (Part 1 of 2).”

    Note: ASP.NET 3.5 Dynamic Data Controls became ASP.NET Dynamic Data after Tech*Ed.

    The deck for the presentation reads:

    Explore the new features in ASP.NET 3.5 that make buliding data driven Web applications a breeze. In this first of a two-part series, learn how to use LINQ to take the pain out of interacting with your relational data and how support for LINQ and its constructs are built into the paradigms you are familiar with in ASP.NET and Microsoft Visual Studio 2008.

    Hopefully the TechEd Online News folks will post Part 2 shortly.

  • Saturday, June 28, 2008

    Current Commentary About the “ADO.NET Entity Framework Vote of No Confidence” Manifesto

    Moved from LINQ and Entity Framework Posts for 6/25/2008+ on 6/24/2008 at 1600 PDT due to length. Updated: 7/3/2008 0830 PDT with copies of recent Tweets and 7/6/2008 with an added entry.

    Here’s a list of some of the more interesting posts about Scott Bellware’s ADO .NET Entity Framework Vote of No Confidence petition, which had collected 417 votes as of July 6, 2008 0720 PDT:

    For more background on the “No Confidence” petition, see Tim Mallalieu Addresses “ADO .NET Entity Framework Vote of No Confidence” Manifesto, New Entity Framework Design Blog Announces Transparent v2 Design Process, Ian Cooper Rings in with a Level-Headed Critique of Entity Framework v1.

    Tuesday, June 24, 2008

    Tim Mallalieu Addresses “ADO .NET Entity Framework Vote of No Confidence” Manifesto

    In the tradition of Émile Zola’s “J'accuse” and Martin Luther’s The 95 Theses letters, the ADO .NET Entity Framework Vote of No Confidence petition in the form of a WuFoo page with attached Entity Framework Vote of No Confidence Signatories table had gathered more than 150 signatures by mid-afternoon of June 24, 2008.

    The petition focuses on these five theses:

    1. Inordinate focus [on] the data aspect of entities leads to degraded entity architectures
    2. Excess code [is] needed to deal with lack of lazy loading
    3. [A] shared, canonical model contradicts software best practices
    4. Lack of persistence ignorance causes business logic to be harder to read, write and modify, causing development and maintenance costs to increase at an exaggerated rate
    5. Excessive merge conflicts [occur] with source control in team environments

    Three of the signatories, Jeremy D. Miller, Scott Bellware, James Kovacs, and Dave Laribee are among the seven Microsoft MVPs who “took apartDanny Simmons and others on the ADO.NET team at the MVP Global Summit in Seattle on March 14, 2007 and taught them NHibernate. Ayende Rahien, a.k.a. Oren Eini, a primary contributor to NHibernate, the best-known EF competitor, is another MVP involved in last year’s controversy who signed the petition.

    The primary complaint at that time was lack of persistence ignorance, which I covered in detail by my Persistence Ignorance Is Bliss, but Is It Missing from the Entity Framework? post of March 17, 2008. Data-centric design was also a topic of contention.

    I’m surprised to find lack of an “out-of-the-box n-tier story” missing from the list. Most developers consider lack of SOA-friendly features is more significant than data-first design, which is necessary when connecting to legacy databases.

    On the whole I consider the “No Confidence Manifesto” to be doctrinaire and an example of attempts to enforce “political correctness” in software architecture. I’d wager that EF would perform more than adequately in 80% or more of the applications that require O/RM tools. It appears to be adequate for the Astoria team (It’s required to create updatable entities.) It works fine for me with the EntityDataSource and ASP.NET Dynamic Data.

    A Serious Case of Hubris

    Update 6/24/2008 1730 PDT re "doctrinaire” and “political correctness”

    In a comment to Tim Lee’s detailed Thoughts on the Entity Framework Vote of No Confidence of 6/23/2008 an anonymous commenter says:

    The perspectives in the letter are fed by many years of experience in building entity-based applications using the various techniques and frameworks that our evolving awareness of issues led us to along the way.

    It's great that you're questioning the validity of the claims of the letter and expressing your perspective.  I don't think that we can possibly have the same perspective because of the different experiences between us.

    Frankly, we can't really argue this issue on a peer level.  You'll have to practice entity-based designs within the context of practices that support reversability and the levels of productivity we get from choices of tooling and approach that have been honed by quite a bit of time invested in trial and error over the years.

    And yes, I know that you can take this comment as pomp and arrogance.  That always seems to be the risk in the .NET developer community when we tell someone that there's much more experience to be gained and much more learning to do. [Emphasis added.]

    Sounds like serious hubris to me. I wonder who was the author. (The comment form doesn’t have provision for entering a name or URL, but the author could easily have done so in the comment’s body.)

    Update 6/25/2008: The author of the comment to Tim Lee’s post was Scott Bellware. See his comment to this post.

    Fear and Loathing

    That’s the coincidentally appropriate name of Bil Simser’s blog that contains his ADO.NET Enity Framework Vote of No Confidence post of June 23, 2008. (He’s one of the Manifesto’s MVP signatories.) If you really want to stick the knife in, accuse users of being “VB6 drag-n-drop programmers,” as in this excerpt:

    Over the past year or two, I've been a casual observer into the Entity Framework coming out of Microsoft. Being an ALT.NET guy, the world tends to revolve around NHibernate for me so I've already got an excellent OR/M tool in my toolset. One of the big issues with EF that we've recognized is the general direction Microsoft has taken with it, following a data centric model rather than an object one. …

    What we see on the horizon is a new breed of VB6 drag-n-drop programmers embracing EF as the next Messiah. We see a new generation of developers focused on mapping their data models and missing the target of architecting and constructing well designed systems.

    It appears to me that the “NHibernate Mafia” are becoming the “ALT.NET Third Reich.” I’m surprised Bil didn’t sign his post “Elvis” or “Einstein.”

    My conclusion is that the NHibernate Mafia is attempting to protect a vested interest in NHibernate as a result of the investment in time and effort to needed to become an apprentice NHibernate plumber, let alone a journeyman. You need to bill a large number of client-hours to recoup the learning curve. An O/RM tool that can handle, say 80%, of the bread-and-butter applications that keep most developers mortgage paid with RAD design tools must truly be a chimera.

    Tim Mallalieu Responds to the Petitioners

    Unlike Zola, the petition signatories weren’t prosecuted for libel, nor were they requested to recant their theses, as Pope Leo X insisted of Luther. Instead, Tim Mallalieu quickly addressed the issues raised in the manifesto by his Vote of No Confidence post of June 24, 2008. Entity Framework v2 will deal with theses 1, 2 and 4. I’m not convinced that thesis 3 is well taken. Issue 5 appears to be up in the air at the moment.

    Mary Jo Foley’s Testers give Microsoft’s Entity Framework a no-confidence vote post of the same date puts the manifesto in perspective. Scott Bellware, who said in this comment that he was “the principal author” of the petition, requested that Mary Jo recant her classification of the signatories as “testers.” Scott’s comment to my persistence ignorance post, my reply, and Danny Simmons’ response start here. Scott’s primary concern at the time was availability of the EDM Designer in v1, not data-centricity.

    Update 6/25/2008: Mary Jo’s column hit Techmeme on 6/24/2008 at 4:45 PM. My favorite comment to her column: “I'm not a tester: I've never installed nor tested an Entity Framework beta, but I signed the vote of no confidence” by odenni.

    The manifesto had 226 signatories by 6/25/2008 at 8:30 AM.

    Rebuttals to the Manifesto

    Julie Lerman’s Oh that no-confidence vote on E.F. post of June 24, 2008 is a reasoned objection to the purpose, and therefore much of the substance, of the petition.

    Update 6/24/2008 1815 PDT Added below:

    But the most detailed, measured and even-handed response to the manifesto comes from Ward Bell, VP of Product Management of IdeaBlade, Inc. who posted Rejoinder #1 to "Vote of No Confidence in Entity Framework" late Wednesday. IdeaBlade produces the DevForce .NET enterprise application development framework. Its DevForce EF integrates EF with the DevForce framework to add advanced mapping and LINQ features.Dev Force contributes n-tier capabilities with its Business Object Server (BOS) and a full object graph caching on the client. DevForce EF is in the release candidate stage, which qualifies IdeaBlade in my view as an enterprise class user. A beta of a Silverlight 2 DevForce EF client is due in four to six weeks.

    His post covers too much territory to summarize here. Just read it.

    Update 6/25/2008: Dinesh Kulkarni’s Design of LINQ to SQL - What was I thinking or was I? post of 6/24/2008 is a parody of the manifesto’s author(s) position.

    New Zealand (Kiwi) Australian developer Keith Patton’s A vote of confidence for the Entity Framework post of 6/24/2008 begins:

    I've been working solidly with EF since the SP1 beta came out and can honestly say it's holding up very well across a large, enterprise data model structure, and alongside usage of a repository pattern and dependency injection to factor out most of the direct dependencies on the EF ObjectContext, we have a system that can move towards POCO over time with relatively little refactoring.

    And continues with a detailed refutation of the manifesto’s theses.

    Update 6/25/2008: Corrected Keith’s locale (see comments).

    New Entity Framework Design Blog Announces Transparent v2 Design Process

    Tim Mallalieu’s first post since taking over as Entity Framework (EF) program manager in the Autumn of 2007, Transparency in the design process of June 23, 2008, describes what’s in store for EF v2:

    • Persistence Ignorance (PI) with full Plain Old CLR Object (POCO) support for state management and ObjectContext interaction
    • N-Tier Support for remoting object graphs with change tracking using WCF
    • Code-First domain modeling with convention-based mapping instead of v1’s data-centric, forms-over-data approach
    • Test-Driven Development (TDD) Scenarios with POCO and virtual ObjectQuery<T> and entity classes
    • Foreign Key modeling support in addition to associations
    • Lazy Loading options, possibly implicit lazy loading
    • Query Tree Re-Writing to enable filtering query results horizontally and vertically without attempting to modify the expression tree

    These are the features required take EF out of the curiosity category and move it to an enterprise-class framework that’s capable of competing on a level playing field with NHibernate. They are precisely the features that the so-called “NHibernate Mafia” claimed were missing from EF v1’s original design.

    For more background about persistence ignorance and POCO, see my Persistence Ignorance Is Bliss, but Is It Missing from the Entity Framework? post of March 14, 2007.

    Tim is adopting Pablo Castro’s transparent design process for ADO.NET Data Services (Astoria), which I recommended to the SQL Server Data Services (SSDS) team last week. Tim promises to expose the design process:

    What exactly would we make visible? In short, our design process. To be more concrete, I’m not talking about some fancy set of specifications. What I mean is that as we go through the detailed design of the various aspects of Entity Framework V2, we would post to this blog a) the meeting notes from our design meetings (the team has a design meeting twice a week, plus a lot of impromptu hallway chats), and b) deeper write-ups of specific design challenges where we’d like folks to understand how we’re approaching a problem and provide a channel for deep, detailed feedback.

    Notice that there’s no mention of LINQ to SQL in this post, which undoubtedly represents the death knell for future improvements to LINQ to SQL. See my Is the ADO.NET Team Abandoning LINQ to SQL? post of May 23, 2008 for an earlier travelogue about LINQ to SQL’s journey to legacy product purgatory.

    Update 6/24/2008 1500 PDT: Moved to a full post and following added:

    It might or might not be a coincidence that an ADO .NET Entity Framework Vote of No Confidence petition in the form of a WuFoo form with attached Entity Framework Vote of No Confidence Signatories table appeared almost simultaneously with Tim’s original post.

    Get the full story in the Tim Mallalieu Addresses “ADO .NET Entity Framework Vote of No Confidence” Manifesto post of 6/24/2008.

    Wednesday, April 02, 2008

    LINQ and Entity Framework Posts for 3/31/2008+

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

    Microsoft France Academic Interns Create Visual LINQ Query Designer (VLinq)

    Mitsuru Furuta, Microsoft France's manager and technical lead of the VLinq project, recruited two talented students, Simon Ferquel and Johanna Piou, who was a French Imagine Cup participant, to write a Visual Studio designer template that helps LINQ naifs write LINQ queries on a graphical design surface implemented in WPF.

    Mitsu's Visual Linq query builder for Linq to Sql: VLinq post of April 2, 2008, offers a brief history of the VLinq project and a step-by-step demonstration with LINQ to SQL as the data source. He says the project took "almost one year of work and organization." The student internships lasted six months.

    Here's the Visual LINQ Query Designer surface running a simple query:

    Do you see something missing in the generated T-SQL prepared statement?

    You can download the add-in template from MSDN Code Gallery.

    Added: April 2, 2008

    Microsoft Data Centers Expand the Unit of Deployment from Bricks to ISO 668 20-Foot Intermodal Containers

    Mary Jo Foley reports in her Microsoft builds out its first containerized datacenter post of April 2, 2008 that the new Northlake, Ill. data center will use containers holding 1,000 to 2,000 servers as the basic unit of deployment.

    Mike Manos who leads the Microsoft Global Foundations Data Center team made the first public announcement of a containerized production data center at Data Center World. According to Microsoft Data Architect James Hamilton:

    The Microsoft Chicago facility is a two-floor design where the first floor is a containerized design housing 150 to 220 40’ containers each [holding] 1,000 to 2,000 servers. Chicago is a large facility with the low end of the ranges Mike quoted yielding 150k serves and the high end running to 440k servers.

    The Database Bricks/Containers Backstory and Their Relation to SSDS

    I wrote about bricks and containers as units of data-center deployment almost two years ago (to the day) in my Very Large Databases: Bricks, BitVault and BigTable post of April 6, 2006. That post's "Really Big Smart Bricks and Databases" topic starts with:

    The ultimate brick is a Google data center in a shipping container, as postulated by PBS's Robert X. Cringely (Mark Stephens) in his 11/17/2005 column, "Google-Mart: Sam Walton Taught Google More About How to Dominate the Internet Than Microsoft Ever Did."

    I concluded:

    Clearly, large distributed file systems and databases must run on very big smart bricks or hardware of similar scale. Google probably probably runs the world's largest distributed file system.

    It's a reasonably safe bet that future Midwest users of SQL Server Data Services will be accessing data in the container instead of data in the cloud.

    The "VLDB Implementation/Deployment Issues" topic quoted Dare Obasanjo's "Greg Linden on SQL Databases and Internet-Scale Applications" post, which in turn quotes Greg Linden:

    What I want is a robust, high performance virtual relational database that runs transparently over a cluster, nodes dropping in an out of service at will, read-write replication and data migration all done automatically. I want to be able to install a database on a server cloud and use it like it was all running on one machine.

    and goes on to describe Adam Bosworth's database requirements of the time:

    Adam Bosworth, who managed the intial development of Microsoft Access, went on to found CrossGain (together with Tod Neilsen, Access marketing honcho), sold CrossGain to BEA and became BEA's chief architect and senior vice president, and [was then] VP Engineering at Google, lists these three features that database users want but database vendors don't suppply: Dynamic schema, dynamic partitioning of data across large dynamic numbers of machines, and modern [Googlesque] indexing. Adam wants the the Open Source community to "[g]ive us systems that scale linearly, are flexible and dynamically reconfigurable and load balanced and easy to use." Adam does mean give, not sell.

    It seems to me that BitVault's smart bricks with appropriate deployment and management applications would fulfill Greg's and all but Adam's economic desires for reference data, which now constitutes more than half of the data stored by North American firms

    The tragedy is that Jim Gray didn't live to witness the massive scaleup and scaleout of his original CyberBrick concept.

    Added: April 2, 2008

    DevExpress Implements LINQ Data Sources for ASPxGrid View and XtraGrid

    The Server mode using LINQ? Let's wax rhapsodic post of April 1, 2008 by DevExpress CTO Julian M. Buckness describes how DevExpress refactored its ASP.NET and Windows form grid controls from dependence on eXpress Persistent Objects (XPO) to support for any LINQ provider that returns an IQueryable<T> type.

    The DevExpress's 2008 Volume 1 release adds LinqServerModeDataSource for pageable ASPxGridView controls for ASP.NET, which appears to emulate the ASP.NET LinqDataSource. The LinqServerModeSource supports the XtraGrid and adds similar paging capability. You can view a short screen cast that demos LinqServerModeDataSource here.

    The "Developer Express uses LINQ for grid controls" article for SDTimes by David Worthington became one of the magazine's Top Stories by April 2, 2008.

    Added: April 2, 2008

    Eugenio Pace Implements a Mock SSDS for LitwareHR with SQL Server Express

    Eugenio's LitwareHR on SSDS - Part IV - Data access enhancements 2: developing offline post of April 1, 2008 describes how the new SQL Server Data Services (SSDS) version of LitwareHR implements a proxy to let developers switch between SSDS and a local SQL Server Express instance as the data source for the demo project.

    Eugenio's post describes his objective in implementing the proxy:

    Our goal while developing LitwareHR was to actually make the dev team as independent and autonomous as possible. Notice I say the dev team, not the application itself. We were comfortable in taking a dependency with SSDS for runtime, that is when LitwareHR would be deployed in a production data center. But we wanted developers to be able to work even if they are flying on a plane with no connectivity (like I was!). In one sentence we wanted a "mock SSDS".

    With this in mind, we developed a new proxy implementing the same interface the real proxy implements, but against a local SQL Server Express database.

    Following are previous posts in Eugenio's LitwareHR for SSDS series:

    Added: April 2, 2008

    Dave Robinson Writes in 20 Minutes an SSDS Client That Adds and Retrieves Red Bull Recipes to/from SSDS

    Challenged to write a "full-featured" SSDS app in the 20 minutes before his CodeTrip presentation last Friday at the Red Bull headquarters in Santa Monica, Dave came up with the project he describes in his SSDS @ Red Bull post of April 1, 2008. The project uses the Excel Add-in for SSDS that Dave describes in his Using Excel with SSDS post of March 21, 2008.

    [Dave's link to SSDS @ RedBull in his SSDS, The Code Trip & Red Bull post of April 1, 2008 doesn't work for me; it's fixed above.] Dave fixed his link.

    Update April 3, 2008: You can watch a 09:54 TechjZulu video segment that includes an interview with Dave, which begins at 02:40.

    TechZulu claims to be "one of the first weblog that introduces southern California's companies to the technology community."

    Added: April 1, 2008 Updated: April 2, 2008

    Noam Ben-Ami Describes Entity Framework's Future Update Model from Database Feature

    Noam's Update Model From DB post of April 1, 2008 describes the post-CTP2 version of the Entity Data Model (EDM) Designer's Update Model from Database feature that detects changes to the data store's schema and modifies the physical schema (SSDL) and the mapping (MSL) layer as follows:

    1. Adds EntityTypes, Properties and/or Associations for objects that have tables or columns in the database but are missing from the EDM. You can select which tables, columns, or both to add.
    2. Modifies EntityTypes, Properties and/or Associations where database tables or columns have changed from the structure represented by the current SSDL schema.
    3. Removes EntityTypes, Property and/or Associations from the SSDL only whose database tables or columns have been deleted from the database. This process doesn't delete the element from the model (CSDL section).

    The post-CTP2 EDM Designer handles renamed entities or properties, but not renamed tables or columns.

    Noam says that these are the limitations of the forthcoming designer:

    • It does not update the types of properties when the corresponding database columns change.
    • It does not “resurrect” entity types – once you have deleted a type, the only way to get it back is to recreate it manually, or delete the corresponding SSDL by hand in the XML editor.
    • It will also not “resurrect” properties.
    • If you change the keys that define your type, all current associations lose their identity and new associations will be brought in – you will need to delete old associations.
    • It cannot detect database object renaming – renames will show up as the deletion of an old object and the addition of a new one.

    Of all the improvements, my favorite is the ability to handle renamed entities because I work primarily with tables having plural names which I always singularize for entity names.

    Added: April 1, 2008

    Oren Eini: NHibernate 2.0 Alpha 1 Released

    Ayende says in his NHibernate 2.0 Alpha is out! post of March 31, 2008:

    It gives me great pleasure to announce that NHibernate 2.0 Alpha 1 was released last night and can be downloaded from this location.

    We call this alpha, but many of us are using this in production, so we are really certain in its stability. The reason that this is an alpha is that we have made a lot of changes in the last nine months (since the last release), and we want to get more real world experience before we ship this. Recent estimates are of about 100,000 lines of code has changed since the last release.

    NHibernate is the standard of comparison for Windows object/relational mapping (O/RM) tools. The "NHibernate Mafia" (James Kovacs, Scott Bellware, Jeffrey Palermo, and Jean-Paul Boodhoo) were responsible for making the Entity Framework folks finally understand what persistence ignorance is all about.

    Added: April 1, 2008

    SQL Server Data Services Team Seeks Ruby on Rails, PHP and Java Developers for April SDR

    Ryan Dunn's Interested in SQL Server Data Services? post of March 31, 2008 touts early access to SSDS and a seat at an SSDS software design review (SDR) at the Microsoft Silicon Valley Campus on April 24 - 25, 2008 for developers using non-Microsoft technologies, such as Ruby on Rails, PHP and Java.

    PS: Watch for my cover story about SSDS coming in the July 2008 issue of Visual Studio Magazine.

    Query Caching In ADO.NET Data Services Feedback Wanted

    Pablo Castro is seeking feedback from users of ADO.NET Data Services (Astoria) about the tradeoff between the performance benefit of compiling/caching data retrieval queries and the code complexity of defining the queries when taking advantage of Astoria's query interceptor feature. Pablo's Looking for feedback: query caching in data services post of March 31, 2008 dives deep into the caching issues.

    Data retrieval queries involve elaborate, provider-specific composition. For example, Pablo cites this flow for Astoria with Entity Framework as the data provider:

    URL -> Expression Tree -> Canonical Query Tree -> View expansion/Query simplification -> Canonical Query Tree -> SQL -> Rows (DataReader) -> Entities (DataReader) -> Objects -> Serialization (Atom/JSON)

    Thus compiling and caching these queries, especially complex ones that involve deeply nested data structures resulting from use of the $expand keyword, has a very beneficial effect on performance. Undoubtedly the perf improvement will be substantially greater than that reported for LINQ to SQL by Rico Mariani in his famous five-part DLinq (LINQ to SQL) Performance series, as well as his more recent Performance Quiz #13 -- Linq to SQL compiled queries cost of January 11, 2008 and Performance Quiz #13 -- Linq to SQL compiled query cost -- solution of January 14.

    Data interceptors, which enable adding a custom filter predicate to the query, are commonly used to implement data access control but complicate the compiling/caching process. What Pablo is seeking is opinions on the relative importance of query performance versus code complexity for implementing data inceptors. Without knowing how much the perf benefit is affected by the two options he offers at the end of his post's Part 2, it's difficult to make a recommendation. I'm inclined to favor performance because the interceptor code is likely to be suited to cookbook-style documentation.

    The ultimate decision is likely to affect SQL Server Data Services, also.

    PS: Watch for my cover article, "Retrieve and Update Data in the Cloud with Astoria," about ADO.NET Data Services coming in the May 2008 issue of Visual Studio Magazine.

    PPS: My "ASP.NET MVC: Is the new MVC pattern right for you?" TechBrief is in the March 15, 2008 issue of Redmond Developer News. Unlike on p. 27 of the print edition, the electronic version has the right blog address.

    Taking Advantage of Stored Procedures in the Entity Framework

    The Entity Framework (EF) defaults to generating dynamic parameterized Entity SQL (eSQL) statements to populate (hydrate) entities from tables in the underlying relational data store and parameterized data manipulation language (DML) statements to create, update and delete entities and their associated tables.

    Many organizations and individual DBAs prefer or insist on the use of stored procedures rather than dynamic SQL for SELECT, INSERT, UPDATE or DELETE operations. Stored procedures prevent the need to grant users direct access to tables, which could compromise database security. In many cases, the capability to efficiently execute stored procedures instead of dynamic SQL is the principal determining factor in choosing an object/relational mapping (O/RM) tool.

    EF has built-in support for stored procedures but there's no central source of complete, up-to-date documentation and how-to information for using stored procedures with the current Beta 3 version and its Entity Data Model (EDM) Designer CTP 2. The EF Extensions, which add flexibility in the use of custom stored procedures and speed their execution, hasn't been widely used or thoroughly documented. (There were only 181 EF Extension downloads from the MSDN Code Gallery as of 3/31/2008, and Colin Meek only recently published his ADO.Entity Framework: Stored Procedure Customization article on 3/26/2008)

    The following three articles contain detailed instructions with screen captures and code examples for creating entities, changing from dynamic SQL to stored procedures, testing EDMs with stored procedures, as well as minimizing the number of stored procedure calls and improving performance with the EF Extensions:

    Migrating to SQL Server Stored Procedures with the EDM Designer December CTP 2 (March 27, 2008)

    Testing Stored Procedure Replacements for Entity SQL Statements (March 29, 2008)

    Minimize Stored Procedure Calls and Improve Performance with EF Extensions (March 30, 2008)

    Jim Zemlin: "The Linux ecosystem should pay attention to" SQL Server Data Services

    Jim Zemlin is the Executive Director of the Linux Foundation so his advice is well taken, especially by Microsoft. In his Cloud Computing - Did anybody notice Microsoft’s SQL Server Data Services Announcement? post of March 14, 2008, Jim says:

    Linux has an early lead in this area with service offerings like Amazon’s Linux based S3 and IBM’s Blue Cloud which uses Xen and PowerVM virtualized Linux operating-system images.

    Today Web 2.0 start ups are flocking to these services as a way to reduce their cost, have world class infrastructure, and most importantly to be able to scale up and down based on demand. It won’t be long before mainstream enterprises follow this trend. It turns out that IT operations combined with convenient tools is something that will be the core competency of companies like Google, IBM, Amazon, and Microsoft in the future. ...

    A product from Microsoft that doesn’t require their tools or lock you into their platform offered as a service over the web? Time[s] are indeed a changing. The interesting thing about this is that the folks who need to adjust for this change the most are software companies that don’t have broad IT operations infrastructure and management competencies similar to the likes of Google and Amazon. Software companies like Microsoft are waking up to this. Are other going to follow suit? [Emphasis added.]

    Like many others, Jim identifies the wrong services as SSDS competitors. Amazon's S3 stores raw data (blobs) and IBM touts Blue Cloud as providing on demand computing services, similar to Amazon's EC2. SSDS's only direct competitor is Amazon's SimpleDB, as far as I've been able to determine.

    Thanks to the SSDS Team for the heads up.

    Added: April 1, 2008 [Not an April Fool]

    Video: Liam Cavanaugh and Neil Padgett Demonstrate Synchronizing SSDS Data with Access and Outlook

    From the Microsoft Sync Framework blog's Sync to the Web - Enable Offline Access to Web Data from any Data Store post of March 12, 2008:

    At MIX 2008 Liam Cavanagh discusses how to use the Microsoft Sync Framework along with SQL Server Data Services to provide synchronization cabability across multiple applications.

    In the demonstration, he synchronizes contacts between Microsoft Access, Outlook and SQL Server Data Services. However, by building new providers, any application can participate in synchronization.

    Later in the presentation Neil Padgett goes through a detailed internals discussion of the Microsoft Sync Framework metadata and provider models.

    You can view the WMV (high or low bitrate) version of the 41:00 informal presentation. Here's another link to Neil's formal MIX 08 session: Using Microsoft Sync Framework and FeedSync (T32).

    The OakLeaf Systems blog will start carrying more Sync Framework/Services content because of its importance to SSDS and its pending integration with Astoria to create "Astoria Offline."

    Here's a link to an earlier "Introducing Microsoft Sync Framework" presentation by Moe Khosravy, the lead PM for the Sync Framework.

    Added: April 1, 2008