Determination of Business Logic location

When should business logic be put into a SQL Stored procedure and when should it be put into Class object? we are debating different architectural approaches and I am looking for some guidance.
TIA, Dean

[215 byte] By [dlgross] at [2007-12-16]
# 1

Hi dlgross,

Never put business logic into SQL stored procedures. I had developed a Business Logic Layer.

BusinessLayer.Components released, too...!!!
http://guydotnetxmlwebservices.blogspot.com/2005/01/businesslayercomponents-released-too.html

Good coding!

Javier Luna
http://guydotnetxmlwebservices.blogspot.com/

JavierLuna at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...
# 2

I'd love to be able to read this, but can't see an english version. Intelligent information on such architecure questions is very valuable, and sometimes I find hard to come by.

I would have to question the statement without having read the doc/ opinions. Surely it would greatly depend on the actual business logic that an individual is refering to.

Ie.

A SPROC could validate the application users rights to edit (update) a record. This then is applying security at the lowest levels. Of course this would also be implmented higher in the architecture, but as with web services and smart clients validation must happen in multiple places for a user friendly and data sensitive approach.

This is not the merging of the business logic layer of code with the data layer, or the consumption of object from the business logic layer in anyway, it is however, applying application or business logic.

As for what the data layer should be. An access library for a given physical or other datasource consuming nothing from the layers above, and providing interface defintions for interaction.

Also, with the signifcant emergence of XML applications where lots of processing is completed on a SQL server to return results - sometimes by direct XPath queries - surely this then becomes a neccessity?

At least this is what I think, and I have no problems with being corrected, it could be beneficial.

Sorry if I have my usual typo's.

mokeefe at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...
# 3

There is a lot of interest in this thread!

Does anyone have any useful references etc?

mokeefe at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...
# 4

Hi Javier,

Am I missing something with your links? You obviously post in English, but I am getting spanish.

mokeefe at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...
# 5

Further responses (Architecture Forum)

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=680077&SiteID=1

mokeefe at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...

.NET Development

Site Classified