Showing posts with label SSCE. Show all posts
Showing posts with label SSCE. Show all posts

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).”

LINQ to SQL

••• 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 endpoints.tv 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.

Sunday, September 28, 2008

LINQ and Entity Framework Posts for 9/22/2008+

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

• Updated 9/28/2008 3:00 PM PDT adding VS 2008 SP1, jQuery, ASP.NET MVC 
• Updated 9/27/2008 2:00 PM PDT with EF, LINQ to SQL, LINQ to XML, SSDS
•• Updated 9/26/2008 8:00 AM PDT adding EF POCO update, Silverlight RC0, DD
• Updated 9/25/2008 12:00 noon PDT including newly announced PDC 2008 sessions

Entity Framework and Entity Data Model (EF/EDM)

••• Julie Lerman’s No, I do not want Set in the name of my EntitySet post of 9/26/2007 echoes my Forcing Gratuitious Pluralization of EF EntitySet Names Was a Very Bad Decision post of 9/20/2008. Both of us abhor the enforced Set suffix for singularized EntitySets.

Jarek Kowalski released v1.03 of his EF POCO Adapter which focuses on n-tier scenarios and detached entities, according to his EF POCO Adapter updated (v1.03) post of 9/25/2008. Following are Jarek’s descriptions of the changes:

  • Added wrapper for ObjectContext.ApplyPropertyChanges() to IEntitySet<T>
  • Added wrapper for ObjectContext.Detach() to IEntitySet<T>
  • Fixed handling of detached/out-of-scope entities w.r.t lazy loading and attaching to other contexts. Lazy loading outside of scope will do nothing if the context had DeferredLoadingEnabled=false, otherwise will throw.
  • Added partial OnZZZCreated() methods on generated contexts, adapters and proxies to enable integration with 3rd-party extensions
  • Fixed code generation from EDMX.
  • EFPocoContext.EnableLazyLoading has been renamed to EFPocoContext.DeferredLoadingEnabled to better align with Linq to SQL and our plans for EF v2
  • Fixed adapter-POCO synchronization for complex types

You can download the source code from the MSDN Code Gallery’s Persistence Ignorance (POCO) Adapter for Entity Framework section.

Jarek’s previous posts about the EF POCO Adapter:

• Frans Bouma is interviewed by .NET Rocks! podcasters Carl Franklin and Richard Campbell "about his thoughts on the ORM revolution, his products, and the Entity Framework” in show #380. Frans’ interview starts at 14:00.

Frans says Microsoft has “put LINQ to SQL on the back seat,” which corresponds with the points I raised in my Is the ADO.NET Team Abandoning LINQ to SQL? post of May 23, 2008 (updated 5/23/2008). Carl Franklin also brings up Microsoft’s original position was that “Entity Framework is not an O/RM” at about 37:00.

Julie Lerman’s lengthy “Data Access Options in Visual Studio 2008” article for CoDe Magazine became available online on 9/25/2008. It’s a must-read for developers who need to decide on one of the seven .NET 3.5 SP1 data access technologies her article describes.

Note: Non-subscribers can view Page 1 only until two months after publication.

Muhammad Mosa starts a new multi-part Entity Framework tutorial with Inheritance and Associations with Entity Framework Part 1 of 9/24/2008, which (paraphrasing Moses) covers building simple associations between two entities and writing custom code to retrieve other parts of the relation when inheritance is applied.

His detailed, downloadable sample project contains the following, fully illustrated (by screen captures) topics:

  • How to define a model with Table-per-Hierarchy Inheritance
  • Creating Sub Entities
  • Define Mappings
  • Define An Abstract Class

LINQ to SQL

••• Fredrik Kalseth’s DataContext Repository Pattern Example Code post of 9/27/2008 contains a link to download sample code for his Linq to Sql, Programming Against an Interface and the Repository Pattern of 5/5/2008 about which Fredrik says:

