Saturday, October 25, 2008

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

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

Updated 10/25/2008 3:30 PM PDT: Minor additions
Updated 10/23/2008 9:00 AM PDT: Amazon EC3 (big news), EF, LINQ to SQL, LINQ, Astoria, and SSDS/Cloud Computing additions
• Updated 10/22/2008 3:00 PM PDT: Several additions

Links to Streaming PDC 2008 Keynotes from Guy Burstein:

Monday: 10/27
8:30 a.m. - 10:30 a.m.
100 kbps | 300 kbps | 750 kbps

Tuesday: 10/28
8:30 a.m. - 10:30 a.m.
100 kbps | 300 kbps | 750 kbps

Entity Framework and Entity Data Model (EF/EDM)

••• Jarek Kowalski provides a detailed step-by-step guide for Using EF Oracle Sample Provider with EDM Designer on 10/24/2008. Jarek says:

Many people are asking if it is possible to use EFOracleProvider with EDM Designer in Visual Studio 2008 SP1. The answer is yes, but because the sample doesn't include a DDEX provider required for VS integration, there are certain steps that have to be run manually.

Jarek’s guide has 15 steps.

Steve Lasker offers a tutorial for delivering SQL Server Compact (SSCE) with EF client applications in his Privately Deploying SQL Server Compact with the ADO.NET Entity Provider post of 10/21/2008. The highly detailed process covers SSCE installations on locked-down computers whose users don’t have Administrator accounts.

Bill Vaughn’s Is Microsoft Listening or Open for Output Only? post of 10/22/2008 proposes that Microsoft add semi-mandatory WHERE clauses and remove SELECT * options from SQL-generating wizards.

He also states that devs using the Entity Framework must process schema changes manually. I noted in a comment that “the Entity Data Model Designer has an Update from Database context menu command that opens a tabbed dialog that regenerates the entity classes automatically.”

Saaid Kahn, a Program Manager on the Visual Studio Pro Tools team, describes how to create an n-tier database application  using ADO.NET Data Services (Astoria) and an Entity Data Model, in this Channel 9 Interview: ADO.NET Data Services in Visual Studio 2008 SP1 of 10/21/2008 by Beth Massi. (Copied from Astoria.)

David Sceppa announced on 10/21/2008 that Sybase's SQL Anywhere ADO.NET Provider Supports the ADO.NET Entity Framework!

Julie Lerman’s Best approach for teaching first exposure to Entity Framework post of 10/20/2008 discusses her choice between “teaching EF from the top down (EDM, LINQ to Entities, Object Query then EntityClient) or bottom up (EDM, EntityClient, ObjectQuery then LINQ to Entities).”


••• Anders Janmyr’s TDD and LINQ to SQL post of 10/25/2008 describes two interfaces, IUnitOfWork and ITable<T>, two classes LinqToSqlUnitOfWork and LinqToSqTable<T> and for testing purposes two additional classes InMemoryUnitOfWork and InMemoryTable<T>, which make it “easy to mock out the Persistence Layer when using LINQ to SQL.”

This is another interesting example of the third-party efforts devoted to improving the testability of LINQ to SQL.

••• Jon Skeet asks What other Enumerable extension methods would you like to see? on 10/23/2008. So far, comments have requested a number of candidates.

Michael Minutillo describes an abstraction of LINQ to SQL for his MvcSupportFacility for ADO.NET MVC that uses the Unity Inversion of Control (IoC) container in his detailed Linq Repositories, Lifetime Manaqement and Unity post of 23 October 2008.

Scott Hanselman’s Informal .NET Subsystem Survey shows use of LINQ to SQL is within about 5% of ADO.NET DataSets (1,734 to 1,887) among the 4,899 responses that comprise his Survey RESULTS: What .NET Framework features do you use? post of 10/22/2008.

• Matt Hunter is close to releasing his base class that supports n-tier, disconnected operation of LINQ to SQL. The LINQ to SQL Entity Base Release Candidate 3 post includes links to LINQ to SQL Entity Base - Disconnected LINQ Version 1.0 Release Candidate 3 of 10/22/2008. The project’s CodePlex home page explains its features.

This release features bidirectional serialization with the DataContractSerializer and the IsReference attribute for many:one associations. It requires a licensed version of VS 2008 SP1, not the Express edition.

• Jim Wooley’s Updated source for ThinqLinq now available post of 19/21/2008 offers 18 months of accumulated updates to his LINQ-based blogging application.

 Cirilo Meggiolaro Tip of the day #3 - Getting details of a LINQ change conflict exception explains an “easy way to get a list of tables and columns that have thrown the exception. The [sample] code … catches the exception and loop through conflict objects to generate a full report.”

