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

Jeremy D. Miller -- The Shade Tree Developer

Under the hood and working with .Net, TDD, Software Design, and Agile Stuff

My Last Rant about Stored Procedure Abuse

At the request of one of my colleagues --

"There should be more classes than stored procedures"

        -- Gary Williams

EDIT 10/28/2005 - Just to make this more specific, let's say there should really be more LOC in C#/Java/VB.Net than in T-SQL or PL/SQL


Published Oct 27 2005, 01:46 PM by Jeremy D. Miller
Filed under:

Comments

Eric Wise said:

Er?

If I have a customer class, and I use stored procedures for my CRUD, then I'm already at 4:1.
# October 27, 2005 3:14 PM

Jeremy D. Miller said:

Ok, I'll clarify then --

More classes than stored procedures that do business logic.

Do you use codegen for the sproc's?
# October 27, 2005 3:21 PM

Sahil Malik said:

Then don't do stored procs for simple CRUD :)
# October 27, 2005 4:19 PM

Jeremy D. Miller said:

Either way, human beings shouldn't have to be toiling away writing generic CRUD sprocs by hand. Been there, done that, moved on.
# October 27, 2005 4:28 PM

Oskar Austegard said:

In a data-driven application, business logic will often migrate from classes to the stored procs for performance and data integrity issues... Typically only the R is generic - the CUD may be much more complex.
# October 27, 2005 4:38 PM

DawlinLi said:

OMG, the senior developer here do EVERYTHING in stored procedure, business/validation, you name it. The only .NET component is straight data translation, that's it.
# October 27, 2005 5:26 PM

Sahil Malik said:

In my opinion, single table CRUD can definitely be automated.

Multiple tables - you have interesting issues to worry about.
# October 27, 2005 5:49 PM

Eric Wise said:

I use codegen for everything I possibly can.
# October 28, 2005 7:40 PM

Gary Williams said:

SPROC bad, code good. Can put code in service layer. SProc not do service layer. SProc not translate if change database. SProc not refactor easy. SProc hard to test.

Me no like Sproc.
# November 7, 2005 8:16 PM

Jeremy D. Miller -- The Shade Tree Developer said:

I promised myself that I wouldn't ever make another post about stored procedures, but Eric's post on...
# May 25, 2006 3:47 PM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Jeremy D. Miller

Jeremy began his IT career writing "Shadow IT" applications to automate his engineering documentation, then wandered into software development because it looked like more fun. Jeremy previously worked as a systems architect building mission critical supply chain software for a Fortune 100 company and learned agile development practices as a .Net consultant at ThoughtWorks, one of the pioneers of agile development. Jeremy is the author of the open source StructureMap (http://structuremap.sourceforge.net) tool for Dependency Injection with .Net and the forthcoming StoryTeller (http://storyteller.tigris.org) tool for supercharged FIT testing in .Net. Jeremy's thoughts on just about everything software related can be found on his weblog "The Shade Tree Developer" at http://codebetter.com/blogs/jeremy.miller, part of the popular CodeBetter site. Jeremy is a Microsoft MVP for C#. Check out Devlicio.us!

This Blog

Syndication

News

All opinions expressed here constitute my (Jeremy D. Miller's) personal opinion, and do not necessarily represent the opinion of any other organization or person, including (but not limited to) my fellow employees, my employer, its clients or their agents.

About Me

"Best Of" Compendium

StructureMap (Dependency Injection for .Net)

StoryTeller (Supercharged Fit)

Build your own Cab

TestDriven

MVP