The magic that lets us run queries against for example IPage, is in the Cast<T> extension method in System.Linq. By using it, it allows clients to ask the Repository<T> method for IPage, which then through the mapping configured in the static TableMaps dictionary (where at application startup I've added the mapping between IPage and Page) gets translated into a request for the Page table from the context, and then finally cast back to a IQueryable<IPage> before being returned to the caller, ready for querying against.

His earlier, related The Specification Pattern and Encapsulation post of 7/12/2008 links to Nicholas Blumhardt’s Implementing the Specification Pattern via Linq post of 7/6/2008.

Matt Manela publishes a reader’s simpler method for SSCE 3.5 connection sharing in his SQL CE 3.5 with LINQ to SQL Revisited post of 9/26/2008. The original post was SQL CE 3.5 with LINQ to SQL of 9/8/2008. (Repeated in SQL Server Compact 3.5)

Simon Segal supplements the post below with LINQ To SQL - Going POCO and more……! Part 2 of 9/25/2008, which discusses accessor mutators for EntitySet and EntityRef types.

Simon Segal generates a multifile assembly of his LINQ to SQL libraries for his POCO Custom Multifile Assembly and ReSharper post of 9/24/2008. His earlier LINQ To SQL - Going POCO and more…..! post describes his

Generic Repository approach [that] utilises POCO’s along with Specifications and Fetching strategies (an nHibernate concept). …

The idea of the generic repository began as an extension of the ideas expressed by Mike Hadlow in his article here which are derived from Ayende’s work here.

Simon discusses the design of his POCO generic Repository in his lenghty POCO improves inheritance for LINQ to SQL post of 8/26/2008.

• Damien Guard has fixed a few bugs in his Text Template Transformation Toolkit (v.74) on 9/25/2008 and there’s a new, corresponding version of my DamienGuardT4.sln project available from SkyDrive. For more details, see Bidirectional Serialization of LINQ to SQL Object Graphs with Damien Guard’s T4 Template in VS 2008 SP1, which was updated on 9/25/2008 also.

Nick Berardi demonstrates How NOT To Optimize LINQ Statements in his post about LINQ to SQL queries of 9/24/2008. Nick looked at the T-SQL generated by his complex LINQ to SQL query, which included a couple of let statements, and concluded 34 lines with three CASE statements was too many. His optimization reduced the number of lines to 16, but increased the execution time by a factor of 4.6.

Nick says:

The moral of the story is you probably don’t need to optimize your SQL query through LINQ, just keep it simple and optimize your LINQ statement and leave the rest up to the professionals at Microsoft who created the LINQ to SQL expression query generator.

LINQ to Objects, LINQ to XML, et al.

• Charlie Calvert has returned to his LINQ Farm series. LINQ Farm: LINQ to XML and Line Numbers of 9/26/2008 shows how to indicate line numbers in XML Documents with help from an XmlLineNumbers project from XmlLineNumbers.zip in CodeGallery’s LINQ Farm section.

Rinat Abdullin compares the performance of simple LINQ to Objects queries and hard-coded equivalents in his Some performance issues and caveats of LINQ of 9/25/2008.

ADO.NET Data Services (Astoria)

•••• Scott Hanselman offers a demonstration of jQuery 1.2.6 in conjunction with

  • ADO.NET Data Services and it's JavaScript Client Library
  • ASP.NET AJAX
  • ASP.NET AJAX Client Templating (Preview)

in his jQuery to ship with ASP.NET MVC and Visual Studio post of 9/28/2008. For more on Microsoft’s adoption of jQuery in VS 2008, see the Miscellaneous topic.

• Shawn Wildermuth reports about encountering performance problems in his online Silverlight 2 samples in his ADO.NET Data Services Performance Issues post of 9/25/2008.

The problem occurs with an Astoria query that retrieves many:one EntityRefs (Category and Supplier for each Product requested). Part of the problem might be that Shawn included the Category.Picture bitmap field in the query. LINQ to SQL, which is smart enough not to repeat T-SQL requests for objects currently in memory, doesn’t provide updatable Astoria objects out of the box. Entity Framework doesn’t support LINQ to SQL’s DRY (don’t repeat yourself) feature.

Steve Maine will present Microsoft .NET Framework: Developing RESTful Services at PDC 2008:

Learn the latest features in Windows Communication Foundation for building Web 2.0-style services that use URIs, HTTP GET, and other data formats beyond XML. See how these features can be applied to AJAX web sites, "REST" applications, and data feeds.

ASP.NET Dynamic Data (DD)

•• DLPanther announces plans for a series of articles about ASP.NET Dynamic Data in his ASP.NET Dynamic Data, The Next Data Revolution! post of 9/25/2008.

Steve Naughton continues his exploration of new DD techniques with Dynamic Data Custom Pages with Ajax Control Toolkit Tabs of 9/25/2008, which describes the two most successful methods he found for creating a generic page with a DetailsView that shows the parent record and a set of tabs showing all its child records.

Stephen Walther will deliver ASP.NET Futures: WebForms and MVC Advancements at PDC 2008:

Learn about future advances in ASP.NET like WebForms, MVC, AJAX, Dynamic Data, and dynamic languages.

Scott Hunter will present ASP.NET: Dynamic Data 2.0 and Dynamic Data for MVC at PDC 2008:

The next version of ASP.NET MVC contains a new scaffolding feature based on Dynamic Data that provides a rich framework for creating data driven web sites. Learn how to quickly build a Dynamic Data web site using features like model level validation, field and entity templates, and scaffolding.

Mike Taulty reports about experiments with DD in his ASP.NET 3.5 Sp1 Dynamic Data post of 9/24/2008. He was surpised to find that VS 2008 SP1’s DD templates were limited to Dynamic Data Web Site (Entity Data Model data source) and Dynamic Data Entities Web Site (LINQ to SQL data source).

Steve Naughton updated An Advanced FieldTemplate with a GridView/DetailsView Project, the seventh episode of his Dynamic Data and Field Templates series, on 9/23/2008. Paraphrasing the updates:

The FieldTemplate now has ParentDetails and the ChildrenGrid FieldTemplate’s
ParentDetails no longer support Insert but they do support Update as before.

SQL Server Data Services (SSDS)

Kim Cameron and Stuart Kwan will present Claims-Based Identity: A Security Model for Connected Applications at PDC 2008:

Claims-based security is the underpinning of many applications, services, and servers. This model enables security features like: multiple authentication types, stronger authentication on-the-fly, and delegation of user identity between applications. Learn how to use this model in .NET, how it integrates with Active Directory, how it works across platforms, how it works with existing applications, and how we use it at Microsoft.

SSDS v1 will use claims-based security from BizTalk Services.

Lynn Ayres and Tore Sundelin will deliver Connecting Active Directory to Microsoft Cloud Services at PDC 2008:

Learn how to augment your existing IT infrastructure with Microsoft Services. Manage and secure end user access to cloud services using your existing investment in Active Directory. Enable end users to access cloud services through existing Active Directory accounts, the same way they access your intranet-hosted software today. Hear how to enable existing software to use new service capabilities without re-writes, and do it all through the use of open and standard protocols.

Gianpaolo Carrero’s Cloud Services Architecture symposium post of 9/24/2008 describes the Head in the Cloud, Feet on the Ground symposium on PDC 2008’s day four. Gianpaolo says:

We will explore a few examples of cloud-based infrastructure usage as part of an existing application, we will discuss the architectural tradeoffs as well as best practices resulting from that usage. We will also walk through detailed examples of ‘enterprise grade’ hosted application design. And finally we will go through emerging patterns that take into account the physical aspects of a cloud-based application that are often overlooked, such as bandwidth which happens to be not infinite and certainly not free at high scale.

David Robinson announced in his SSDS and SSIS…like peanut butter and jelly post of 9/23/2008 that Matt Masson has posted documentation and downloadable code for SQL Server Data Services Connectors for Integration Services on CodePlex. Here are the download links:

The Source and Destination adapters simplify downloading and uploading SSDS data by taking advantage of SQL Server Integration Services.

Roger Jennings explores two relational databases in the cloud in his SSDS’s Competitors: Oracle 11g and Sun MySQL on Amazon EC2 of 9/23/2008. Oracle 11g for the Cloud was announced by Amazon Web Services on 9/22/2008; cloud-based MySQL was announced (originally) on 5/8/2008 and didn’t appear to garner much interest.

The unadvertised special is a a shared AMI for Oracle Express 10g with Oracle Enterprise Linux available from Amazon.

More from ZDNet about the cloud in Sam Diaz’s Intel at Oracle OpenWorld: It’s about time - and the cloud post of 9/24/2008 from Oracle OpenWorld.

Ayende Rahien’s Amazon EC2 now offers RDBMS post of 9/23/2008 gives his take on the difference between Oracle and MySQL in the cloud. Ayende concludes “I found this to be extremely interesting.”

Andrew Whitten says the following about his 9/21/2008 post about the Pictures in the Cloud - SSDS demo app, available from CodePlex:

I’ve been having a bit of hack around to show how pictures can be stored by this kind of service. There isn’t any reason to use this over the other online photo sharing sites, but it demonstrates how to use the API.

SQL Server Compact (SSCE) 3.5 and Sync Services

Matt Manela publishes a reader’s simpler method for SSCE 3.5 connection sharing in his SQL CE 3.5 with LINQ to SQL Revisited post of 9/26/2008. The original post was SQL CE 3.5 with LINQ to SQL of 9/8/2008. (Repeated in LINQ to SQL)

Visual Studio 2008 Service Pack 1 (General)

•••• MSDN Events Summer 2008 Resources offers the following downloads for Session 3 | Developing Applications with Visual Studio 2008 and .NET Framework 3.5 Service Pack 1:

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

•••• Scott Guthrie announces support for the jQuery JavaScript library in the ASP.NET MVC preview and future versions of VS 2008 in his jQuery and Microsoft post of 9/28/2008. Scott says:

We will distribute the jQuery JavaScript library as-is, and will not be forking or changing the source from the main jQuery branch.  The files will continue to use and ship under the existing jQuery MIT license.

We will also distribute intellisense-annotated versions that provide great Visual Studio intellisense and help-integration at design-time. …

The jQuery intellisense annotation support will be available as a free web-download in a few weeks (and will work great with VS 2008 SP1 and the free Visual Web Developer 2008 Express SP1).  The new ASP.NET MVC download will also distribute it, and add the jQuery library by default to all new projects.

We will also extend Microsoft product support to jQuery beginning later this year, which will enable developers and enterprises to call and open jQuery support cases 24x7 with Microsoft PSS.

jQuery’s John Resig has more to say about Visual Studio’s adoption of jQuery in his jQuery, Microsoft, and Nokia post of the same date.

As Ayende Rahien points out in his On jQuery & Microsoft post of 9/28/2008: “[S]omething else that I didn't see other people pointing out":

This is the first time in a long time that I have seen Microsoft incorporating an Open Source project into their product line.

I am both thrilled and shocked.

Justin Etheredge’s $("Microsoft").append("excitement"); post of 9/28/2008 goes into much more detail about the impact of inclusion of third-party, open-source jQuery in VS 2008.

Rick Strahl announces the first of a two-part series of jQuery articles in his Introduction to jQuery Article posted post of 9/28/2008. Rick says the in the latter post:

Part 1 of the article is mostly a pure jQuery introduction and doesn’t talk about jQuery’s Ajax features or direct interaction with the server side and ASP.NET. Rather it focuses purely on many of the extremely useful client side features as well as the basic concepts of extending jQuery with plugins.

Part 2 then will talk about the server side integration with ASP.NET using various mechanisms to call ASP.NET content from raw page Ajax calls, to JSON Service callbacks, to using templating and even partial rendering against server side ASP.NET application. I’ll also talk about building ASP.NET components that integrate with jQuery. This article is based on my jQuery session that I’ve been giving at various conferences and user groups.

•••• Justin Etheredge provides a flow diagram for MVC requests in his ASP.NET MVC Request Flow post of 9/27/2008. Justin says he was unable to find a similar diagram on the web.

Scott Guthrie announced the release of Silverlight 2 RC0 for developers in his Silverlight 2 Release Candidate Now Available post of 9/25/2008. Scott says:

You can download today's Silverlight Release Candidate and accompanying VS and Blend support for it here.  Note that Expression Blend support for Silverlight 2 is now provided using Blend 2.0 SP1.  You will need to install Blend 2.0 before applying the SP1 service pack that adds Silverlight 2 support.  If you don't already have Blend 2.0 installed you can download a free trial of it here. …

Over the next few months we will be releasing a lot of new Silverlight 2 controls (more details on these soon). Today's release candidate includes three new core controls - ComboBox, ProgressBar, and PasswordBox - that we are adding directly to the core Silverlight runtime download (which is still only 4.6MB in size, and only takes a few seconds to install):

He also says the final release will be “shipped … soon.” Get more details on the release from:

Beth Massi offers a link to the source code and slides for her Data Sources and Data Binding in WPF Talk in Redmond on 9/22/2008. Beth says:

I started the talk with basics of data binding to a variety of data sources and then we moved to more to data access discussions and n-tier architecture issues. It was similar to the talk I did at Bay.NET in SF last month but I focused this time completely on WPF and didn't show any Winforms at all. This allowed us to have more time for architecture discussions and I think it worked out well.

Ayende Rahien is in the process of learning Erlang, the open-source programming language behind Amazon SimpleDB and open-source CouchDB, a document-oriented database that’s an Apache Incubator project.

Here are his posts by topic as of 10/24/2008 11:00 AM PDT (in chronological order):

All in all, an amazing tour de force of analyzing complex source code in a language that’s new to him.

Friday, September 12, 2008

LINQ and Entity Framework Posts for 9/8/2008+

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

•••• Updated 9/14/2008 7:00 AM PDT: Addition of EF POCO v 1.02
••• Updated 9/12/2008 9:00 AM PDT: Additions to EF, LINQ, Astoria, SSDS, and Sync Services  
•• Updated 9/11/2008 2:00 PM PDT: Additions to EF, LINQ to SQL, LINQ (to NHibernate and XML), Misc. (Technorati, MVC) 
• Updated 9/10/2008 10:00 AM PDT: Additions to LINQ to SQL, Astoria, Dynamic Data, and SQL Server Compact

Note: All DevDays 2008 session links point to the MSDN Spotlight page because login with a Windows Live ID is required and links without a session ID fail.

Entity Framework and Entity Data Model (EF/EDM)

•••• Jarek Kowalski has updated his Persistence Ignorance (POCO) Adapter for Entity Framework V1 (see below) to v1.02 to fix three issues reported by users that his EF POCO Adapter updated (v1.02) post of 9/13/2008 describes. Download the updated code here.

••• Elisa Flasko’s PDC 2008 - Los Angeles, CA - Oct. 27-30 post of 9/12/2008 to the ADO.NET Team blog describes Tim Mallalieu’s Entity Framework Futures session at PDC 2008:

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.

In the meantime, EF V1 pilgrims are still awaiting the arrival of the promised minutes of the first EF Advisory Council meeting.

Alex James provides a detailed description of the plans for adding a domain-design-first feature to Entity Framework v2 in his Model First post of 9/10/2008. Topics include:

  • Generating Databases from Models (an overview of the process and UI)
  • Under the Hood (a description of the Sequential Workflow WF implementation)
  • Stage and Purpose (of each WF element)
  • Templates (the T4 templates that perform CSDL to SSDL, CSDL to MSL, and SSDL to DBSchema transformations)

Huageti Systems’ Kristofer Andersson notes in his Tools - Part 5 - Add-ins - Documentation features in Entity Framework vs Linq-to-SQL post of 9/2/2008:

[EF’s documentation feature] has a cosmetic flaw: In the haste to release VS2008 and .net 3.5 SP1 it seems like MSFT forgot to apply the entity type documentation to the entity set accessor properties, so entity sets (and all undocumented classes and properties) will show the default “There are no comments for [name] in the schema.“. I would like to see the EntitySet using the same documentation as the EntityType, or at least have a “Documentation” property of its own. (It does in the EDMX, but not in the designer)

The “There are no comments” default value is a bit redundant and waste of screen real-estate. Why not leave the default value blank? Oh well, this is just version one so I guess that will be improved in some future service pack update.

Also missing is the ability to automatically populate the documentation field with descriptions from data model diagrams and/or the database. The descriptions may already exist in a data model diagram or in the database. In addition, knowing what indexes exist is very useful when writing queries, and what indexes exist on tables etc are of course available from the database so being able to automatically retrieve those two pieces of information from the db would be a nice-to-have feature.

According to Alex, EF v2 will include metadata for indexes because the generated DDL add them.

Note that Damien Guard has produced an initial set of T4 templates for serializing LINQ to SQL classes, as described in my Bidirectional Serialization of LINQ to SQL Object Graphs with Damien Guard’s T4 Template in VS 2008 SP1 of 7/27/2004. A later version will add:

  • Inheritance support
  • VB.NET generation
  • DataContract serialization

But it won’t support stored procedures or composite primary keys.

Jarek Kowalski’s Persistence Ignorance (POCO) Adapter for Entity Framework V1 post of 9/9/2008 provides extensive details about the new EFPocoAdapter that’s available for download from the CodeGallery. Here’s its description:

EF POCO Adapter enables Plain Old CLR Objects (POCOs) to be tracked using released version of Entity Framework V1. It consist of a code generator, supporting library and a test suite and examples.

Code generator writes an adapter layer that will translate between POCO objects and Entity Framework-aware objects and provide services on top of POCO objects, such as:

  • Change tracking (snapshot-based and proxy-based when possible)
  • Transparent lazy loading
  • Immutable Value Objects
  • Queries (LINQ and Entity SQL)
  • Shadow state (maintaining certain persistence-related fields outside of entity class)

Entity Framework V1 programming interfaces are wrapped with corresponding APIs that work with POCO objects and do necessary translation between POCO and Persistence-Aware objects.

The availability of the new adapter should quiet the tumult and shouting about EF’s lack of persistence ignorance.

• Update 9/10/2008: From comments to Jarek’s post:

Roger Jennings (9/9/2008):

Does Astoria consider the POCO Adapter's EFPocoContext a first-class data source, that is, supports IQueryable<T> and induces the Astoria runtime to provide IUpdatable<T>?

In other words, can it be plugged into an Astoria project without adding a significant amount of code?

Jarek Kowalski (9/9/2008):

I'll investigate the Astoria question, but since EFPocoAdapter does not implement IUpdatable I don't think it works now. …

OK. I have played with Astoria and I was able to get a basic service to work. All you have to do is to derive from DataService<adapterContextType>, such as:

public class NorthwindEFService : DataService<NorthwindEntitiesAdapter>
{
}

This makes use of the "second face" of the object model, which is the EF-compatible adapter layer. Astoria doesn't have a clue that it is talking to POCO model, but the EF-POCO translation happens under the hood.

Implementation of IUpdatable should be pretty straightforward, though.

Mike Taulty presents Understanding the ADO.NET Entity Framework at DevDays 2008 Amsterdam (Video, May 2008).

LINQ to SQL

•• Mike Tulty’s Messing with Dynamic LINQ Queries post of 9/11/2008 shows his attempt with a LINQ to SQL query:

[T]o take the Expression which will have 2 parameters and reduce it down to an Expression which has 1 parameter by hard-wiring the 2nd parameter with the current value of the loop variable "s" into the method call expression itself as a constant.”

• Mike Hadlow has posted a working sample and source code for the Suteki Shop eCommerce application that uses the following technologies:

  • .NET 3.5
  • MVC Framework
  • LINQ to SQL
  • Windsor IoC Container
  • NUnit (for testing)
  • Moq (for mocking)

• Matt Manela explains in his SQL CE 3.5 with LINQ to SQL post of 9/9/2008 how to avoid the performance hit caused by moving SQL Server Compact (SSCE) 3.5 into and out of memory when LINQ to SQL opens and closes connections on single or multiple threads.

Bill BurrowsASP .NET MVC Framework - Preview 4 Update demonstration “highlights the changes in the MVC model since the release of Preview 1 and covers both "drill-down" applications as well as showing how to update and existing database record and add a new record” with VS 2008 (not SP1), LINQ to SQL and VB.

It’s unfortunate that the demo is one service pack and preview behind, but most of the two video links apply to current releases.

Bill also offers a VB-based LINQ to SQL Tutorial and Introduction to MVC Tutorial.

Anko Duizer presents Is LINQ to SQL your data Access Layer? from DevDays 2008 Amsterdam (Video, May 2008).

LINQ to Objects, LINQ to XML, et al.

••• Eric White describes how LINQ used C# 3.0’s closures feature in his Closures post of 9/12/2008.

•• Ayende Rahien‘s NHibernate 2.0 and Linq post of 9/11/2008 delivers formal notification that LINQ to NHibernate is not part of the recently-released NHibernate 2.0, but an improved LINQ implementation will be part of NHibernate 2.1.

However, he notes that “Daniel Guenter has back ported the current version of Linq to NHibernate to Nhibernate 2.0 and made it available here.”

Mike Hadlow noted problems with LINQ to NHibernate and complex queries in his What's up with Linq to NHibernate? post of 9/2/2008.

•• Shayne Burgess notes that the XML Team plans to incrementally publish “frequently encountered issues in System.XML; mainly points that we felt were interesting because they were the source of a lot of difficulty for our users.” The first two members of the Frequently Asked Questions on XML in .NET series are:

  1. Part 1: Invalid Literals (9/10/2008)
  2. Part 2: Conformance Level – Fragment (9/10/2008)

While not specifically about LINQ to XML issues, they should be of interest to developers using LINQ to XML.

John Papa describes a workaround for an Amazon Web Services’ book price ambiguity in his LINQ to XML Tip - Checking for Values post of 9/9/2008.

Eric White explains “how to use content controls in Open XML word documents to delineate code snippets so that you can automate validation of the snippets” in his OpenXmlCodeTester: Validating Code in Open XML Documents post of 9/8/2008. Eric says:

I suspect that this blog post will be very interesting to a very few people, but of casual note to all others. I’m very interested to hear if this scenario is useful to you. But more than this particular scenario, I want to spark interest in the possibilities that content controls open up for you.

This may be the longest blog post I’ve written, because this blog post also serves as a manual of sorts for OpenXmlCodeTester.

Eric’s code is based on functional programming principles and all variable values are immutable.

Sessions from DevDays 2008 Amsterdam (Video, May 2008):

ADO.NET Data Services (Astoria)

••• Elisa Flasko’s PDC 2008 - Los Angeles, CA - Oct. 27-30 post of 9/12/2008 to the ADO.NET Team blog describes the following two Astoria presentations at PDC 2008:

Developing Applications Using Data Services: Mike Flasko

In the near future, applications will be developed using a combination of custom application code and online building block services, including data-centric services. In this session we discuss advancements in the Microsoft development platform and online service interfaces to enable seamless interaction with data services both on-premises (e.g., ADO.NET Data Services Framework over on-premises SQL Server) and in the cloud (e.g., SQL Server Data Services). Learn how you can leverage existing know-how related to LINQ (Language Integrated Query), data access APIs, data-binding, and more when building applications using online data.

Offline-Enabled Data Services and Desktop Applications: Pablo Castro

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.

Mike Flasko’s ADO.NET Data Services Concepts post of 9/9/2008 points to a new "Overview of ADO.NET Data Services" white paper on MSDN. Mike says:

The document is meant to cover the high-level concepts for the product.  A companion paper "Using ADO.NET Data Services" published a little while ago complements this overview with details on product features and how to use them. 

Coming up next is a paper which goes one level deeper and shows how to host data services in different environments (ASP.NET, WCF, IIS, WCF self host, etc).

Click here for more information from LINQ and Entity Framework Posts for 9/2/2008+ about the companion paper.

Sessions from DevDays 2008 Amsterdam (Video, May 2008):

ASP.NET Dynamic Data (DD)

•• Mike Ormond’s Dynamic Data and Entity Framework post of 9/11/2008 describes exceptions thrown when using EF with Northwind as the data source: one with the Order_Details entity and one when navigating the Product –> Order_Details relations (that composite index issue again!) The fix is the Dynamic Data Entity Framework Workaround on CodePlex.

Steve Naughton completes his Dynamic Data Futures series with his Dynamic Data Futures – Part 3 – AnyColumnAutocomplete Filter post of 9/9/2008. Steve says:

The issue is that the Autocomplete filter and AutocompleteFilter web service is designed to work with Foreign Key columns, I thought this would be like the previous article in this series and be quite simple, instead it turned out to be a bit more complicated

SQL Server Data Services (SSDS)

••• Eugenio Pace lauds Apprenda’s SaaSGrid cloud services framework for ISVs in his Northwind Hosting exists, it's better than what you saw and it's called SaaSGrid post of 9/12/2008. Eugenio says:

This "non-intrusiveness" of SaaSGrid is a property of PaaS offerings we have studied in the past. I personally believe that all offerings requiring an ISV to re-write an app, or re-learn a whole new development paradigm (custom language, non-mainstream storage, etc) will be at a disadvantage compared to PaaS offerings that will make the most of your existing investments and strengths, and therefore adoption will be hurt (probability +80% :-)).

