Middle Tier - Do you implement business logic in middle tier?

Last updated by Brady Stroud [SSW] about 1 month ago.See history

Business logic/rules should be implemented in an object oriented language such as VB.NET and C#.  This dramatically increases the adaptability, extensibility and maintainability of the application.

Implementing business logic in stored procedures have the disadvantage of being hard to test, debug and evolve, therefore, they should only implement basic data access logic.

With the exception of some very heavy data oriented operations, it is excusable to use stored procedures to carry out some logic for performance reasons.

Triggers are even more difficult as their behaviour is event based.  It is OK to use triggers for non-functional/infrastructural features such as logging changes or maintain more complex relational integrity which cannot be enforced by a simple relationship.

Adam Cogan
We open source. Powered by GitHub