How popular are stored procedures today, compared to 5 years ago?
I ask this question because the book that I'm reading (an ASP.NET 4 book) has no stored procedures in it. Is it the ASP.NET 4 way now?
|
How popular are stored procedures today, compared to 5 years ago? I ask this question because the book that I'm reading (an ASP.NET 4 book) has no stored procedures in it. Is it the ASP.NET 4 way now? |
|||||||||||||
|
|
Stored Procedures usually refer to DB objects... Why would the author want to open that box? It outside the scope of the book! Read up on SPs... http://en.wikipedia.org/wiki/Stored_procedure http://msdn.microsoft.com/en-us/library/aa174792(v=sql.80).aspx ASP.net Data Access: http://msdn.microsoft.com/en-us/library/ms178359.aspx Calling an SP from ASP.net: |
||||
|
|
|
I would say, just based on my own opinion and recent experience, that a good many developers are opting for ORM tools that abstract away all of the database code. That can make stored procs less necessary because the ORM framework is doing everything you would do in a stored proc (theoretically). You'll find a lot of inline SQL vs. stored procs debate on the web. I don't have a strong opinion one way or the other except that inline SQL should always be parameterized rather than spaghetti-coded with a bunch of concatenations. But stored procs are definitely still very popular and aren't going anywhere. |
|||
|
|
|
The .Net world is seeing an emergance of ORM systems like NHibernate and LINQ to Entities these systems lessen the need for stored procedures in a .net system. |
|||
|
|
|
What data access API does your book cover? I would hope that it would be Entity Framework, since that is the Microsoft-endorsed API of the moment. You can certainly use stored procedures easily through Entity Framework, they basically get mapped as methods on your ObjectContext. If they perform selects you can map the results to either a new class or an existing class; if they just perform updates it's even simpler. Here's a blog post giving a quick overview: http://blogs.msdn.com/b/bindeshv/archive/2008/11/20/using-stored-procedures-in-entity-framework.aspx |
|||
|
|