Eugenio’s Northwind Hosting concept demo and related white papers form much of the foundation of SSDS and especially the LitwareHR demo. Watch the video to learn more about SSDS’s current and future architecture and features.

Mike Amundsen updated his “SSDS-Proxy and SSDS Provision Client code on 9/8/2008 to support returning the Authority List for the logged-in user. This update also includes support for reading and deleting BLOB files (no upload via the web - yet).”

A live demonstration is running here http://amundsen.com/ssds/. The source code is available from Codeplex http://codeplex.com/ssdsexamples/.

SQL Server Compact (SSCE) 3.5 and Sync Services

••• See Offline-Enabled Data Services and Desktop Applications: Pablo Castro

• Matt Manela explains in his SQL CE 3.5 with LINQ to SQL post of 9/9/2008 how to avoid the performance hit caused by moving SQL Server Compact (SSCE) 3.5 into and out of memory when LINQ to SQL opens and closes connections on single or multiple threads. (Also in LINQ to SQL category.)

Martijn Beenes presents Sync Framework from DevDays 2008 Amsterdam (Video, May 2008).

Visual Studio 2008 Service Pack 1 (General)

Beth Massi’s What's New in Visual Studio 2008 SP1 - Client and Data Features post of 9/11/2008 includes links to the slides and code from her presentation to the East Bay.NET UG on some of the new features in Visual Studio Service Pack 1, including:

  • SQL 2008 Types and Data Binding Support
  • ADO.NET Sync Services Enhancements
  • WPF Enhancements
  • ADO.NET Entity Framework Designer
  • ADO.NET Data Services (Astoria)
  • “Client Profile” Framework Deployment
  • VSTO Content Controls and Smart Tags
  • VSTO Deployment Improvements

