Sunday, June 01, 2008

LINQ and Entity Framework Posts for 5/29/2008+

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

Steve Lasker Posts SQL Server Compact and ADO.NET Sync Services Sessions for Tech*Ed Developers 2008

Steve's Heading to Tech Ed US 08 post of May 30, 2008 lists the following sessions, panel discussions, et al. about SQL Server Compact (SSCE) and ADO.NET Sync Services

  • DAT325: Wednesday 8:30AM-9:45AM - Unlocking the Power of Microsoft SQL Server Compact 3.5
  • TEO Panel _24: Wednesday 1:00PM-2:00PM Building Offline Enabled Applications Panel Discussion
  • TEO Panel _33: Friday 2:00PM-3:00PM LINQ in the UI Layer
  • MBL403: Building Custom Sync Providers for the Microsoft Sync Framework by Andy Wigley Wednesday 2:45
  • WIN202:  Introduction to Microsoft Sync Framework by Liam Cavanagh Thursday 1:00
  • MBL404: Microsoft SQL Server 2005 Compact Ultimate Performance by Tuning Darren Shaffer Thursday 4:30
  • MBL07-TLC: Microsoft Synchronization Services for ADO.NET: From Desktops to Devices by Liam Cavanagh Friday 8:30
  • MBL01-TLC: Taking Data Offline: Introduction to Microsoft Synchronization Services for ADO.NET by Liam Cavanagh Friday 4:30

He also provides links to these SSCE demos from DAT325 and a recent Road Trip:

Added: 6/1/2008

Chris Webb Muses about the Potential for a LINQ to MDX Implementation

Creating a useful LINQ to MDX (Multidimensional Expressions) implementation isn't a walk in the park because you don't get fixed column names for a given query. Chris's LINQ to MDX post of May 27, 2008 proposes LINQ to MDX sets instead of LINQ to MDX queries.

Chris asked Marco Russo about the feasibility of LINQ to MDX sets and shows an example of Marco's possible C# syntax for a simple query. Chris also brings up the issue of the always-forthcoming OLAP4J spec, which still seems to be in limbo.

Be sure to read the comments. "Mosha" is Mosha Pasumanski, the principal MDX architect.

Added: 6/1/2008

Marco Russo and Paolo Pilarosi Finally Get Programming Microsoft LINQ to the Shelves

Marco's Programming Microsoft LINQ finally shipping post of May 27, 2008 on describes what's in the book and provides a copy of its TOC.

He's also planning a book on Data Warehousing and SQL Server Analysis Services.

Added: 6/1/2008

Maíra Wenzel Writes about ASP.NET Dynamic Data's Dynamic Data Attributes

You can add attributes to ASP.NET Dynamic Data to extend its data model's metadata for fields and other objects. Maíra's Dynamic Data Attributes post of April 24, 2008 briefly describes the 13 available data attributes of the April 23, 2008 release with links to online help.

Maíra's a Programmer/Writer for the ASP.NET team and doesn't post frequently to her MSDN blog, which is probably why I didn't catch the preceding post. (Thanks to Steve Naughton for the heads up.)

Sidestory: Maíra Schmidt is the wife of a Brazilian friend who lives in Joinville, so I thought this Maíra might be from southern Brazil. (Maíra is a fairly common Brazilian female first name.) Sure enough, her About page says:

I have a bachelor degree in Computer Science from the Universidade Federal do Rio Grande do Sul. I started my career as a Web developer in Microsoft partner companies in Brazil.

And she has a personal blog in Portuguese subtitled "Uma gaúcha na terra do Tio Sam", "A cowgirl in the land of Uncle Sam." (Residents of Rio Grande do Sul are known as gaúchos and gaúchas, because the southeastern part of the state is a Pampa similar to Argentina's.)

My friend also graduated from UFRGS in Porto Alegre with a BSEE (but many years ago). I traveled to Joinville (the largest city in Santa Catarina, the state north of Rio Grande do Sul) many times when I was in the business of producing building panels insulated with urethane foam for cold storage warehouses (which followed several years of supplying foam chemicals to surboard makers.)

I was surprised to find the train station in Joinville looked thoroughly German, most of the residents had Latin American first names and German last names, and there were nearby towns named Novo Hamburgo (New Hamburg) and Blumenau, which hosts a yearly Oktoberfest. Most of the region around Joinville and extending south into RS was populated by the decendants of German immigrants, who began as farmers but ultimately founded industrial companies that grew quite large. The currasco (beef barbecued on skewers) and German sausages and sauerkraut were to die for.

The trips to Joinville introduced me to Brazilian music and my favorite musician, Brazilian guitarist Baden Powell. I have more than 100 Brazilian LPs (vinyl) from that era. Here's a link to my Baden Powell Radio station on Pandora, which include albums by younger and older Brazilian guitarists, such as Badi Asad and Vicinius de Moraes.

Dori Caymmi brought back memories of concerts long ago in Rio when he gigged occasionally at Pete Escobedo's club under Berkeley's ill-fated Pasand restaurant in 2000.


Added: 5/31/2008

Beth Massi: MSDN Goes Web 2.0ish with New "Social Bookmarks" Service

If you add a Bookmark on MSDN bookmarklet to your Links toolbar, all your Forum 3 (see below) posts add to the favorites in the Your Name's Bookmarks list. Beth Massi's Check it out - VB Social Bookmarks post of May 30 has a link to the VB Developer Center which sports a "Popular Social Bookmarks" section. Mary Jo Foley's Microsoft to showcase social bookmarking at TechEd post of May 26, 2008 has more details about and links to the technology formerly code-named TagSpace.

I was surprised to see my initial OakLeaf blog bookmark I had just added as the first item in the list:

It also was the first item in the C# Developer Center section, so I assume the pages search for the last Social Bookmark entry you made and display a link. Nice touch.

Note: There's a bug that causes the ... more link to open the bookmarked page instead of the bookmark and one that shows the title of my post as the default value before I edited it.

If you use the same Windows Live ID for all your activities on the Microsoft site, bookmarks on the following sites are aggregated:

Beth's public Social Bookmarks are here and mine are here. You also can find my bookmarks by searching on the OakLeaf tag.

Following are MSDN blogs about Social Bookmarks:

I'm not sure how anonymity meshes with the "community planner" title.

Added: 5/31/2008, Updated: 6/1/2008

Dave Robinson: SQL Server Data Services Developer Center Opens on MSDN (and There's an SSDS Forum in the New Format)

Dave's SSDS MSDN DevCenter is live post of May 30, 2008 notes that the SSDS Developer Center has opened on MSDN. He forgot to mention that there's a new SSDS - Getting Started Forum open also. (Two of the three outsider posts as of early AM on 5/31/2008 were off topic.)

The SSDS Forum is running the new Forum 3 Update (Release 3.3) that solves many of the problems folks are experiencing in v2 forums (e.g., slow response time, unwanted logouts, etc.) The plan is to migrate the v2 forums to Forum 3 over the "next few months." The list of forums that have been upgraded to Forum 3 is here.

Added: 5/31/2008

Steve Naughton Adds Yet Another Post to His ADO.NET Dynamic Data Role-Based Permissions Project

This time it's Part 7 - Updating the ListDetails Page, which does the same as Part 4 - Limit Tables shown on Default page and List, Edit & Details etc. for the double-duty ListDetails page.

The latest (post-SP1) ADO.NET Dynamic Data update substitutes separate Details and GridView or ListView pages for earlier versions' controls paired on a single page. Retaining the combined-controls page remains an option you can set in the Global.asax file.

Added: 5/30/2008

Rafik Robeal Discusses VS 2008 SP1's Improvements to the ADO.NET Sync Services Designer

Rafik's Sync Designer in VS2008 SP1 post of May 30, 2008 describes the changes made by Visual Studio 2008 SP1 Beta to the ADO.NET Sync Services designer and points to Guy Burstein's Visual Studio 2008 SP1: Sync Services for ADO.Net with SQL Server 2008 Change Tracking post of May 12, 2008, which includes changes that occur when connecting to an SQL Server 2008 database.

Added: 5/30/2008

Rob Conery's MVC Storefront Project Moved to ASP.NET

The ASP.NET site is now hosting Rob's MVC Storefront and calling it a "Starter Kit," according to Rob's MVC Storefront Now On ASP.NET post of May 30, 2008. All 10 screencasts are here and there's a new MVC Storefront Forum. The latest code samples are on CodePlex.

Apparently the volume of complaints about Rob's heretical Repository model implementation were impacting the site's performance.

Added: 5/30/2008

Jon Udell Reflects on Live Mesh, FeedSync, and Third-Party FeedSync Extensions for Databases, Spreadsheets and SMS Messaging

Jon's latest Perspectives interview for Channel 10 describes how Barbara Willett of Mercy Corps and Nigel Snoad of Microsoft Humanitarian Systems synchronize Access (!)databases in Afghanistan (!!) for "data collection and reporting in an environment where Internet connectivity is spotty, and where lightweight, two-way synchronization is essential."

If you worked with earlier versions of Access, you'll probably recall its briefcase replication features, which SQL Server later adopted for merge, snapshot and transactional replication services. FeedSync is dramatically simpler and lighter in weight than either Access or SQL Server syndication.

In his LiveMesh and FeedSync: software “above the level of a single device” post of May 30, 2008, Jon says:

When David Stutz left Microsoft, he wrote a parting essay that invoked a new kind of Internet-oriented operating system characterized by “software that runs above the level of a single device.” Tim O’Reilly echoed that phrase here, and often used it to help explain what he meant by Web 2.0.

The recently-announced LiveMesh is a nice example of software that runs above the level of a single device. It runs symmetrically on all your computing devices, in the part of the cloud that’s associated with your devices, and in other parts of the cloud where services you transact with are running. ...

The platform’s connective tissue, as discussed in my interview with Ray Ozzie, is FeedSync, a synchronization system based on the same simple technology that powers the blogosphere: XML feeds of items, in RSS or Atom formats. Whether they represent big chunks of information like documents and media files, or small scraps of information like calendar events and status messages, LiveMesh objects are made up of feeds. All these objects synchronize across your mesh of devices and services using the same openly-specified FeedSync mechanism.

Jon then goes on to mention that:

They’ve also built adapters for spreadsheets and — what should be very interesting to Ken Banks and Joel Selanikio — for SMS messaging systems. ...

If the Mercy Corps solution interests you, Nigel says that the toolkit he and his team built for them will be openly released in a few weeks. Watch the FeedSync blog for details.

The FeedSync blog doesn't have prolific contributors. In fact, there have been only three brief posts since December 2007. I'll add a topic to this series when Nigel posts his toolkits, give them a try and report my results.

Added: 5/30/2008

Mike Taulty Continues his ADO.NET DataServices Series with a Concurrency Conflict Detection Demo

Mikes' ADO.NET Data Services - Concurrency in Action post of May 30, 2008 illustrates how to set up concurrency conflict detection in the Entity Framework back end and shows how Astoria detects conflicts with an ETag in the Response Headers that contain original field values in a concurrency token. You then return the token as the value of the If-Match Request Header. If the match fails, the Web server returns an HTTP 1.1/412 Precondition Failed Response Header.

The examples include numerous Fiddler screen captures that further illustrate what's happening on the wire.

Added: 5/30/2008

SQL Server Data Services: Twitter Problems Prove the Need for Early Scalability of Back-Ends for Social Networking Messaging Systems

Numerous bloggers have blamed Ruby on Rails for Twitter's recent downtime problems, but the mushrooming messaging service's You've Got Q's, We've Got A's post of May 28, 2008 by developer Alex Payne.  Nati Sholom, GigaSpace's CTO, wrote a Twitter as a scalability case study post on May 18, 2008 that concludes:

Twitter is no different than many other web apps that have become overnight successes.

They had a good idea and went to implement it as quickly as possible. Ruby seemed to be a perfect tool for them to get there quickly. Success was much bigger and faster then they imagined. Not surprisingly. the architecture was not designed for scalability and they are now forced to go through the painful process of scaling their architecture.

Updated: 6/2/2008: Dare Obasanjo weighs in on Twitter's scalability problem in his Will Twitter be the Next Friendster? post of June 2, 2008:

Recently the folks behind Twitter came clean on the architecture behind the service and it is quite clear that the entire service is being held together by chewing gum and baling wire. Only three MySQL database servers for a service that has the I/O requirements of Twitter? Consider how that compares to other Web 2.0 sites that have come clean with their database numbers; Facebook has 1800, Flickr has 166, even Wikipedia has 20. Talk about bringing a knife to a gunfight.

VentureBeat's MGSiegler posted Twitter: Don’t blame Ruby, blame Scoble on May 29, 2008. This article includes a summary of Siegler's telephone interview with Sholom, which makes these points, inter alia:

Shalom fully understands the burden the Twitter team now has. It basically has to take its first architecture, which isn’t working, and re-build it on the fly while the service is still running. ...

Shalom agrees that all of the Ruby on Rails hatred in the blogosphere is misguided. That framework should still be fine for the front-end (just as Payne indicates), but it’s the site’s architecture or “engine” that needs to be rebuilt. ...

One thing is for certain with all of Twitter’s recent issues. A lot of start-ups in the future are going to learn from mistakes made. Today’s post follows Payne’s post last week stating that Twitter wasn’t built to handle its current usage.

While the core team that built Twitter at the time may have had no way of foreseeing today’s issues, companies in the future should learn from this and choose the correct architecture while taking the time to think about scalability, just in case they do hit it big.

Updated: 6/2/2008

I'm not sanguine for the prospects of SQL Server Data Services (SSDS) as the back end for a high-performance messaging system because the XML network protocol used is considerably slower than the conventional Tabular Data Stream (TDS) format that Microsoft released recently as an Open Protocol Specification. Further, latency of an Internet connection between the database and the Web server probably undoubtedly would preclude interposing the cloud.

That said, the Twitter fiasco is a prime example of failure to plan for and implement a scalable database back end.

  • Added: 5/30/2008

    Marcin Dobosz Shows You How to Extend ADO.NET Dynamic Data's FilterRepeater Control

    ADO.NET Dynamic Data (a.k.a Onyx, its original code name) enables filtering DataView or ListView lists by foreign key field or Boolean field values selected from dropdown lists. When you generate a scaffold manually or with the Dynamic Data Wizard, FilterRepeater dropdowns appear at the top of the list.

    For example, a list of Northwind Orders has a Customer, Employee and Shipper dropdown as shown in the following multiple exposure:

    Marcin's Dynamic Data samples: Extending the FilterRepeater post of May 29, 2008 shows you how to replace the default dropdowns with AJAX AutoComplete dropdowns by implementing the AdvancedFilterRepeater, FilterFactory and DelegatingFilter components. The post includes sample code.

    Added: 5/30/2008

    Paul Sheriff Screencasts LINQ to XML for Channel9

    The geekSpeak recording: Inside LINQ to XML with Paul Sheriff of May 29, 2008 carries this (partial) description:

    In this geekSpeak, Paul Sheriff focuses on LINQ to XML and reveals lots of tips for getting up to speed with it. We loved seeing the new techniques for building XML documents using the XDocument type that are tremendous time savers. He helps us understand what is LINQ, what’s LINQ to XML, and what are the new XML handling capabilities of VB and C#. He shows a nice example of LINQ to SQL output with XML literals interleaved, as well as an actual LINQ to XML query that comes back with (surprise) XML.

    Added: 5/30/2008

    Rafik Robeal Explains Why ADO.NET Sync Services' PeerSyncProvider Doesn't Get Along with SQL Server 2008's Change Tracking Feature

    In his Metadata is the Hart and Sole of Peer Sync post of May 29, 2008, Rafik explains that ADO.NET Sync Services' PeerSyncProvider requires inserting, updating, and deleting metadata with SyncAdapter commands but SQL Server 2008's Change Tracking metadata (CHANGETABLE) is read-only. Rafik concludes:

    [Y]ou can still leverage SQL Change Tracking for Peer Scenarios albeit you need to use a side table to store the changes to the metadata.

    Added: 5/30/2008

    Mike Taulty Demos ADO.NET Data Services' New Batching Feature

    Mike's ADO.NET Data Services - Batching in Action post of May 29, 2008 demonstrates use of the proxy.ExecuteBatch() method to send a single POST message to the $batch endpoint and issue multiple GETs to retrieve multiple records from different tables.

    Similarly, he shows you how to use the proxy.SaveChanges(SaveChangesOptions.Batch); method to invoke multiple POST, PUT, or DELETE methods in a single operation.

    Stuart Leeks Analyzes the Performance of Multiple Let Expressions in a Single Query

    His Using let in LINQ to Objects - Part 2 post of May 29, 2008 measures the overhead of single and multiple instances of the let/Let LINQ keyword in a query, and demonstrates a query where use of let/Let improves performance.

    Stuart Leeks Explains the Basics for Using LINQ to Object's Let Method

    The first member of Stuart's two-part Using let in LINQ to Objects of May 21, 2008 shows provides an introduction to the let/Let LINQ keyword. Usage is similar in other LINQ implementations, such as LINQ to SQL, LINQ to DataSet, and LINQ to Entities.

    "LinqMaster" Starts LINQ and Lam[b]da Expressions Explained Blog

    Here in reverse chronological order are LinqMaster's first posts:

    He/she promises to "cover each LINQ extension, describe it, and show examples of how and why you might use it."

    Julie Lerman Exposes Entity Framework's New EntitySet, Entity, and Property Properties

    Her Full frontal entities? A little privacy please! post of May 29, 2008 outs newly implemented Internal or Public access for entities, Property Setters and Getters, as well as EntitySets with Public, Private, Protected, or Internal access in SP1.

    Folks have been requesting variable visibility for these collections, objects and properties for many months.

    Nikolai Smolyanskiy from the Live Core Team Describes Live Mesh's Authentication and Authorization Features

    Nikolai's Live Mesh Security in a Nutshell post of May 29, 2008 talks "about Live Mesh security and authorization architecture, so that you understand its internals and feel better about trusting your data to the Mesh."

    John Papa Concentrates on His Book's Essentials Despite Promised Fancy Silverlight Skins

    John promises in his Keeping Focused on Silverlight and Data post of May 29, 2008 that he won't lose track of his forthcoming book's topic, Data Access with Silverligh, just because he sweet-talked Corrina Barber into creating "several sets of skins" for examples. He also has a new URL for the book.