Design Factors 10: What are the mapping criteria for BLL classes and CRUD methods?

BLL classes can be defined with respect to physical or logical business entities, DAL classes, as vice versa. This mapping process can include one to one, one to many or many to many technique.

For example, we have two business entities (physical or logical), named “Order Summery” and “Order Items” for an e-commerce application. Having a one-to-many mapping relation with BLL and DAL in class level can contain one separate BLL class, as “OrderBLL”, and two separate two separate DAL classes, as “OrderSummeryDAL” and “OrderItemsDAL”. The “CreateOrder” method of the “OrderBLL” class can call the “CreateOrderSummery” and “CreateOrderItem” method of “OrderSummeryDAL” and “OrderItemsDAL” respectively to complete the entire database create operation for a whole order, as shown in the figure below.

clip_image002

Figure The class level one-to-many mapping process between DAL and BLL

Even having a one-to-one relation with BLL and DAL classes can include a one-to-many relation in method level. For example we have one BLL class “OrderBLL” and one DAL class “OrderDAL”. Having a one-to-many relation in method level, will include a “Create” method in OrderBLL which basically calls the “CreateOrderSummery” and “CreateOrderItem” methods, as shown in the figure below.

clip_image004

Figure The method level one-to-many mapping process between DAL and BLL

The appropriate design issues needs to be defined at this point.

Technorati Tags: ,,

Print | posted on Sunday, April 20, 2008 1:27 PM

Comments on this post

No comments posted yet.

Your comment:

 (will show your gravatar)
 
Please add 5 and 7 and type the answer here: