M
Mike Hennessy
I'm looking for people's opinions and feedback regarding the design of the
application tier, and how to best logically separate out the Data Access
from the Business Object's. Per the Microsoft prescriptive architecture
documents, they recommend creating a completely separate logical Data Access
Tier of components. Then creating a separate tier of Business Objects that
consume them.
My first question is...what does this actually buy you in the real world?
Ok, if you need to in the future totally re-write your Data access to a new
Database server like Oracle or DB2, I can see separating out the code.
However, in the scenario where you know you will be writing to a single DB
server...what else does this approach buy you? You'll be running the BO and
DAC on the same physical server anyway. Also, adding that new tier
inherently add's to the complexity of your solution...you now pretty much
double the amount of classes, with each BO having a corresponding DAC
component. Is there other pros to this approach? As opposed to having a
single BO that contains your DAC methods directly?
The next question is, say that you do choose to have a separate DAC tier.
Now..when creating your assemblies, how do people recommend breaking out the
code as far as projects and solutions? For example, I have seen solutions
which create a separate DAC project and put a majority of their DAC classes
in there. This creates a physical assembly which now needs to be accessed
from the BO. Doesn't this impose an unnecessary performance penalty?
The other option is to creat separate projects based on core functionality
and include both the BO and DA classes in that single project. They then get
deployed as a single assembly and you remove the overhead of separate
assemblies.
Is there a best practice here? What's the pros/cons that people see?
Thanks for your feedback!
application tier, and how to best logically separate out the Data Access
from the Business Object's. Per the Microsoft prescriptive architecture
documents, they recommend creating a completely separate logical Data Access
Tier of components. Then creating a separate tier of Business Objects that
consume them.
My first question is...what does this actually buy you in the real world?
Ok, if you need to in the future totally re-write your Data access to a new
Database server like Oracle or DB2, I can see separating out the code.
However, in the scenario where you know you will be writing to a single DB
server...what else does this approach buy you? You'll be running the BO and
DAC on the same physical server anyway. Also, adding that new tier
inherently add's to the complexity of your solution...you now pretty much
double the amount of classes, with each BO having a corresponding DAC
component. Is there other pros to this approach? As opposed to having a
single BO that contains your DAC methods directly?
The next question is, say that you do choose to have a separate DAC tier.
Now..when creating your assemblies, how do people recommend breaking out the
code as far as projects and solutions? For example, I have seen solutions
which create a separate DAC project and put a majority of their DAC classes
in there. This creates a physical assembly which now needs to be accessed
from the BO. Doesn't this impose an unnecessary performance penalty?
The other option is to creat separate projects based on core functionality
and include both the BO and DA classes in that single project. They then get
deployed as a single assembly and you remove the overhead of separate
assemblies.
Is there a best practice here? What's the pros/cons that people see?
Thanks for your feedback!