LINQ in .NET Compact Framework 3.5 Webcast

You Can Take it With You

Syndication

News

  • Don't miss the next Windows Mobile Webcast... Unit Testing for Mobile Devices: http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032382824&EventCategory=4&culture=en-US&CountryCode=US.

A reminder that I'm giving a webcast tomorrow (Wednesday 27-February-2008) talking about LINQ support in .NETCF 3.5; the focus of the webcast is on pushing beyond the limitations of the .NET CF 3.5 implementation.

We'll of course talk briefly about the difference in feature support between .NET CF and the full .NET Framework, including why some of the decisions were made. I'll point you to some resources as well.

All that said, one of my biggest concerns in the .NET CF LINQ implementation is the inability to query a SQL Server Compact database directly. The current implementation does not provide SQL LINQ or LINQ to Entities so the only way to query SSC data is to first load the data into a DataSet. Now if you've heard me (or most anyone else) talk about mobile application data management, then you're familiar with the problems that go with using DataSets (performance, resources, etc.) in mobile apps.

So one of the big things we'll be talking about is using the hooks provided by LINQ to extend it so that we can efficiently query a SSC database directly. Don't worry, we're not going to try and reinvent SQL LINQ, rather we'll look at how a few well-targeted extension methods can – to use an old American phrase – provide a lot'a Bang for the Buck. J

I hope to see you at the webcast tomorrow (Wednesday 27-February-2008). You'll see what I think are some really solid solutions to some specific issues and also get a bit of experience in how you can extend LINQ yourself.


Posted Feb 26 2008, 08:36 AM by jim-wilson

Comments

Timo wrote re: LINQ in .NET Compact Framework 3.5 Webcast
on 02-26-2008 8:04 PM
Uh, could you point me to some resources explaining where and why DataSets have bad performance? I have not heard of that before, and I am using DataSets all over my app currently. Thanks.
Jim Wilson wrote re: LINQ in .NET Compact Framework 3.5 Webcast
on 02-27-2008 5:14 AM
Timo;

On the desktop, I have little concern about DataSets. My concern is specific to apps running on mobile devices. Even then, my intent is not to say that DataSets are universally bad in mobile applications; if they're working for you with acceptable performance and memory consumption there's no reason to change.

The issues with DataSets begin to occur as one's data volume grows. When data is stored in a SSC database, populating a DataSet duplicates that data in local storage when the data is already locally available and therefore consumes memory that can be used for something else; many mobile app databases won't even fit in memory as a DataSet - in fact, I've worked on many apps where the SSC database won't even fit on the device directly but must rather be stored on a memory card.

In almost all cases, one can query a SSC database and retrieve the data in less time than it takes to populate a DataSet. DataSets don't have indexes so if you need to frequently query your data, you don't get the performance benefit that SSC (or any other db) provides when using an index in a query. Again, matters most in large data volumes.

So when I say DataSets are problematic, I should probably qualify that statement to say that they're problematic when dealing with significant data volumes. For me though, in most of the mobile apps I do/have work the data volumes eventually grow to a point where DataSets become problematic. As a result, I encourage people to consider working with SSC directly when they can. But this is my experience - you mileage may vary ... so to speak. :-)
Timo wrote re: LINQ in .NET Compact Framework 3.5 Webcast
on 02-27-2008 6:23 AM
Ah, I see. Thanks.
Jim Wilson wrote re: LINQ in .NET Compact Framework 3.5 Webcast
on 02-27-2008 6:47 AM
Timo;

BTW - I encourage you to checkout today's webcast. As part of the presentation, I'll show some hard numbers gathered with the CLR profiler that show how DataSets compare to querying SSC directly - will give you an accurate picture of increase in memory consumption, garbage collections, etc.

I hope to see you there.

Jim
Tristan Smith wrote re: LINQ in .NET Compact Framework 3.5 Webcast
on 04-08-2008 8:29 AM
Would appreciate seeing that stats bmp you mention in the vid.

Will check back every once in a while to see if you've uploaded it.
Jim Wilson wrote re: LINQ in .NET Compact Framework 3.5 Webcast
on 04-08-2008 9:55 AM
Tristan;

I think you'll find what you're looking for on the post I put up following the webcast - http://www.pluralsight.com/blogs/jimw/archive/2008/02/27/50325.aspx

Let me know if that's not what you're looking for.

- Jim

Add a Comment

(required)  
(optional)
(required)  
Remember Me?