I wonder how long the meeting lasted.

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

•• (OT) Roger Jennings takes Technorati to task for making acquisitions while failing to maintain their primary obligation to the blogosphere and provide timely customer service in his More Technorati Troubles post of 9/11/2008.

These two posts re Technorati were added on 9/12/2008:

Update 9/11/2008 2:30 PM PDT. Apparently the above post caught Technorati’s attention. The latest posts are now appearing and the Authority was updated (-2 points.)

David Hayden’s ASP.NET MVC and Enterprise Library Validation Application Block post of 9/10/2008 complements his earlier post with instructions for integrating the Validation Application Block with ASP.NET MVC.

Scott Heuer says in his 9/9/2008 post, H.264 and AAC support coming to Silverlight (in a future version). The Silverlight Shines at International Broadcasting Conference 2008 in Amsterdam press release of the same date includes Q&A with Scott Guthrie about the new video codecs for Silverlight.

Mike Taulty’s Silverlight, Async, Events post of 9/8/2008 deals with issues around asynchronous operations and the inability to pass an event into a function.

David Hayden uses a simple Customer class in his Custom Model Binder and More UI Validation in ASP.NET MVC post of 9/8/2008 to demonstrate the CustomModel binder’s input validation capabilities.

David Hayden’s ASP.NET MVC UI Error Handling - ModelState and AddModelError post of 9/7/2008 demonstrates validating a phone number input with ModelView’s ModelState property and the ModelState.AddModelError() method.

Miscellaneous Sessions from DevDays 2008 Amsterdam (Video, May 2008):

Sunday, September 07, 2008

LINQ and Entity Framework Posts for 9/2/2008+

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

•••• Updated 9/6/2008 5:00 PM PDT
••• Updated 9/5/2008 2:00 PM PDT
•• Updated 9/4/2008 12:40 PM PDT
• Updated 9/3/2008 11:40 AM PDT

Entity Framework and Entity Data Model (EF/EDM)

••• David Sceppa says in his SQLite's ADO.NET Provider Supports the ADO.NET Entity Framework! post of 9/6/2008:

[T]he initial build of the SQLite provider that supported the RTM version of the Entity Framework was available the same day that the Entity Framework released.

According to the PhxSoftware site, SQLite for ADO.NET 2.0 v3.6.2 of 8/30/2008 (build 1.0.58.0 on SourceForge.Net):

System.Data.SQLite is the original SQLite database engine and a complete ADO.NET 2.0 provider all rolled into a single mixed mode assembly.  It is a complete drop-in replacement for the original sqlite3.dll (you can even rename it to sqlite3.dll).  Unlike normal mixed assemblies, it has no linker dependency on the .NET runtime so it can be distributed independently of .NET.

However, the site offers the following caveat about EF:

Support for the ADO.NET 3.5 Entity Framework
SQLite's EF provider is still in beta for now, but go ahead and kick the tires!