LINQ to Objects, LINQ to XML, et al.

Agnes Molnar (Aghy) reports on 10/25/2008 that Linq4SP - RC2 is available to download! from here. Her post includes a list of RC1 bugs fixed in RC2.

LinqMaster’s How to Get a List of Installed Applications with LINQ post of 10/22/2008 shows you how to reduce the number of lines of C# 2.0 code in half with LINQ to Objects.

Jay Sawyer conducts a series of performance tests against LINQ to Objects and observes some unexpected results in these two recent posts:

Part II includes comparisons with DataViews, filtered DataSets, LINQ to Objects, and LINQ to SQL.

Eric White’s Creating Data-Bound Content Controls using the Open XML SDK and LINQ to XML explains how to “take a document that has un-bound content controls, generate a custom XML part automatically (inferring the elements of the custom XML from the content controls), and then bind the content controls to the custom XML part.”

Bart De Smet “The C# Programming Language Third Edition” and thoughts on language evolution is a lengthy essay on the history of C# 2.0/3.0 features and features to be expected in C# 4.0.

In his LINQ to Anything – Channel 9 interview and a few more thoughts, Bart expands on Channel9’s announcement with links to related blog posts. He also “elaborate[s] a bit on fan-in and fan-out and [his] statement on the square infinity possibilities of LINQ, and take[s] a look at the following slides from a recent presentation [he] delivered on the topic” of LINQ to ∞ Squared “Proof Obligation” and “Function Composition.”

Jim Wooley’s LINQ is not an excuse for sloppy code post of 10/20/2008 warns developers to limit the number of elements returned to LINQ to SQL projects by LINQ queries by always including a Where predicate or Skip/Take function pairs.

ADO.NET Data Services (Astoria)

••• Pablo Castro mentioned but refused to describe an unlisted PDC 2008 stealth session in Channel 9’s Astoria Design Walkthrough: No design... just plugging our PDC talks! video of 10/24/2008. The session turns out to be ES07 Modeling Data for Efficient Access at Scale (Wed 10/29 | 1:15 PM-2:30 PM | 403AB):

Learn how to model data for cloud services. Topics include: mapping common data idioms to tables, tuning data models for common access patterns, and creating efficient queries.

The interview also includes uninspired descriptions of Pablo’s TL08 Offline-Enabled Data Services and Desktop Applications (Wed 10/29 | 3:00 PM-4:15 PM | 408) and Mike Flasko’s TL07 Developing Applications Using Data Services (Tue 10/28 | 1:45 PM-3:00 PM | 151) published presentations.

••• Phani Raju takes on one:many associations in his Working with associations in ADO.NET Data Services , Part 2 tutorial of 10/23/2008. Part 1 of the series, Working with Associations in ADO.NET Data Services, of July 2, 2008 covered one:one associations.

•• Pablo Castro describes several first-priority scenarios for “Astoria Online” in his Astoria futures: offline-enabled data services post of 10/22/2008:

  • Outlook-style 1-tier applications that connect to a local data store (presumably SQL Server Compact v3.5 SP1) and synchronize with an online data store such as SQL Server Data Services (SSDS), SQL Server 2008 running under Windows Server 2008 on Amazon EC2 or from a Microsoft data center.
  • Independent clients and servers in a synchronization relationship, such as a service that’s available for Web-based synchronization only.
  • Local replicas of cloud-stored data, such as SSDS entities stored locally on SSCE.
  • Data consolidation by synchronizing slices of data from multiple cloud-stored sources.

Pablo’s Astoria Design Walkthrough: Thinking of a future with sync & offline video is a preview of his Offline-Enabled Data Services and Desktop Applications session at PDC 2008 (Wed 10/29 | 3:00 PM-4:15 PM | 408A).

Scott Hanselman’s Informal .NET Subsystem Survey shows use of ADO.NET Data Services is substantially greater than that of Entity Framework based on the 4,899 responses that comprise his Survey RESULTS: What .NET Framework features do you use? post of 10/22/2008.

Question: Did the respondents simultaneously select a LINQ to SQL or Entity Framework data source for Astoria? Doesn’t look like it to me from the data.

Saaid Kahn, a Program Manager on the Visual Studio Pro Tools team, describes how to create an n-tier database application  using ADO.NET Data Services (Astoria) and an Entity Data Model, in this Channel 9 Interview: ADO.NET Data Services in Visual Studio 2008 SP1 of 10/21/2008 by Beth Massi. (Copied from EF.)

Phani Raju’s Accessing Cross-Domain ADO.NET Data Services from the Silverlight Client Library of 10/20/2008 discusses guidelines for cross-domain access using the Silverlight Client Library

