I've finally finished my Data Access Layer using a custom code generator that also creates the stored procedures the code will use to access the underlying data in my MS SQL Server database and. As tempting as it is to just use the DAL directly, I've read you should use a Business Logic Layer to communicate with the DAL. While there is a wealth of information on the net about creating DALs I haven't been able to find much info on business logic layers. I have a few questions.
Suppose I'm trying to retrieve a customer's information. I have a customer table and relationships to the sales order, sales invoices, and contacts tables (just to name a few). The DAL can get one record from a specific table using the primary ID # (customers_Record.GetRecord(inIDNumber)) and I also wrote it to allow me to retrieve related records in linked tables (customers_Record.Getsalesorders() - like the three listed above). In the BLL should I retrieve all the related sales orders, sales invoices, contacts, etc., or should that be independent of the business logic layer and the presentation layer will retrieve that information? If it shouldn't be part of the BLL, what exactly should be in the BLL? Thanks in advance. I hope I was clear enough with my question.
Suppose I'm trying to retrieve a customer's information. I have a customer table and relationships to the sales order, sales invoices, and contacts tables (just to name a few). The DAL can get one record from a specific table using the primary ID # (customers_Record.GetRecord(inIDNumber)) and I also wrote it to allow me to retrieve related records in linked tables (customers_Record.Getsalesorders() - like the three listed above). In the BLL should I retrieve all the related sales orders, sales invoices, contacts, etc., or should that be independent of the business logic layer and the presentation layer will retrieve that information? If it shouldn't be part of the BLL, what exactly should be in the BLL? Thanks in advance. I hope I was clear enough with my question.