PhxSoftware should confirm support for EF RTM, not a beta version.

Note: SQLite is the local database engine for Google Gears and several other technologies. According to Robert Accettura’s The Winner For Most Embedded Is: SQLite post of 2/27/2008:

What is interesting is that SQLite really dominates [the embedded database market] right now. Adobe Air, Mozilla Prism, Google Gears, Android, iPhone SDK (likely through Core Data API), Symbian, Ruby On Rails (default DB in 2.0), PHP 5 (bundled but disabled in PHP.ini by default).

I question whether a lightweight database engine (redistributable = 600 KB) justifies a heavyweight data layer, such as EF.

For more information on the SQLite database engine, go to http://www.sqlite.org/.

•••• Kathleen Dollard explains how to Customize Code Generation in EF in her “Ask Kathleen” column for Visual Studio Magazine’s September 2008 issue. She shows how to customize the EF team’s SampleEdmxCodeGenerator to remove the default DataMember attribute to specific properties of EF EntityObjects so the DataContractSerializer ignores them. The process is by no means a walk in the park and is a tribute to Kathleen’s analytical and coding prowess.

••• David Sceppa announces in his Devart's New Providers Support the ADO.NET Entity Framework! post of 9/5/2008 that Devart (formerly Core Laboratories) is the first third-party Entity Framework data provider to support the VS 2008 SP1 RTM implementation. For more information see Devart’s New Versions of ADO.NET Data Providers Available! post for:

•• Diego Vega updated the ADO.NET Entity Framework & LINQ to Relational Data wiki on 9/4/2008 to note that all Entity Framework Toolkits & Extensions have been updated to VS 2008 SP1 RTM except Danny Simmons’ Perseus (EntityBag) project.

So far, there’s no word from Danny about his intention to update the project.

Andrew Peters will be a developer on the Entity Framework team, according to his Joining Microsoft post of 9/2/2008. Andrew is a cofounder of Mindscape, a software solutions provider in Wellington, NZ, and the initial force behind the LightSpeed object/relational management (O/RM) tool.

Andrew will be working with fellow Kiwi, Alex James, EF’s Metadata program manager, but from the Microsoft Canada Developer Center in Vancouver, BC, because he missed this year’s H1B visa cutoff. (Damien Guard, a member of the LINQ to SQL team, also has temporary duty in Vancouver.)

Kristofer Andersson’s Tools - Part 5 - Add-ins - Documentation features in Entity Framework vs Linq-to-SQL of 9/2/2008 praises the EF team for including documentation for classes and their property. However, he faults the group for not using the entity’s Summary description for EntitySets and/or enabling editing it in the designer. I agree with Kris that the default “There are no comments for [name] in the schema” is “redundant and waste of screen real estate.”

See the related entry in the “LINQ to SQL” category.

Muhammad Mosa’s LINQ to Entities, Workarounds on what is not supported post of 9/2/2008 handles the EF features he found missing in his earlier LINQ to Entities, what is not supported? post of 8/24/2008 by:

  • Using Business objects as Wrappers for Entity objects
  • Converting to client evaluation, LINQ to Objects way

LINQ to SQL

Scott Guthrie resumes posting about ASP.NET MVC with LINQ to SQL as the data source in his very lengthy ASP.NET MVC Preview 5 and Form Posting Scenarios of 9/2/2008. I estimate the blog to be at least 42 screens long (i.e., classic Guthrie detail).

Kristofer Andersson describes the Huagati DBML Tools add-in’s new documentation feature for LINQ to SQL in his Tools - Part 5 - Add-ins - Documentation features in Entity Framework vs Linq-to-SQL post of 9/2/2008.

The add-in provides a new “Update Linq-to-SQL documentation from database” menu choice that imports the Description property of tables and columns as “summary xml comments and description attributes for all entities/classes, members/properties and data context entity accessor properties.”

Daniel Crenna has reached part four of his series that demonstrates using LINQ to SQL as the data transfer layer for a WCF service consumed by Silverlight following are links to the current and three previous members:

Dan’s From ASP.NET to Silverlight in Five Leaps of 7/25/2008 describes the five major differences between developing in ASP.NET and Silverlight.

LINQ to Objects, LINQ to XML, et al.

•••• Eric White’s Announcing the First CTP of Open XML SDK V2 reports the availability of the new OOXML SDK that includes the following new features:

  • Strongly typed document object model (DOM).

  • Tool to compare two Open XML files.

  • Class explorer that helps you understand the markup and determine which classes to use in the strongly typed DOM.

  • Document reflector that can write a lot of your code for generating documents or content.

