I ran into a design issue regarding the design of my DAL. As we all know, in its most basic definition, DAL means a layer that is responsible for communicating with some data warehouse (of course, I'm not talking about a repository template), usually a database. Now this is where the catch is. Some of our business objects will need to get their data from the database, and some of them will receive data from other sources, i.e. Web services. Some of our team members suggested that BO should be smart enough, knowing whether to call DAL (who knows only to talk to the database) or call the required web service. Others suggested that this may not be the optimal solution, assuming that everything should go through the DAL, where it will contain valid adapters or something else for each data extraction method.
How would you create a system with such data access needs? Is any of the proposed solutions good enough for the long-term (the second may take longer to develop) or do we need to take a completely different approach? Perhaps there is a design template that is suitable for this kind of problem ...
Thank you Avi Shilon
Avi
source share