CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Eric Wise

Business & .NET

LINQ/DLINQ Birds of a Feather Session

So I sat through the session moderated by sahil, and I must say it was pretty interesting with a decent dialogue going on.  I had downloaded the beta bits and toyed around with them a bit previously, but not in any thorough detail.

There was a nice Q&A session at the end, but I didn't get to ask all the questions I wanted to ask, so I'm going to post them here, and hopefully someone in the community will pick them up and run with them.

  1. DLINQ seems to generate some kind of mapping file to the database.  This brought up a concern with me that if I'm embedding this into my .dll in a multiple developer environment.  If developer A makes a dev database change and updates the mapping then developer B fixes an unrelated bug somewhere else and pushes to production, will DLINQ ignore that the schema isn't the same?  IE as long as that database change isn't an explicit field that is being called in the assembly will it ignore it and move on or will it puke?
  2. LINQ queries seem to be able to filter just about any object collection that is IEnumerable... if making a round trip to the database isn't a scalability issue in your environment, how does the performance of in memory object filtering stack up to sorting and filtering on the database?  Since sorting/filtering is what SQL Server does, I'm assuming that it would be more efficient.  In a web environment, doing sorts and filter on the web server instead of the database server could possibly have a significant impact on scalability?

All in all, it was an excellent session, Sahil and the Microsoft folks did very well fielding the questions.  They also put to bed that the new var keyword is not a variant (whew).  Let me repeat that: var is not variant.

Technorati Tags: , ,



Comments

Jim Wooley said:

You bring up some valid concerns. Regarding DLINQ (LINQ to SQL), you get strong typing between the UI and Business layer. The mapping layer is still loosely coupled. If someone changes the database schema without modifying the mapping layer (attributes or external XML), you will get runtime exceptions at this point. They may be looking at resolutions to the issue, but there is no solution yet.

As for LINQ and performance, if you are accessing the data directly from the database and DLINQ can map your functions, it will use  the database native engines for filtering and sorting. If you already have the objects in memory then LINQ will handle the filtering and sorting by taking advantage of the 2.0 iterators. The point is well made that we still need to worry about architecture and use the appropriate tool for each use case. Just because LINQ gives you a jackhammer, not everything is concrete.
# June 14, 2006 12:00 PM

Steve said:

"Just because LINQ gives you a jackhammer, not everything is concrete."

That's the best LINQ quote I've heard yet.  So true!
# June 18, 2006 10:36 PM

Kasper said:

I have written a small project about LINQ and DLinq. This might an interesting read for some of you guys.

http://www.dlinq.dk/DLinq.html

# August 27, 2006 9:23 AM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add
Check out Devlicio.us!