Gil Fink describes Building an Ajax Client for ADO.NET Data Services to complement his previous Astoria posts:

Roy T. Fielding’s REST APIs must be hypertext-driven post of 10/20/2008 takes the following position on the rules a REST API should follow:

  1. A REST API should not be dependent on any single communication protocol, though its successful mapping to a given protocol may be dependent on the availability of metadata, choice of methods, etc. …
  2. A REST API should not contain any changes to the communication protocols aside from filling-out or fixing the details of underspecified bits of standard protocols, such as HTTP’s PATCH method or Link header field. …
  3. A REST API should spend almost all of its descriptive effort in defining the media type(s) used for representing resources and driving application state, or in defining extended relation names and/or hypertext-enabled mark-up for existing standard media types. …
  4. A REST API must not define fixed resource names or hierarchies (an obvious coupling of client and server). Servers must have the freedom to control their own namespace. …
  5. A REST API should never have “typed” resources that are significant to the client. Specification authors may use resource types for describing server implementation behind the interface, but those types must be irrelevant and invisible to the client. …
  6. A REST API should be entered with no prior knowledge beyond the initial URI (bookmark) and set of standardized media types that are appropriate for the intended audience (i.e., expected to be understood by any client that might use the API). …

The way I read the full version of Fielding’s six rules, Astoria isn’t a RESTful API. Perhaps Pablo Castro would care to contest my conclusion or, for that matter, Fielding’s criteria.

ASP.NET Dynamic Data (DD)

••• Rob Conery’s ASP.NET MVC Storefront Part 23: WebForms and Dynamic Data of 10/24/2008 announces the start of a new Commerce Starter Kit v3.0 that’s uses “components and business logic based on the same components and business logic used for MVC Storefront but with a traditional WebForms UI” that will use LINQ, support full localization, and other new features described in J Sawyer‘s Commerce Starter Kit 3.0 – CSK Reprise post of the same date. The project will include an administrative site based on DD and LINQ to SQL.

You can watch this 15:00 video with Rob and J that describes the project. Support for CSK 3.0 will be part of J’s job description as a Microsoft developer evangelist.

•• Steve Naughton continues his DD posts with a question from the Dynamic Data forum in his Dynamic Data - Hiding Tables on the Default.aspx page post of 10/24/2008.

Steve Naughton’s Dynamic Data - Hiding Columns in selected PageTemplates of 10/20/2008 returns to IAutoFieldGenrators, attempts to specify the page template on which to hide columns.

SQL Server Data Services (SSDS) and Cloud Computing

••• David Robinson of the SSDS team says in his 2 Days to PDC2008!!!!!!!!!!!!! post of 10/24/2008:

We have some really super, pimped out, mack daddy, completely awesome stuff coming. Both in the teams presentations and in new features for Sprint 5. I just sent out the new features list to some internal softies for "Word Smithing" which you all should see in a few days, and the list is long and chock full o' goodies.

PS - I promise much more posting after Monday.

Promises, promises???

••• Ludwig Siegele analyzes the trend to mobile datacenters (Microsoft), virtualization (VMWare), and cloud computing (Amazon Web Services and Google App Engine) in his Where the cloud meets the ground: Data centres are quickly evolving into service factories special report for the 10/23/2008 issue of the Economist.

•• Roger Jennings reports another spurious attempt to register a trademark on “Cloud Something” in Arista Networks Claims “Cloud Networking” As Its Trademark of 10/24/2008.

••• Alan Williamson will conduct a one-day, hands-on Cloud Computing Bootcamp on 11/29/2008 in conjunction with Sys-Con’s Cloud Computing Expo at San Jose’s Fairmont Hotel. The (pricey) registration fee rises from $1,695 to $1,795 tomorrow. (List price is $1,995.)

•• Jeff Barr reports the following about Amazon EC2, Windows 2003 Server, and SQL Server 2005 in his Big Day for Amazon EC2: Production, SLA, Windows, and 4 New Capabilities post of 10/23/2008:

  • Amazon EC2 is now in full production. The beta label is gone.
  • There's now an SLA (Service Level Agreement) for EC2.
  • Microsoft Windows Server 2003 is now available in beta form on EC2.
  • Microsoft SQL Server 2005 is now available in beta form on EC2.
  • We plan to release an interactive AWS management console.
  • We plan to release new load balancing, automatic scaling, and cloud monitoring services.

It will be interesting to see whether Microsoft’s corresponding offering (or SSDS) will be price-competitive and when it will go online with an SLA.

It’s curious that Amazon is hosting non-current versions of Windows Server and SQL Server, which isn’t well-advertised on the AWS site. Perhaps Microsoft’s licensing terms were better than those for the 2008 versions.

