skip to main | skip to sidebar
Showing posts with label SyncLINQ. Show all posts
Showing posts with label SyncLINQ. Show all posts

Saturday, April 12, 2008

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

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

Comparison of "DataStores in the Cloud" Started

My Comparing Google App Engine, Amazon SimpleDB and Microsoft SQL Server Data Services post of April 9, 2008 is the beginning of a full-length comparison of Amazon SimpleDB, SQL Server Data Services, and Google App Engine beta versions.

As of April 10, 2008, the introduction and Data Model sections are complete.

Update 4/12/2008: Security and authentication topics expanded and moved to the "API" section, "API" section updated with query syntax and API limitations.

Added: 4/10/2008, Updated 4/12/2008

Jeff Currier Explains How to Use the cURL Utility with SQL Server Data Services

According to its author, Daniel Stenberg:

cURL is a command line tool for transferring files with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS and FILE. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, Kerberos...), file transfer resume, proxy tunneling and a busload of other useful tricks.

Jeff's cURL'ing up with SQL Server Data Services post of April 12, 2008 shows you how to use cURL at the command prompt to query an SSDS authority, as well as create containers and create, update and delete entities from file-based templates.

Added: 4/13/2008

Rick Strahl Encounters an Anomaly in LINQ to SQL Behavior with Object Tracking Disabled

Object tracking creates a very small performance hit, so it's a common practice to set DataContext.ObjectTrackingEnabled = false if you don't intend to update entities. However, you receive an "Object Reference not set to an instance of an object" exception if the entity has deferred loading associations. Eager loading is required in this case.

Rick's LINQ to SQL ObjectTrackingEnabled and Deferred Loading of Related Data of April 12, 2008 notes:

It turns out that this is a known issue that has been reported on Connect before.

and he goes on to quote Alex Turner's response to the Connect Bug report, which explains the reason for throwing the exception.

Added: 4/13/2008

Sahil Malik Writes a Windows Communication Foundation Tutorial

You need to know how to create WCF services and clients if you intend to try n-tier deployment of LINQ to SQL or the Entity Framework. Sahil's irreverent approach to his tutorials makes them more interesting (and informative) than the ordinary step-by-steps from MSDN and elsewhere.

