Ask a Website Design Company

Question

LINQ
Hi,
I'm currently a final year student studying Multimedia & Website Development, and I'm doing my dissertation about LINQ. I was just wondering if anyone here has used LINQ in any projects, and would like to know how you have found it? Has it made creating database driven websites easier?
Any feedback would be greatly appreciated. Thanks in advance

Sam

submitted by Sam Toplis on 6 March 2009

Answers

Mark Cloyd DesignsPink Power Member Mark Cloyd Designs
answered 21 questions
32 reviews
31 clients
14 articles

2 April 2009
Hi Sam,

I read your question some time ago but had really never heard of LINQ, after doing a quick search I think the reason I had never heard of it is because its used primarily for languages like .ASP. I'm a PHP developer and typically work on a Linux machine.

At any rate, while stumbling around on the net the other day, found something called PHPLinq... curious because of your question, I took a look at it.

So, if this will help your efforts, here is my initial impression. It looks like an attempt to create stored procedures outside of a database, which is a little strange.

Other than that it seems weird too that is takes an already simple language syntax (SQL) and in its attempt to simplify it, just changes the syntax into a whole new language.

I think that if SQL were hard to use, then LINQ might have some merit, but as it is, it looks like someone trying to re-invent the wheel.

I do understand too that there is an attempt to eliminate the need for looping through queries etc, but SQL is written in such a way that many times with a well written query that can be avoided anyway.

I don't mean to sound negative, that is just my impression. You asked for feedback... so, er, uh, that's mine!

Cheers

Mark Cloyd
Mark Cloyd Designs
mark@markcloyd.com

MDS SolutionsGold Member MDS Solutions
answered 1 question
1 reviews
1 clients
0 articles

7 April 2009
Hi Sam,

I've got a somewhat varied opinion on LINQ.

I think the flavour of LINQ you are referring to is actually DLINQ, which is where LINQ is used to query a database. This is something that I personally feel should be abstracted out to the database and not put directly into a development project.

I use .NET for pretty much all of my projects and as yet I'm to be convinced by DLINQ in any of my production websites. If you profile some of the dynamic SQL that is generated, some of it is poorly optimised and it even produces different execution plans based on whether you write the code in C# or VB.NET! I prefer the control of having my database layer simply returning data that I have specifically told SQL Server to return, using the indexes I have monitored and built, rather than relying on the framework to generate what it *thinks* is best.

Don't get me wrong, LINQ has it's place and I've found it very useful for iterating through custom objects or object from the framework, I simply think that there are better methods when it comes to talking directly to a database.

You may want to have a read through a blog post I made a year or so ago on the very subject (and some of the comments as well):

http://weblogs.asp.net/marksmith/archive/2008/01/25/linq.aspx

Thanks,
Mark

Back to list of questions



Can you answer this question?

If you are a Web Design Company and you are registered at WWDC, you may answer this question.