Middle Tier - Do you implement business logic in middle tier?
  v2.0 Posted at 31/12/2019 12:48 PM by Christian Morford-Waite

​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 okay 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.​​

Related rules

    Do you feel this rule needs an update?

    If you want to be notified when this rule is updated, please enter your email address: