Business logic in stored procedures or in Model layer?

?When in one, and when in another?Sometimes I think business logic should be defined in stored procs, but most of cases in Model layer (MVC) it is better.
[175 byte] By [yamm_v6.6_6a] at [2007-11-27 2:37:29]
# 1

Hi,

Technically speaking you put your code anywhere from Javascript to stored procedure.

Putting in javascript:

1.Performance is good.

2.You are exposing logic to customer. Which is not good.

Putting in DAO Layer or Java classes:

1.If it is very database oriented logic, takes more time to query from database.

2.For each change you need to rebuild and redeploy application.

Putting in Stored Procedure:

1.Good performance if you don抰 need to too much user interaction in logic.

2.Easy to modify and deploy without disturbing main application.

Decide based on situation.

Regards,

Bhavani

polimetlaa at 2007-7-12 2:57:44 > top of Java-index,Java Essentials,Java Programming...