Eric explains the benefits of the strongly typed DOM with LINQ to XML:

The gist of the strongly typed DOM is that the SDK defines classes for elements in the markup. When you access the contents of a part, you access via these class. For example, instead of retrieving a collection of System.Xml.Linq.XElement objects for the paragraph (w:p) elements, you retrieve a collection of DocumentFormat.OpenXml.Wordprocessing.Paragraph objects.

and provides small examples that compare the weakly and strongly typed with LINQ to XML.

•• Diego Lopez Ruiz suggests using additional XML technologies with LINQ to XML in his LINQ to XML, XmlReader, XmlWriter - more than meets the eye tidbit of 9/5/2008.

•• LinqMaster’s Using LINQ ElementAt and LINQ ElementAtOrDefault post of 9/4/2008 explains the syntax of these two LINQ extension methods.

•• Lisa Feigenbaum has just returned from an around-the-world tour giving VB presentations. She’s posted descriptions and materials for these two LINQ-related sessions she gave at Tech*Ed SouthEast Asia 2008:

in her Visual Basic at TechEd SouthEast Asia (Lisa Feigenbaum) post of 9/3/2008.

Amanda Silver, Lino Tadros, Steve Lasker, Erick Thompson, and Charlie Calvert discuss LINQ in the UI Layer with Carl Franklin in this panel interview. Here’s the description:

LINQ is commonly known as a great way to query data from external sources (databases, Web services, XML, SharePoint, etc). However, there are numerous other places where LINQ can make the developer's life much easier when working on the end user interface, especially when you incorporate DataSet into the mix. This panel will talk about these approaches and the possible pitfalls of using them.

Bart De Smet offers translation of LINQ expression syntax to LINQ method calls in his C# 3.0 Query Expression Translation Cheat Sheet post of 8/30/2008.

ADO.NET Data Services (Astoria)

•••• Mike Flasko reports in his 0 to 60 With ADO.NET Data Services post of 9/5/2008 that he’s updated his “Using Microsoft ADO.NET Data Services” white paper for VS 2008 SP1. Following are a few of the more important topics of the whitepaper:

  • Creating a Data Service using the ADO.NET Entity Framework
  • Creating a data service from any data source (from a CLR object graph)
  • Trying an ADO.NET Data Service (in the browser)
  • Finding and Pointing to Data: URLs in Data Services
  • Expression Syntax
  • Options for Data Representation (AtomPub, JSON)
  • Changing Data in ADO.NET Data Services
  • Optimistic concurrency
  • Custom Behaviors on Data Services
  • AJAX Applications
  • Language Integrated Query (LINQ to ADO.NET Data Services)
  • Using the client library from Microsoft Silverlight 2
  • Controlling Data Service Policies

Unsurprisingly, there’s no mention of LINQ to SQL as an Astoria data source in this white paper.

••• Shawn Wildermuth’s My Silverlight 2 Data Services Article Code Updated post of 9/4/2008 announces the availability of updated code for his Silverlight 2 MSDN Magazine article in the September 2008 issue. He also includes links to these three updated versions on his new Silverlight Data site:

  • Simple Example: Single page, three-table schema example that reads and writes data via ADO.NET Data Services and Entity Framework.
  • NHibernate Example: Single page, three-table schema example that reads and writes data via ADO.NET Data Services and NHibernate's new NHibernate.LINQ provider.
  • AG Games (Down for Maintenance): A more complex example using a richer Entity Framework model with complex mapping, data templates, multiple entity read/writing.

• Phani Raj announces an Interim Release: Making SL2 Beta 2 Clients Work With .NET Fx 3.5 SP1 RTM Servers on 9/2/2008. The new release solves the interoperability problem between Astoria RTM in VS 2008 SP1 and Silverlight 2 Beta 2 that Shawn reported in his post below.

• Rick Strahl warns about JSON UTC date encoding issues that might affect Astoria users in his Watch out for Date Kind in JSON Deserialization post of 9/3/2008.

• Roger Jennings: Out-of-band update 9/3/2008 4:45 PM PDT.

Shawn’s sample code works fine with VS 2008 SP1 RTM, and Silverlight 2 Beta 2 runtime, SDK, and VS 2008 Silverlight Tools when you replace the SL2 Beta 2 version of System.Data.Services.Client.dll with the interim release from today’s Astoria Project post.

Two or three fixes required:

  1. Replace opResponse.HasErrors with opResponse.Error !=null in ProductList.cs line 121 (and similar for VB)
  2. Replace EntitySetRights.WriteUpdate with EntitySetRights.WriteReplace in Products.svc line 20 (and similar for VB)
  3. If you’re using SQL Server Express, replace DataSource=.; with Data Source=.\SQLEXPRESS; in Web.config

Shawn Wildermuth warns readers of his “Create Data-Centric Web Applications With Silverlight 2” article for the MSDN Magazine’s September 2008 issue that his code examples require VS 2008 SP1 Beta and Silverlight 2 Beta 2 in “Caveats About My Silverlight 2 Data Services Article.” VS 2008 SP1 RTM won’t work.

He promises to update the sample code, which uses ADO.NET Data Services as its WCF-enabled data source, when Silverlight RTM becomes available.

ASP.NET Dynamic Data (DD)

•••• Matt Berseth shows you how to customize the default confirmation message box for deleting an entity instance with details about the item you’re deleting in his Dynamic Data - Customizing the Delete Confirmation Dialog post of 9/7/2008. Here’s a sample (courtesy of Matt):

•••• Steve Naughton posts the code for all seven parts of his FieldTemplate Septet (with apologies to Lawrence Durrell):

  1. The Anatomy of a FieldTemplate.
  2. Your First FieldTemplate.
  3. An Advanced FieldTemplate.
  4. A Second Advanced FieldTemplate.
  5. An Advanced FieldTemplate with a GridView.
  6. An Advanced FieldTemplate with a DetailsView.
  7. An Advanced FieldTemplate with a GridView/DetailsView Project.

in preceding link #7’s page of 9/6/2008.

••• Steve Naughton discovers in his Dynamic Data Futures – Part 2 - AnyColumn Filter post of 9/5/2008 that creating the AnyColumn filter from the Dynamic Data Futures Integer filter just requires you to “add the filter attribute Integer to the property you want filtered,” which make for a much shorter than usual article.

