Hi all,
I have built a data access layer (DAL) and trying built a business logic layer (BLL). BLL will access DAL which in turn accesses the data layer (Database).
My question is that which is a better approach from the following?:
1. Have a property on the BLL class to maintain a reference to DAL. This reference will be used by methods when BLL communicates with the database.
2 Or pass DAL reference as a parameter to each public method that needs it.
Any pros or cons?
Any comments or suggestions or experience will be greatly appreciated!
TIA
Dawa Tsering
"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."
- Ephesians 4:29-30 NIV
Dare to Question -- Care to Answer
Time is like water in a sponge, as long as you are willing you can always squeeze some.
--Lu Xun, Father of Modern Chinese Literature