Mary Jo Foley chimes in with Amazon battens down the hatches before Microsoft’s cloud launch next week and Werner Vogels posts Using the Cloud to build highly-efficient systems.

It wasn’t such a big day for Amazon stock: Down as much as 13% today (Thursday).

For a synopsis of pricing, see my Amazon Web Services Announces SLA Plus Windows Server and SQL Server Betas for EC2 post. That post hit Techmeme at 3:05 PM EDT

•• Jake Sorofman’s The Cloud Computing Adoption Model post of 10/23/2008 is a “context for thinking strategically about cloud computing” that’s “[l]oosely modeled after the Capability Maturity Model (CMM) from the Software Engineering Institute (SEI) at Carnegie Mellon University.” Note that CMM has been superceded by CMM-Integration (CMMI).

Frank Gens predicts the Cloud Computing market will grow from $16 billion in 2008 to 42 billion in 2012, an annual compounded growth rate of 27% in IDC’s IT Cloud Services Forecast - 2008, 2012: A Key Driver of New Growth of 10/8/2008. IDC includes business applications, application development/deployment, system infrastructure software, storage, and servers expenditures in the estimates.

You can watch a three-minute video summary of the prediction and download slides at Cloud Computing |Preparing for the Next 20 Years of IT.

SSDS Team: Update Announcement Coming at PDC 2008 (10/20/2008)

The following message hit my inbox on 10/20/2008:

On October 27, 2008 we will be announcing, the next upgrade of SSDS at the PDC2008 conference in Los Angeles. In order to support this announcement, at that time we will update the documentation on the SSDS DevCenter site to include the new features in this upgrade. We will follow up on our PDC announcements, on the first day of the conference. …

The SSDS upgrade to be announced at PDC will be made available to you in early November.

Thank You,

The SSDS Team

Frank Gens’ IDC on “the Cloud”: Table of Contents post of 9/23/2008 offers links to recent IDC research on Cloud Computing:

SQL Server Compact (SSCE) 3.5 and Sync Services

Steve Lasker offers a tutorial for delivering SQL Server Compact (SSCE) with EF client applications in his Privately Deploying SQL Server Compact with the ADO.NET Entity Provider post of 10/21/2008. The highly detailed process covers SSCE installations on locked-down computers whose users don’t have Administrator accounts. (Copied from EF.)

Liam Cavanagh reports on 10/20/2008 that the updated RTM1 version of the Sync Framework download reported in last week’s LINQ and Entity Framework Posts for 10/13/2008+ item is Not an Updated Version of Microsoft Sync Framework.

Anthony Carrabino’s SQL Server 2008 Feature Pack Released post of 10/18/2008, which first appeared 10/21/2008 in the Data Platform Insider blog, notes that the Feature Pack includes SQL Server Compact SP1 and the Microsoft Sync Framework.

And, for what it’s worth, Euan Garden reports that SQL Server 2008, Reportbuilder RTMs on 10/20/2008 (but it’s not in the Feature Pack).

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

Aaron Skonnard delivers on 10/26/2008 two new episodes of his WCF Screencast series on Channel9:

Mike Taulty posted on 10/24/2008 detailed code samples for the first two of the three following questions that arose at his MSDN “Roadshow Rerun” in London

  1. Can ObservableCollection<T> cope with a particular element being replaced? Not Added. Not Deleted. Replaced.
  2. How to work with lookup fields in a database and data-bind to them?
  3. How to take action when an ItemsControl creates an item and get hold of the item's UI elements?

John Papa’s Day of Silverlight 2 Recap post of 10/24/2008 has a link to the slide deck for his Day of Silverlight 2.0 presentation in Tampa, FL. Not surprisingly, his

3.5-hour presentation [focused] on Silverlight 2 data binding, development techniques, using it with SOAP, ASMX, WCF, REST, 3rd party services, cross domain policies, debugging tips, and ADO.NET Data Services.

The slides are quite informative but sample code would be even more so. So I’ve requested in a comment that John post the demo source.

Microsoft has assembled a new SOA & Business Process site that, at least so far, consists primarily of agitprop for and links to existing Microsoft products and services. Hopefully, the site will gain some developer-oriented content after PDC 2008.

Rob Conery, Scott Hanselman and Phil Haack are writing Professional ASP.NET MVC for WROX/Wiley, scheduled to hit the shelves in February 2009, according to Rob’s ASP.NET MVC DropDownList and HTML Attributes post of 10/21/2008.

Mike Ormond’s ASP.NET MVC and Scottish Developers (Demo) post of 10/20/2008 includes a link to his demo code for the recent Scottish Developers User Group meeting.