Wednesday, October 24, 2007

LINQ to SQL and Entity Framework Posts for 10/22/2007+

Frans Bouma Reaches Part 7 of His LINQ to LLBLGen Pro Saga

Frans posted Developing Linq to LLBLGen Pro, part 7 on October 28, 2007. The article is an introspective essay on the perils of embarking on a project based on a third-party's new features (LINQ and expression trees) and painting yourself into a corner after many days of work. In this episode, the culprit is the Join operator, and Frans decides to modify the expression tree in place, as recommended by Matt Warren, and process JoinExpressions last. He says he doesn't know know yet how to handle GroupJoinConvert and Quote methods from the System.Linq.Expressions namespace, but I'm sure he'll find out soon.

Added: 10/28/2007

Substitute an Enum to Supply Discriminator Values for LINQ to SQL Inheritance Mapping

David Hayden's LINQ To SQL Enum Support Example Using Discriminator Column and Inheritance Mapping post of October 28, 2007 demonstrates using an Enum instead of a Class to provide the discriminator column value when mapping a table-per-hierarchy entity inheritance. This article is a continuation of his LINQ To SQL Discriminator Column Example - Inheritance Mapping Tutorial of October 26, 2007. I spent a few minutes trying to model bitwise operations on a discriminator Enum decorated with <FlagsAttribute()>, but gave up in frustration. 

Added: 10/28/2007

GridLINQ Extends PLINQ Concept from Multicore to Grid Computing

Robert Anderson, CTO of Digipede Technologies, mentioned on October 25, 2007 that he was planning to "put together a sample for using LINQ on top of the Digipede APIs" but Matt Davey of Lab49 beat him to the punch with his GridLINQ and Digipede post of the same date. Matt had proposed a GridLINQ extension in this October 21, 2007 post:

GridLINQ would differ from PLINQ in that instead of only using a single computers CPU’s/Cores, GridLINQ would use Platform/DataSynapse/CCS to process the workload.

Dan Ciruli, Digipede's Director of Products, referred to Matt's work in his Why West Coast Grid? PowerShell and LINQ are two great reasons post on the same day.

Here's how Digipede describes it's product:

The Digipede Network™ is a distributed computing solution that delivers dramatically improved performance for real-world business applications. Built entirely on the Microsoft NET platform, it is radically easier to buy, install, learn, and use than other solutions.

Note: Robert Anderson was once a member of the Gilmore Gang podcasters who disbanded in late 2006. Digipede Technologies is located in Oakland's Grand Lake district, just a few blocks from my house in Crocker Highlands. 

Added: 10/27/2007

Kevin Hoffman to Take Continuous LINQ (CLinq) Public in January

According to Kevin's Continuous LINQ will be in Dr. Dobb's Journal in January post of October 26, 2007 Dr. Dobbs Journal's February 2008 edition will open the kimono on the source code for Continuous LINQ (CLinq). Kevin first broached the idea of dynamic LINQ queries that update the UI as changes occur (instead of polling by repeating the query) in his Dynamic, Observable LINQ Views post of July 30, 2007. His Continuous LINQ post of August 6, 2007 added more detail and coined the name Continuous LINQ, not to be confused with Oren Novotny's Streaming LINQ (SLinq). SLinq filters continuous streams of data, such as stock tickers.

CLinq is more akin to SQL Query Notifications without Service Broker for Windows Presentation Foundation clients. Kevin derives his custom ContinuousCollection class from WPF's ObservableCollection class, which "[r]epresents a dynamic data collection that provides notifications when items get added, removed, or when the whole list is refreshed" by implementing INotifyPropertyChanged and INotifyCollectionChanged.

Note: If you're a computer book author, don't miss Kevin's September 13, 2007 On Writing post that extends Julie's obsessive/compulsive analysis to programmer/writers.

Added: 10/27/2007

Julie Lerman's Entity Framework Article for CoDe Magazine Is Online

Julie has two articles in the November/December issue of CoDe Magazine:

The latter piece is about programmers' notorious obsessive/compulsive tendencies.

Added: 10/27/2007

Zlatko Michailov Starts New Entity SQL Blog