•• Steve Naughton explains how to display and edit multiple fields in a custom FieldTemplate in his Dynamic Data Compound Column post of 9/4/2008. He uses a compound Point(x, y) type as a Coordinate property for his tutorial. Steve says:

At a later date I would like to try this with Point being a User Def[in]ed Type in SQL Server 2005/2008, this would get rid of the need for the compound property and would mean only a new FieldTemplate was required.

• Steve Naughton, true to his word, posted part 1 of Dynamic Data Futures - Advanced Filters, Getting Dynamic Data Futures filters working in File Based Website, on 9/3/2008. The post is a lavishly illustrated, step-by-step tutorial that covers these topics:

  1. Adding Dynamic Data Futures to your Website
  2. Adding a Reference to Dynamic Data Futures and AjaxToolkit
  3. Adding the new Filter User Controls to the Website
  4. Converting Web Application files to work in a file based Website
  5. Making Necessary Changes to allow Advanced Filter to Work
  6. Testing the AdvancedFilterRepeater and new Filters

I wouldn’t try installing Dynamic Data Futures to a file-based Web site without this article.

Steve Naughton reports that he’s back from vacation  in Normal Service Resumed of 9/2/2008. However, he worked on the following new episodes in his series of DD improvements and will publish them shortly:

  • How to get the new Advanced Filters component of DD Futures working in a file based website.
  • Making an Any Column Filter (Works on any column not just FK columns)
  • Adding Insert facility to my GridView FieldTemplate.
  • A Time entry control and FieldTemplate.

SQL Server Data Services (SSDS)

••• Roger Jennings’ Microsoft Introduces Data Minining “Cloud Services” post of 9/4/2005 says the new online Table Analysis Tools for data mining appear to be a conventional Web service or Software as a Service (SaaS) application, not a “cloud service.”

However, hooking SSDS as the data service for the tools might qualify them for “cloud computing” status.

Ryan Dunn posted PhluffyFotos v2 Released on 9/4/2008. According to Ryan:

This sample application is a ASP.NET MVC and Windows Mobile application showing how to build a photo tagging and sharing site using our cloud data service, SSDS.

Following are abbreviated descriptions of v2’s new features:

  • Updated to MVC Preview 4
  • Updated to add thumbnail support
  • Updated to use the SSDS blob support 
  • Updated to use the latest SSDS REST library

Ryan adds:

The sample is available for download at CodePlex, and a live version is available to play with at PhluffyFotos.com.  I am opening this one up to the public to upload photos.  Maybe I am playing with fire here, so we will see how well it goes.

Ryan Dunn announces in his SSDS REST Library v2 Released post of 9/4/2008 that the new REST-based library for SSDS available from the MSDN Code Gallery’s SSDS REST Library offers the following new features:

  • Concurrency support via Etags and If-Match, If-None-Match headers
  • Blob support
  • Parallelization support via extension methods
  • Bug fixes
  • Better test coverage

See Ryan’s post for more details on the added features.

Roger JenningsHow To Get a List of Your SSDS Account’s Authorities post of 9/4/2008 answers a question that Mike Amundsen and I asked in the How do I get a list of my defined Authorities? thread of the SQL Server Data Services (SSDS) - Getting Started forum.

Pat Helland analyzes Amazon S3’s recent outage and suggests what’s required for cloud-based data reliability in his lengthy Confidence in the Cloud post of 9/1/2008. Topics include:

  • Some Observations about Reliable Process Pairs
  • Less Is More
  • N-Version Programming
  • Availability Over Consistency
  • Eventual Consistency
  • Front-Ending the Cloud
  • It's Going To Be a Fun Ride!

He concludes:

It is my opinion that we will be designing systems to support eventual consistency.  Part of this trend will be to back away from our traditional separation of storage (e.g. database) from applications.

The SSDS team touts immediate (ACID, transactional) consistency as one of the primary selling points of SQL Server Data Services.

(Pat left his job as a data architect at Microsoft to join Amazon and returned to Microsoft in March 2007 and ultimately joined the SQL Server data programmability group.)

Note: If you haven’t been to downtown Chicago for a few years (like me), check out Pat’s photographs in A Wonderful Few Days at a Wedding in Chicago of the same date.

SQL Server Compact (SSCE) 3.5 and Sync Services

• Aaron Greene, Andrei Maksimenka and Christian Liensberger “dig into the details of the Sync Framework and explore the complexities of sync, generally” in Channel9’s one-hour Synchronizing Data: Inside the Microsoft Sync Framework video segment. The description starts with:

The Microsoft Sync Framework is a comprehensive synchronization platform that enables collaboration and offline scenarios for applications, services and devices. It supports any kind of data type and any kind of data store. The framework was designed to be transfer protocol independent and to allow the developers to map any kind of network topology.

Visual Studio 2008 Service Pack 1 (General)

No new posts as of 9/2/2008 2:00 PM PDT 

Miscellaneous (WPF, WCF, Silverlight, etc.)

•• Beth Massi demonstrates how to incorporate a Windows-form DataGridView control in a WPF form by using the WindowsFormHost control in her Editing Tabular Data in WPF Using the Winforms DataGridView post of 9/4/2008.

• Rob Conery is updating his MVC Storefront project to Preview 5, as noted in MVC Storefront: Intermission 2 of 9/3/2008.

Roger Jennings decries Google Chrome’s draconian end-user license agreement in Chrome’s Evil Terms of [Software as a] Service of 9/3/2008. Other sources (ReadWriteWeb, The Register) cite mandatory copyright licensing, but there’s much more to fear when you read all the fine print. (Chrome is uninstalled here.)

• Derik Whittaker’s Upgrading Dimecasts.Net from MVC Preview 4 to Preview 5 post of 9/3/2008 expands on Casey Charlton’s post below.

Casey Charlton describes seven Problems Upgrading ASP.NET MVC to Preview 5 in this post of 9/2/2008.

Roger Jennings gripes about Technorati’s missing entries for the OakLeaf Blog’s new posts in his Technorati Fails to Index OakLeaf Systems Blog Posts complaint of 9/2/2008

WebSlice Content for Internet Explorer 8 Beta 2

OakLeaf LINQ and Entity Framework Links

Last Updated: 9/4/2008 12:40 PM PDT

  • Entity Framework Additions
  • LINQ to Objects, XML, etc. Additions
  • ADO.NET Data Services Additions
  • ASP.NET Dynamic Data Additions
  • SSDS REST Library V2