He starts the series with four (count 'em, four) posts on April 12, 2008:

  • What is WCF? explains the basics of Service Oriented Architecture (SOA) and what makes WCF different from its Web service predecessors.
  • Writing the WCF Hello World App shows you how to create a WCF service class library, add a WCF service, and edit and implement the ServiceContract interface. Sahil also explains the mysteries of the App.config file (for a class library, yet!)
  • Writing your first WCF client demonstrates using dynamic proxy generation with metadata from the mex endpoint or metadata predistributed to the client in a DLL.
  • Host a WCF Service in IIS 7 & Windows 2008 - The right way shows you how to deploy a WCF service to IIS 7.0, a topic that Sahil says appears "nowhere else on the web." The process is by no means straightforward.

It will be interesting to see if more episodes follow.

Added: 4/13/2008

Beth Massi Starts LINQ to SQL N-Tier Smart Client Series

Beth's LINQ to SQL N-Tier Smart Client - Part 1 Building the Middle-Tier post of April 12, 2008 covers the following topics about the middle tier:

  • The Great Debate - DataSets or objects?
  • Going N-Tier with LINQ to SQL
  • Contract First
  • Disconnected Retrieval
  • Disconnected Updates and Deletes

Full VB 2008 code for the middle tier is included. Beth promises that her next post in the series "we'll build our client form and implement a simple technique for change tracking."

Added: April 12, 2008

Guy Burstein: Download the .NET 3.5 Enhancements Training Kit Preview

Guy's .NET 3.5 Enhancements Training Kit is available for Download says:

The Developer and Platform Evangelism Group in Microsoft has created a new training kit for all the enhancements for the .Net Framework 3.5:

  • ASP.NET MVC
  • ASP.NET Dynamic Data
  • ASP.NET AJAX History
  • ASP.NET Silverlight controls
  • ADO.NET Data Services
  • ADO.NET Entity Framework

Download the training kit (34.9 MB)

The April Content Preview contains Developer and Platform Evangelism Group's elementary Hands-on Labs for ADO.NET Entity Framework, ADO.NET Data Services, and ASP.NET Dynamic Data. Content for the Presentations, Demos, Screencasts, and Resources "will be added in a future release of the training kit.

Added: April 12, 2008

Upcoming Microsoft Developer Webcasts about LINQ and ADO.NET Data Services

From Scott Lum's MSDN Online Media Blog: Upcoming Microsoft Developer Webcasts: WCF, WF, Linq, AJAX, IIS 7.0, MS Sync Framework post:

MSDN Webcast: geekSpeak: Inside LINQ to XML with Paul Sheriff (Level 200)
In this episode of geekSpeak, Microsoft Regional Director Paul Sheriff explains how to put LINQ to XML to work in your applications. Guest Presenters:Paul Sheriff, President, PDSA, Inc. He has authored several books, webcasts, videos, and articles on the Microsoft .NET Framework, Microsoft SQL Server, and Windows SharePoint Services.
4/16/2008 12:00 PM - 1:00 PM Pacific Time | Duration: 60 Minutes

MSDN Webcast: LINQ Features in Visual Studio 2008 (Level 200)
Think you have heard all there is to know about Microsoft .NET Language-Integrated Query (LINQ)? Think again! In this webcast, we dazzle and amaze you with our staggering array of wondrous tools to make your LINQ experience a memorable one! Presenter:: Zain Naboulsi, Developer Evangelist, Microsoft CorporationTechnology is useless if it does not serve a clear purpose. That's Zain's philosophy. In fact, showing people how technology can make their lives better delivers his greatest on-the-job thrills
4/16/2008 1:00 PM - 2:30 PM Pacific Time | Duration: 90 Minutes

MSDN Webcast: Offline Data Synchronization with the Microsoft Sync Framework (Level 100)
In this webcast, we give an overview of the Microsoft Sync Framework and describe its key components that enable any data store to exchange information. We examine the built-in synchronization providers, Sync Services for ADO.NET, Sync Services for File Systems, and Sync Services for FeedSync, in addition to explaining how to implement custom synchronization providers for custom data sources. Lastly, we take a look at an example of using the Microsoft Sync Framework along with the new Microsoft SQL Server Data Services to provide synchronization capabilities across multiple applications, like Microsoft Office Access and Outlook. Presenter:Lindsay Rutter, Developer Evangelist.
4/17/2008 10:00 AM - 11:00 AM Pacific Time | Duration: 60 Minutes

Related Topic

MSDN Webcast: Database Features in Visual Studio 2008 (Level 200)
Like working with data? The Microsoft Visual Studio 2008 development system comes with many new and improved data tools. Who could say no to those cute little controls? Join this webcast for the ultimate database tools experience that you can have without a laser light show! Presenter:Zain Naboulsi, Developer Evangelist.
4/17/2008 1:00 PM - 2:30 PM Pacific Time | Duration: 90 Minutes

Added: April 12, 2008

Pratik Patel Describes the IUpdatable Interface for ADO.NET Data Services

The new IUpdatable interface supports create, update, and delete (CUD) operations on ADO.NET Data Services entities. Pratik's IUpdatable & ADO.NET Data Services Framework post of April 10, 2008 to the Astoria Team Blog describes the interface's following 10 methods:

  • CreateResource()
  • GetResource()
  • SetValue()
  • GetValue()
  • SetReference()
  • AddReferenceToCollection()
  • RemoveReferenceFromCollection()
  • DeleteResource()
  • SaveChanges()
  • ResolveResource()

Pratik promises "some examples and the sequence of calls made on the IUpdatable interface for each of them" in a follow-on post, as well as "features like ETag, Update interceptors" in later posts.

Added: April 10, 2008

White Paper: How to Choose a Data Synchronization Technology

Liam Cavanaugh's How to Choose a Data Synchronization Solution for Offline and Collaboration post of April 10, 2008 says the following about this Microsoft whitepaper about choosing between multiple sync technologies;

[W]e have posted a document titled "How to Choose a Data Synchronization Solution" which is an attempt to differentiate the offline and collaborations solutions available from Microsoft.  Hopefully this will help you better understand the various data sync technologies as well as to help answer the question of which technology is best suited for your particular needs.

Added: April 10, 2008

Rob Conery Starts a Series of MVC Storefront Tutorials

Rob describes his series as follows:

I'm creating an ongoing series of webcasts and blog posts, documenting the building of an eCommerce storefront using ASP.NET MVC. It's important to understand that this application has not been built yet - you're gonna help me do it :).

The goal is to build this application as openly, and "currently" as possible using an Agile approach with TDD. My goal is to post to this series at least twice a week as I build this application, taking your feedback and adjusting/discussing issues as they come up.

The project uses LINQ to SQL as its default data source, but Rob plans to plug in NHibernate and Subsonic later in the series.

Here are the episodes as of April 10, 2008:

So far, Rob has received plenty feedback on his "Agile approach with TDD" from TDD purists. His MVC Storefront: Intermission post of April 8, 2008 documents his reaction to the comments to the first two posts.

Added: April 10, 2008

Scott Guthrie: ASP.NET Dynamic Data Preview Available

Scott's ASP.NET Dynamic Data Preview Available post of April 10, 2008 includes the following description:

This new dynamic data preview now works with the standard built-in ASP.NET data controls (GridView, ListView, FormView, DetailsView, etc).  The dynamic data support enables these controls to automatically handle foreign-key relationships.  For example, on a gridview you'll now get automatic friendly name display of foreign key column values and automatic drop-down list selection support of these values when in edit mode.

The preview doesn't yet support Entity Framework. According to David Ebbo's day-earlier post of the same name:

Note that even though the drop has the ability to support Entity Framework (in addition to Linq To Sql), you will not quite be able to use it yet because it targets an Entity Framework build that is newer than the latest public build.  But don't worry, it won't be long before the missing pieces that will allow this are made available.

Added: April 10, 2008

Chris Rock Continues His LINQ to SQL Dynamic Queries Series

His LINQ TO SQL Dynamic Queries #3 (And's & Or's Together) post of April 10, 2008 extends his quest for dynamic Where clauses in LINQ to SQL expression. His previous two posts on this topic are:

LINQ TO SQL Dynamic Queries (And Operators)
LINQ TO SQL Dynamic Queries (Or Operators)

Added: April 10, 2008

Damien Guard Creates a Tiny Class to Enumerate Enums with LINQ

Damien's Using LINQ to foreach over an enum in C# post of April 10, 2008 describes a small Enums class to enable:

foreach(CustomerTypes customerType in Enums.Get<CustomerTypes>())

Cool.

--rj

Calais.NET Abstracts RDF Metadata from HTML, XML and Plain Text Documents with LINQ to XML

Chris Fulstow, an ASP.NET developer in Sydney, has written a API wrapper for the Calais Web service "that abstracts away web service details like complex XML input parameters and verbose RDF output data by processing the data with LINQ to XML." Chris's Calais.NET - generating metadata using the Calais web service post of March 21, 2008 explains his open-source project, which is licensed under the Microsoft Reciprocal License (Ms-RL) and available for download from Codeplex.

You pass the URL for an HTML, XML or plain text document to the Calais.NET API wrapper and receive a IEnumerable<string> of Resource Description Format (Semantic Web) entities that the Calais Web service detects in the document. For the current list of entities that Calais claims to detect, go to Calais Semantic Metadata.

Calais, which is sponsored by Reuters, delivers a free Web service that has this lofty goal and components:

The Calais initiative seeks to help make all the worlds content more accessible, interoperable and valuable via the automated generation of rich semantic metadata, the incorporation of user defined metadata, the transportation of those metadata resources throughout the content ecosystem and the extension of it’s capabilities by user-contributed components.

The Calais initiative has three major components:

  • The Calais Web Service is the core. The Web service provides for the automated generation of rich semantic metadata in RDF format.
  • A series of sample applications to demonstrate how the web service can be utilized and serve as a starting point for other’s development activities.
  • Active support for developers that want to incorporate Calais capabilities in their applications and web sites.

The Calais initiative is sponsored by Reuters and built on ClearForest technology.

Calais was the primary topic of The semantic web: Start making sense story for The Economist's "Technology Monitor" column of April 9, 2008. The column also mentions a number of other startups whose business plans relate to extracting metadata from ordinary text

Added: April 10, 2008

Danny Simmons: Visual Studio 2008/.NET Framework 3.5 SP1 to be Entity Framework's Shipping Vehicle

Danny wouldn't provide a date, but advises in EF will ship with SP1 of VS 2008/.Net Framework 3.5 (April 9, 2008) that EF will ship in VS2008 SP1 "this summer" and that EF beta bits will be in the forthcoming VS 2008 SP1 beta.

Danny also says that he'll be at DevConnections in Orlando in a couple of weeks giving these two EF presentations:

VMD314: Entity Framework in the Real World
Daniel Simmons
Come see the Entity Framework in action! Check out an exciting new open source application built on the Entity Framework. During this session we’ll discuss and demo the use of the Entity Framework to build a LOB application in the healthcare vertical.

VDM215: Entity Framework: Application Patterns
Daniel Simmons
Microsoft is introducing the ADO.NET Entity Framework and the Entity Data Model to help developers code against first-class business objects when creating business applications. Like any new technology, most of the information available on the topic focuses on what the Entity Framework is, what are its constituting components and related aspects. This session takes the audience beyond the “what“ of the Entity Framework, instead delving into various application scenarios and approaches to application architecture to show how one can use the Entity Framework today. We shall discuss the role of Entity Framework in Web, rich-client, and service-oriented applications.

Ryan Dunn Posts First SQL Server Data Services Sample App Available to Download or Test

It might have a funky name but Ryan's PhluffyFotos Sample Available post of April 9, 2008 is the first of what I hope will be several sample applications that use SSDS as their data source. Following are highlights:

    • This sample has a LINQ-to-SSDS provider in it.  You will notice we don't use any strings for queries, but rather lambda expressions. I had a lot of fun writing the first version of this and I would expect that there are a few more revisions here to go. Of course, Matt Warren should get a ton of credit here for providing the base implementation.
    • This sample also uses a very simplistic ASP.NET Role provider for SSDS. Likely updates here will include encryption and hashing support.
    • We have a number of Powershell cmdlets included for managing authorities and containers.

You must have credentials for the SSDS limited beta to run the sample code. If you don't, here's a link to an online version.

Beth Massi Offers Link List for VS 2008 N-tier Application Resources

Beth has accumulated a feed of Resources for Building N-tier Applications (April 9, 2008), which includes N-Tier and Remote Applications with LINQ to SQL.

Liam Cavanagh Demonstrates FeedSync Between Machines with the Sync Framework

Using the Microsoft Sync Framework to upload data to SQL Server Data Services (SSDS) isn't a built-in feature yet, but the following sample project will give you a leg up when Sync becomes the favorite way of keeping offline data sources synchronized.

According to Liam's Synchronization of Browser Favorites using FeedSync and the Microsoft Sync Framework of April 8, 2008:

At first, creating a new provider and figuring out how to make it sync can be a little intimidating. In order to help you through the process, we will walk through the creation of a simple provider that can sync between directories that contain Favorites. We will start first with the metadata store that the provider will use, since considering how metadata will be stored is the first step a provider writer should take when writing a provider. On top of this, we will build the provider, which will provide our actual sync capability. Then, we will use this provider to produce and consume feeds so that we can share our favorites between computers.

Liam presented Sync to the Web - Enable Offline Access to Web Data from any Data Store, which covers the use of Sync Framework with SSDS, at MIX 08.

Pablo Castro wants Input for Batching ADO.NET Data Services Requests

Pablo's Batching Data Service Requests post of April 6, 2008 casts a net for suggestions from developers and data architects for the syntax of batched CRUD operations with Astoria.

Ryan Dunn Interviews SSDS Architects Istvan Cseri and Nigel Ellis for Channel9

The blurb for the Istvan Cseri and Nigel Ellis: SQL Server Data Services Architecture interview posted April 7, 2008 says:

SQL Server Technical Evangelist Ryan Dunn sits down and talks turkey with two of the creators of SQL Server Data Services (SSDS), Architect Istvan Cseri and Development Manager Nigel Ellis. Istvan and Nigel dig into how to design applications for SSDS and cover a number of the interesting aspects of working with SSDS in terms of features, design, and security.

If you're interested in working with SSDS, don't miss this video segment.

Debra Dove: Avoid SQL Server 2008 (Katmai) Connection Problems

If you're using a pre-release version of SQL Server 2008 (Katmai) you've probably performed the required patches. If not, read Debra's Connecting to Pre-Release Versions of SQL Server 2008 – Part Deux of April 7, 2008.

Note that neither LINQ to SQL or Entity Framework will support SQL Server 2008's GEOMETRY or GEOGRAPHY datatypes or SPARSE columns.

Paul Stovell Demonstrates SyncLINQ for Silverlight in a Live Application

Paul's SyncLINQ for Silverlight post of April 7, 2008 has an embedded Silverlight app that demos data binding with his open source SyncLINQ project.

Note that the entries you add don't persist.

Updated Version of "Rumor: Google to Compete with SimpleDB and SSDS with Bigtable as a Web Service"

My post about the Google App Engine, which undoubtedly will compete with SQL Server Data Services, has been extensively updated to cover it's release to limited beta status on Monday night, April 7, 2008.

Sunday, November 18, 2007

Link and Entity Framework Posts for 11/19/2007+

Note: This compendium is updated daily or more often, depending on availability of articles. Updated November 20, 21, 23, 24 and 25, 2007.

Keith Farmer Takes on N-Tier Patterns with LINQ to SQL

From the "How Did I Miss This" department? (I missed it because Keith has been a infrequent poster—five posts from March to October 2007.)

Keith's LINQ and 3-Tier Dogma post of November 6, 2007 encourages developers not to be "pattern bigots" (my terminology) when it comes to multi-tier LINQ to SQL implementations. He says, undoubtedly in response to Dinesh Kulkarni's that LINQ to SQL Has No "Out-of-the-Box Multi-Tier Story:

The 3-Tier Model is just a pattern. And, like all patterns, It is meant to serve our needs, not the other way around.

He then goes on to examine the issue of the purity of separation of the data and logic layers:

    • Contractual purity (there is a set of well-known interfaces between the tiers)
    • Binary purity (the types are completely separate in each tier, *and* there is a contract between each)

and explains the advantage of abandoning binary purity in favor of contractual purity. He concludes:

The encapsulation of the data context is the creation of the logical layer.

His follow-on Encapsulation and LINQ to SQL post of November 13, 2007 provides a concrete implementation of encapsulating an IQueryable with a TableView class and an abstract class for wrapping a DataContext with a DataContextWrapper class. The article concludes with a sample implementation of DataContextWrapper.

Added: 11/25/2007

Bill McCarthy Excises LINQ to XML's Duplicate Namespace Declarations

Bill's Cleaning up your XML literal namespaces post of November 24, 2007 includes the code for a short utility program that removes redundant xmlns declarations from elements other than the root when you use the Element1.Add(Element2) method.

Added: 11/24/2007

CoDe Magazine Focuses on Data Access with LINQ and the Entity Framewok

The Data Programmability CoDe Magazine Focus Issue of December 2007 includes the following articles focusing on LINQ:

and these devoted to the Entity Framework:

All authors are from Microsoft's Data Programmability group.

Other articles cover SQL Server Compact Edition (SSCE) 3.5 and the new Sync Framework.

Added: 11/24/2007

LINQ to MPI.NET in Development at Phoster Incorporated

Adam Sobieski, a Phoster Incorporated developer, currently is completing development of System.Collection and System.Collection.Generic implementations for MPI.NET, which is a high-performance message-passing interface for .NET. According to his Update: LINQ to MPI.NET post of November 24, 2007, Adam plans to write a LINQ implementation for the collections.

Here's the University of Indiana's description of MPI.NET:

MPI.NET is a high-performance, easy-to-use implementation of the Message Passing Interface (MPI) for Microsoft's .NET environment. MPI is the de facto standard for writing parallel programs running on a distributed memory system, such as a compute cluster, and is widely implemented. Most MPI implementations provide support for writing MPI programs in C, C++, and Fortran. MPI.NET provides support for all of the .NET languages (especially C#), and includes significant extensions (such as automatic serialization of objects) that make it far easier to build parallel programs that run on clusters.

Adam's interest in LINQ to MIT.NET stems from his work on distributed AI applications using C# 3.0 and .NET 3.5. According to Adam's RETE, CEP, ESP post of the same day:

There are two types of machine reasoning popular today: CEP/ESP and RETE. There’s also combinations (Bruno Berstel, Alexandre Alves). I’m thinking P2P distributed applications with RETE/ESP using LINQ programming practices will allow for rapid-prototyping of some sophisticated AI applications. I’m presently brainstorming some developer libraries in this area (Semantic Grid, Knowledge Grid).

It's not yet clear to me how LINQ to MPI.NET would fit in with the ParallelFX program and PLINQ. PLINQ is directed to multi-core processors. My PLINQ Gathers Momentum post of December 8, 2006 (last updated 7/30/2007) includes many links to early PLINQ articles.

Added: 11/24/2007

Frans Bouma Reaches the Ninth Wave of LINQ to LLBLGen Pro Development

LINQ to LLBLGen Pro is coming along nicely using the LLBLGen Pro API to emulate LINQ to SQL but with the API's database-agnostic SQL intermediate language (IL). Frans is dropping the Skip() and Take() methods in favor of the API's pageNumber and pageSize values for paging, bypassing CROSS APPLY for SelectMany(), and implementing GroupJoin() and DefaultIfEmpty().

Frans' Developing Linq to LLBLGen Pro, part 9 post of November 23, 2007 provides the details of the trade-offs in implementing the preceding Standard Query Operators (SQOs) with the LLBLGen Pro API for multiple RDBMSs.

Note: The "Ninth Wave" refers obliquely to Eugene Burdick's prize-winning 1963 novel, which uses the Celtic ninth wave as a metaphor and Northern California as a backdrop.

Added: 11/23/2007

Bart De Smet Releases RTM Version of LINQ to SQOs

Back in the early days of the LINQ CTPs for VS 2005, Bart De Smet created a custom implemention of the LINQ Standard Query Operators (SQOs). His LINQSQO goes RTM post of November 22, 2007 announces that the RTM version of LINQ to SQOs is available on CodePlex.

The source code contains 148 unit tests that you can run with Visual Studio 2008 Pro or higher. This screen capture shows VS 2008 Pro's Test Results window displaying a few unit test results on the Query class library:

Added: 11/23/2007

Regenerating Original Entities from Entity Framework's ObjectStateManager

Neither the Entity Framework's ObjectContext or LINQ to SQL's DataContext is serializable, so you can't access the ObjectContext.ObjectStateManger's or the DataContext.Table<T>'s original values for an entity.

Danny Simmons' Creating an original value object from the separate values stored in the ObjectStateManager post of November 21, 2007 shows you how to create an an entity with all original property values populated from the partial (changed-value(s) only) data in the ObjectStateManager. Presumably, this entity would be serializable for cross-process transport.

Note: Don't confuse the term "value object" in Danny's post time with "complex objects" (a.k.a. Martin Fowler value objects.)

This post relates to Danny's earlier post about serialization depth (see below.)

Added: 11/23/2007

Alex James Joins the ADO.NET Team as Program Manager for Metadata

Alex James has moved from New Zealand to Seattle to join the ADO.NET Team as Program Manager for Entity Framework (EF) metadata. His initial Introductions blog post appeared on November 9, 2007 but the other ADO.NET EF folks didn't post an announcement, so I missed it. (Thanks to Julie Lerman for the heads-up).

Alex added the following EF-related posts after November 9:

Alex's posting frequency bodes well for his participation in the EF community.

Added: 11/23/2007

Danny Simmons on Serializing Entity Framework Object Graphs

Serializing Entity Framework (EF) object graphs to enable multi-tier data access scenarios incurs the same problems that caused Dinesh Kulkarni to admit that LINQ to SQL Has No "Out-of-the-Box Multi-Tier Story, as discussed in my post of October 18, 2007.

By default, the current EF CTP2 doesn't serialize associated entities. This omission requires that the client to make a method call for each set of instances required and then reconstruct the relationships locally. In this January 27, 2007 Entity Web Service: Returning Category thread Danny recommends creating a facade object to contain associated objects. The thread starter uploaded the alpha 0.1 version of a facade implementation to CodePlex.

Binary serialization for EF entities preserves associated entities but is limited to remoting or services on intranets because the payload won't pass through Internet firewalls. Binary serialization creates a deep clone of associated objects; that is, references to shared objects turn into individual copies of these objects. This results in what's called a "data explosion" and very large service/remoting payloads.

Danny's Question: Deep serialization of an object graph--how deep should it go? post of November 20, 2007 discusses three potential serialization options for future CTPs or versions:

  1. Return the entire object graph with 1:many and many:1 associations intact. Such graphs generate extremely large payloads and won't serialize with the default DataContractSerializer of Window Communication Foundation (WCF) because of cyclic references (also called cycles.)
  2. Remove the 1:many associations to prevent conflicts when multiple operations return graphs that include duplicate objects. LINQ to SQL implements this option by not serializing any 1:many associations. This is required to prevent cyclic references.
  3. Specify subgraphs on a method-by-method basis.

To serialize complete graphs with 1:many and many:1 (bidirectional) associations intact requires a rather complex workaround for the Windows Communication Framework's default DataContractSerializer or use of the NetDataContractSerializer.

Note that neither ObjectContext nor DataContext objects are serializable, which limits their identity managers and change trackers to in-process use.

Unless the ADO.NET team chooses one of the three options for EF v1, EF won't have an "out-of-the-box multi-tier story" either.

I'm working on a post with some examples and an analysis of a choice between options 2 and 3. Click here for a preview of the Serializing Object Graphs Without and With References post of November 21, 2007 (updated 11/23 and 11/25/2007) with downloadable files containing examples of serialized XML Infosets and schemas generated by the DataContractSerializer (DCS) and NetDataContractSerializer NDCS. Test with in-memory List<T> collections show that the NDCS serializes and deserializes bidirectional associations correctly.

Added: 11/20/2007 Updated: 11/23/2007 and 11/25/2007

Zlatko Michailov: Compiling LINQ to Entities Queries

Zlatko's previous post, Behavior of Variables in LINQ to Entities Queries of November 16, 2007, recommended compiling queries to remove LINQ to Entities' uncertain treatment of variables assigned literal values as constants or parameters.

Today's brief post, LINQ to Entities: Compiled Queries, explains the compilation process, which, like compiling LINQ to SQL queries, improves performance. Parameters are explicit for compiled queries.

Bill Horst of the VB Team: Converting SQL to LINQ Series

The VB Team posted the first of a series of articles, Converting SQL to LINQ, Part 1: The Basics (Bill Horst), on 11/19/2007. This episode covers basic LINQ query syntax. Future articles will cover LINQ equivalents to these T-SQL keywords:

  • FROM and SELECT
  • DISTINCT, WHERE, ORDER BY, Operators
  • Functions (Scalar and Aggregate)
  • GROUP BY and HAVING
  • Joins
  • UNION, TOP and Subqueries

InterLINQ Provider Alpha 0.2 Serializes Expression Trees

Pascal Schaefer and Manuel Bauer of the Swiss Software Solution Center have posted the Alpha 0.2 release of the InterLINQ library, including sample implementations for NHibernate, LINQ to SQL and LINQ to Objects, and a help file.

InterLINQ serializes the expression tree of a LINQ query so you can transport it across machine boundaries and execute it with a LINQ implementation on a server. It's up to you how to return the query result set to the client. LINQ to SQL lets you mark its partial classes as unidirectionally serializable, so classes with m:1 EntityRefs and 1:n EntitySets lose their EntityRefs because of the circular reference.

Tip: Right-click the InterLinq.chm file, choose properties, and click the Unblock button to read the help pages.

Danny Simmons: Entity Framework Beta 3 Due in a Few Weeks

From an answer to a question by Henrik Dahl in the ADO.NET (Pre-release) forum:

We're working hard to wrap up the last round of testing and bug fixes on the EF and the EF designer.  The plan is to release beta 3 of the EF/CTP 2 of the designer in a few weeks (think "early December").

Thanks to Julie Lerman for the heads-up.

Paul Stovell Explains SyncLINQ for Real and Derived Client State

In his Why SyncLINQ should matter to you post of November 15, 2007 and follow up Three categories of SyncLINQ queries article of November 16, Paul explains how derived state differs from real state in desktop client apps. He als demonstrates how SyncLINQ keeps derived state synchronized with real state as the data underlying real state changes.

Paul's in the process of coding the first SyncLINQ iteration. He writes:

In terms of right now, I have just implemented the first set of aggregate extensions, and I have a basic dependency system working. Over the coming week I’ll be working to implement an operator, and refactor much of the dependency system to support the overloads above.

His Introducing SyncLINQ post of October 16, 2007 includes a seven-minute video clip of SyncLINQ in action.

Note: There's still no library to download.

Mary Jo Foley: VS 2008 (削除) Rumored to be (削除ここまで) Available Monday 11/19/2007

Mary Jo writes "Sources say Microsoft will announce availability on Monday, November 19" in her "Visual Studio 2008 to go gold as soon as Monday" column of November 18, 2007.

eWeek's Daryl K. Taft quotes the MSDN Subscriptions WebLog post of November 16, 2007 in his Visual Studio 2008 Is Imminent post of November 17, 2007 as stating "Visual Studio 2008 is anticipated out early next week, with availability for subscribers." However, on November 18, 2007, the posts first sentence read "Visual Studio 2008 is anticipated out very soon, with availability for Subscribers." I assume the blog author edited the post without revision marks.

Be sure to review Dinesh Kulkarni's two LINQ Project General Forum posts about Beta 2 to RTM changes fo LINQ to SQL:

Jim Wooley suggests:

  • Open the DBML file as XML and change the UTF encoding from 16 to 8. Otherwise the compiler will complain about the DBML file's format.

Update 11/19/2007 1530 PST: LINQ to SQL Beta 2 to RTM Breaking Changes has been published as a downloadable .docx file. Charlie Calvert's Visual Studio 2008 Available for Download post has links to independently published files, such as the C# LINQ and language samples for Visual Studio 2008, which were updated 11/9/2007. The Visual Studio 2008 Samples page has a current list of samples for VB and C#.

Hopefully, the LINQ to Objects, LINQ to XML and LINQ to DataSets teams will post Beta 2 to RTM changes, if any, soon.

Update 11/19/2007 0700 PST: The rumors were correct. Microsoft made the download available but the MSDN servers were throwing  "Server Error in '/' Application. The file '/home.aspx' has not been pre-compiled, and cannot be requested." errors from the entry page for the download: https://msdn.one.microsoft.com/home.aspx?ApplicationID ..., which is not a good sign. Subsequently, the error messages changed to the more common "Server too busy."

Update 11/19/2007 0900 PST: Servers finally became operable.

Update 11/19/2007 1200 PST: Scott Guthrie has posted Visual Studio 2008 and .NET 3.5 Released with a summary of new features and links to related resources. Guy Burstein notes that you can download the Visual Studio 2008 and .NET Framework 3.5 Training Kit, too (120MB.)

Dinesh Kulkarni Writes a Common Base Class for LINQ to SQL Queries

If you want to "encapsulate a pattern and common behavior" across multiple business entities generated by SqlMetal.exe or the O/R Designer, Dinesh's "LINQ to SQL Tips 2: how to use common base class for all entities post of November 9, 2007 (released November 18, 2007) shows you how.

Danny Simmons: Handling Conditional Relationships in the Entity Framework

If your DBA has set up Relationships from Hell as described in Danny's An Interesting Relationship Mapping Scenario post of November 17, 2007 there might be a solution that works with Entity Framework v1, but it's more likely that you'll need to model a containment relationship with v2 (or later).

The many:one relationships Danny describes are defined by foreign key and type column values. The foreign key value points to the primary key of a table that's selected from a group of tables by a value in a type column. Only one many:one relationship occurs at any instance.

Danny describes a containment relationship thusly:

The basic idea of this construct is that "child" entities may be related to one or more "parent" entities but only one parent at a time.

The relationship Danny describes doesn't fit with my understanding of a containment relationship, which is more in tune with that described in the Object Containment topic of class notes for a Database Systems and Structures class at Simon Fraser University.

Subscribe to: Comments (Atom)
 

AltStyle によって変換されたページ (->オリジナル) /