Zlatko Michailov, Program Manager for the SQL Server Data Programmability Runtime team, started a new MSDN blog devoted to Entity SQL (eSQL) on October 24, 2007. His first three posts on the same day were:

  • Query Complexity Factors describes in detailed outline format the three ages of eSQL queries: compilation, query view expansion, and native SQL generation.
  • Entity SQL - Quick Reference shows simple examples of eSQL SELECT queries that return entities, values from functions, keys and references, m:1 and 1:n associations, paged rows, and grouped rows with aggregates.
  • Entity SQL explains the purpose of the new dialect and claims "Entity SQL is a very rich functional language whose expressiveness supersedes conventional SQL dialects."

Zlatko previously posted to a personal MSDN blog. I'm surprised that Elisa Flasko or another ADO.NET Team member didn't announce Zlatko's blog migration. I'm subscribed.

Thanks to Julie Lerman for the heads up on the new blog.

Added: 10/27/2007

Video Clip of Updated Entity Data Model Designer

The ADO.NET team posted a link to a six-minute ScreenCam segment by Noam Ben-Ami, a program manager in the Data Programmability Tools Group, that demonstrates some of the new EDM Designer features that Entity Framework CTP 2 will include. The video was shown at 1005 Media's VSLive! Las Vegas conference October 15 - 18, 2007.

Compare the current version with an April 2007 prototype (that included glyphs) in this 3:30 Camtasia screen capture.

Added: 10/26/2007

Prototype LINQ to SQL Clone DB_LINQ v0.11 Download

If you're interested in LINQ to MySQL, LINQ to PostgreSQL, or LINQ to Oracle, Jiri George Moudry has posted the source code for the September 2007 version 0.11 of DB_LINQ to GoogleCode under the GNU LGPL. The DbLinq Project: Linq Provider for MySql, Oracle and PostgreSQL page provides project documentation.

Each version has it's own version of SqlMetal.exe—MySqlMetal.exe, PostgreSqlMetal.exe, and OracleMetal.exe—to produce a C# class file for the database, and a DbLinq.RdbmsName.Prototype.dll file to add to your C# 3.0 project.

Moudry promises a November 2007 release that includes partial support for MySQL and PostgreSQL stored procedures and functions.

Added: 10/26/2007

Work on LINQ to SQLite in Progress

Kevin Kubasik's SqlLite Linq Provider post of October 25, 2007 has an early implementation of Matt Warren's LINQ: Building an IQueryable Provider sample code for the popular SQLite database, now called System.Data.SQLite. Kevin describes Moudry's project as "bi-directional, change tracking, general awesome crazyness" in his article.

Added: 10/26/2007

Getting Started with the Entity Framework Sample Code

The ADO.NET Team posted GettingStarted.zip (8.8 MB) to CodePlex on October 17, 2007 but forgot to tell folks about it until today. The archive contains folders for C# and VB versions (GettingStarted_CS and GettingStarted_C#) of a simple ASP.NET project intended to track travel blogs. There's also a Getting Started with LINQ to Entities.mht page that describes the database schema and process for creating the MyTravelPostModel.edmx Entity Data Model.

Added: 10/26/2007

Jim Wooley Creates XHTML EMail Bodies with LINQ to XML

His Creating HTML emails using VB 9 and LINQ post of October 25, 2007 shows you how to use VB 9's XML literals feature to generate email bodies and send the messages with the System.Net.Mail.MailMessage class to an SMTP server. Cool!

Added: 10/25/2007

Adam Green Compares Ruby on Rails to VS 2008 and ActiveRecord to LINQ to SQL

In his Visual Studio 2008 vs Ruby on Rails post of October 23, 2007, Adam Green provides a detailed comparison of the features of Ruby on Rails and VS 2008's ASP.NET 3.5 with a detour that compares ActiveRecord with LINQ to SQL. It's clear from his commentary that DataSets don't rank very high on his list of favorite data access objects.

Added: 10/25/2007

Andrew Matthews Posts LINQ to RDF 0.3 and LinqToRdf Designer 0.3

LINQ to RDF "will provide a full-featured LINQ query provider for .NET using both local triple stores with Graph Matching and SPARQL queries on remote stores" under the New BSD License as an extension to Visual Studio 2008 Beta 2.

Andrew says in Announcing LinqToRdf 0.3 and LinqToRdf Designer 0.3 of October 25, 2007 that his new version offers:

  • A new graphical designer to auto-generate C# entity models as well as N3 ontology specifications from UML-like designs.
  • Support for SPARQL type casting
  • Numerous bug fixes
  • Better support for identity projections
  • More SPARQL relational operators
  • Latest versions of SemWeb & SPARQL Engine, incorporating recent bug fixes and enhancements of each of them

