Let me explain why the deliberations on the DAL are taking me some time to get through. This is what keeps going around in my head when I think about the structure of the DAL.
If I build the DAL as a web service, it will be globally accessible in a (programming) language neutral way and will support re-use and loose coupling. Great. However, it could end up being too complicated and slow and in addition multiple BL services would then depend on ONE service which sort of defeats the object of SOA (in a pure SOA architecture the services are independent).
So, should I pursue a pure SOA architecture and split the database into several (smaller) databases, one for each BL service and then have each BL service have its own Data Access logic? Surely this will lead to code duplication?
So then I head this way:
I should forego the pure SOA architecture and create a single data access DLL (the DAL) that would be referenced by each BL service. That way I would not have any duplication of Data Access code and given that there is a single database then any change in the database or DAL would result in a change to just the DAL (and maybe a BL service that required it). My BL would be decoupled from the database.
However, the same arguments could be said for making the DAL a service and not a DLL – each BL service would reference the DAL service (instead of a DLL). Equally, a single DAL DLL could end up being too complicated and slow.
And so round and around I go. I’m not normally this indecisive …
No comments:
Post a Comment