Architecture – Business Layer in Database Logic System

Architecturebusiness-logic

Background:I'm a not very experienced software developer, currently working on a legacy project where all the business logic is in the database(sqlserver) using stored procedures. Now we are asked to rewrite the application from foxpro to .net but using the same database.

Question: My team architect suggest a n-layer architecture with a BLL(Business Logic Layer) but all the business logic is in the database, and there is no plan to have business logic out of the database due to organizational policies. I believe that the BLL is useless in this case, could you share your experience and justify this decision if agree?

Best Answer

Though it does seem supperfluous it could lay in the ground works to make the move at a later time easier. You could however emulate the business logic by having thin wrappers where all the db interaction code will be. Then use this to construct your Data objects for use in the rest of the system.

On the other side of the argument is YAGNI... unless it is alreay planned that the stored proc code be moved to a proper business layer you could just be adding layers to a system that was not designed to receive them. In other words the app will end up having a placeholder, with all the added complexity this might entail, that will never really be used.