You can download version 0.3 of LINQ to RDF and the new graphic LinqToRdf Designer 0.3 from Google Code.

Added: 10/25/2007

Dinesh Kulkarni Avoids the Data Objects vs. Business Objects Debate

Dinesh's October 25, 2007 DTOs or Business Objects post explains the design philosophy behind LINQ to SQL without a direct answer to the question of "whether DLinq is for data objects or for business objects" or a definition that contrasts the two object types.

My conclusion in Avoiding the LINQ to SQL Data Objects vs. Business Objects Debate: DAOs deliver BOs from tables of relational database management systems (RDBMSs). Forget the distinction between data and business objects. If you want to migrate low- to medium-complexity apps from table-oriented DataSets to modern object-oriented architecture and your back-end RDBMS (persistence store) is SQL Server 2000+ [Express], give LINQ to SQL a try. If you must use a different RDBMS, use a competing commercial or open source O/RM or wait for Entity Framework and the appropriate data provider.

Note: According to an earlier post, Dinesh is leaving his program manager job on the LINQ to SQL team for another (undisclosed) position. Tim Mallalieu who hasn't posted to his blog since November 2006, will take over Dinesh's responsibilities. Here's Tim's bio from DevTeach 2007:

Tim Mallalieu is a Program Manager on the ADO.NET team in Microsoft. Before working in Microsoft, Tim worked as Principal Architect for Encore Development preceded by roles as architect or development manager in startups focused on frameworks for the Enterprise, E-commerce and Online Gaming spaces. Tim's focus over the last few years has primarily been on Application Frameworks, Enterprise Architecture and Model Driven Development.

Hopefully, Tim will increase his posting frequency after settling into his new job.

Added: 10/25/2007 Updated: 10/26/2007

LINQ to SQL Does Have a WinForms Databinding Story!

Despite the glaring lack of non-trivial databinding code examples from the LINQ to SQL team, this first-generation implementation has a much better story for databinding than that for multi-tier projects.

You can emulate DataSet databinding in a three-tier master-children-grandchildren DataGridView hierarchy and add, modify, and remove objects in the UI. My October 23, 2007 LINQ to SQL's WinForms Databinding Story post (updated October 24, 2007) shows you how. Emulating DataSet updates with ADO.NET 3.5's TableAdapterManager component takes more than a few lines of code, but it's not really difficult.

Added: 10/24/2007

Visual Basic 9.0 Specification Beta 2 Available

Paul Vick's October 23, 2007 Beta VB 9.0 language specification released... post reports that Beth Massi posted Beta 2 of the Beta 2 version of the Visual Basic Language specification on the VB Developer Center. This edition covers all new VB 9.0 features except

  • XML Members
  • XML Literals
  • XML Namespaces

Grab your copy of this 1.7-MB, 328-page sure cure for insomnia today.

Added: 10/24/2007

New One-Hour LINQ, Entity Framework, and SQL Server 2008 Webcast

David Sceppa and Anthony Carrabino delivered on September 5, 2007 a 63-minute MSDN Webcast: Data Programmability and SQL Server 2008 (Level 200) that's now available on demand. According to the abstract the webcast provides "an overview of the new Microsoft data application development technologies and show how these technologies can benefit Microsoft SQL Server 2008 programmers."

David says the technologies are "LINQ (including LINQ to DataSet, LINQ to SQL, LINQ to Entities), the ADO.NET Entity Framework and SQL Server 2008. 

P.S. "Anthony owned and operated Vista Software, which created the popular VistaDB database engine for the Microsoft .NET Framework and the widely used Apollo Xbase data engine."

Added: 10/24/2007

Anders Norås Examines "Bare Naked LINQ"

To put the “this isn’t really LINQ for Java” and “cool, but this isn’t truly type-safe” issues to rest, Quaere author Anders Norås explains "how LINQ works" in his October 18, 2007 Bare naked LINQ post. Topics include

  1. "LINQ to Objects" and extension methods
  2. "LINQ to IQueryable" and LINQ to SQL
  3. "Final Words" and type safety at compile time

Be sure to read the comments. Anders added a postscript based on one of them: Auto completion for LINQ and Quaere (take 3) provides a screencast that demonstrates autocompletion.

There's also an fledgling Quaere implementation for Java Persistence Architecture: Sneak preview: Quaere for JPA of October 2, 2007.

Added: 10/24/2007

0 comments: