5

Possible Duplicate:
What ORM does Stack Overflow use with their ASP.Net MVC project?

The ADO Entity framework, as we all know, is replacing LINQ to SQL as the default ORM Microsoft recommends.

I just wonder whether SO is maintaining the its data access layer in LINQ to SQL, or is planning for a migration to ADO Entity for better support?

Edit: SO was using LINQ to SQL as the DAL. Just not sure whether it is still now, or in the future.

asked Jul 20, 2009 at 1:42
1
  • Do you have any reason to believe there is a different level of support for LINQ to SQL as opposed to EF? Commented Jul 20, 2009 at 2:50

2 Answers 2

5

We use both Linq to SQL and SQL blob strings, depending on what we're trying to accomplish and which fits the code better.

For example, there is no way AFAIK to do a full text search using LINQ syntax. (Maybe there's some nasty hack, but I didn't find much last time I searched)

answered Jul 20, 2009 at 9:28
4
  • Ah but it all works so so well :op Commented Jul 20, 2009 at 11:25
  • I'm not sure exactly what you mean by "using LINQ syntax" since they're just extension methods that have some syntactic sugar, but there is a question on SO that discusses this, and I've used it successfully as well. stackoverflow.com/questions/224475/… Commented Jul 20, 2009 at 12:01
  • 2
    ugh, stored proc hack.. Commented Jul 20, 2009 at 12:29
  • I'd be very tempted to switch to stored procedures if I had a site like stackoverflow.com. But then again "if it ain't broke don't fix it". Also, if you are considering making some tests to see how much performance gain you could get switching to stored procedures on SO, I would be interested to see the results. Commented Jul 20, 2009 at 13:15
2

Edit: Definitive answer, courtesy of Kyle, is that yes, Virginia, they do use LINQ to SQL.

(削除) I'm taking a stab at this since Jeff will be able to definitively answer this, but I don't know if he'll see this question. Anyway, it seems like straight SQL to me.

  1. They're taking advantage of SQL Server's Full Text Search, which uses certain SQL syntax.
  2. They need to control the speed of queries on an ever-increasing database, and the only way to really get the right indexes and performant queries is to use SQL.
  3. Jeff knows SQL very well, and it would surprise me if he tried to put the data access layer in the hands of an ORM, which is a solution to a non-existent problem, if you ask me (and you sort of did).

IMO, ORMs tend to be slow and do a horrific job of optimizing queries. Of course, I'm biased because I spend most of my days in SQL, but I still think ORMs cause more harm than good. It causes app devs to think that they don't have to understand databases, which is just naive, I think. That being said, I love using LINQ with lists and XML. Just not with SQL. (削除ここまで)

answered Jul 20, 2009 at 1:50
6
  • 1
    He did answer this several months back, and they do use LINQ to SQL: blog.stackoverflow.com/2008/09/… Commented Jul 20, 2009 at 3:41
  • Then this list stands as 3 reasons why I'm a moron. Works either way, I suppose. Thanks for the link! Commented Jul 20, 2009 at 4:31
  • You do mean 3 more ways you are a moron, right? Commented Jul 20, 2009 at 4:44
  • @Brad: Absolutely. The list is truly innumerable. If I were to ask my wife, I'm sure I could get an exhaustive list, though. May take a while. Commented Jul 20, 2009 at 5:02
  • Although I agree with you, but you don't seem to answer my question: I was asking whether SO is still using LINQ to SQL, given that it has already drop out of MS priority. Commented Jul 20, 2009 at 6:12
  • @Eric: I think that you were partially right though - I think Jeff mentioned on the podcast that there were some queries that LINQ couldn't generate, and that he was using SQL by hand for them, including the full text search. Commented Jul 20, 2009 at 6:24

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.