Hi Sharon,
The three-layered architecture that you are using, when coded properly, allows
you to swap out one GUI with another, or change the location of your database,
or even its design, or add/modify/remove existing business rules in the API,
all independently of one another.
Your goal should be to optimize the coupling between dependant objects in
adjacent layers and ensure that you use flexible enough design patterns to
meet the needs of your application, which may help to make change control
easier as well.
If you feel that the current architecture isn't flexible enough, and can state
specific reasons why, then I'd recommend looking into other patterns to use in
conjunction with the layered approach that you have in place already.
An example of one such pattern is the ASP.NET 2.0 provider pattern (which
works quite well in WinForms apps too). This pattern provides a flexible,
pluggable architecture that you can use in your own object models to extend or
modify the ability of your application at a later time. If you feel that you
might need to modify API logic, or switch data storage contexts in the future,
or quite often now, then the provider pattern might be of use to you. The
abstract factory pattern in addition to the provider pattern provides an
extremely flexible framework for your object models. It's also highly
configurable through the web.config or [app].config files, with FCL support
for the base functionality of the provider infrastructure and simple
configuration handling.
Here's a list of some basic design patterns that you might find useful:
ASP.NET Provider Toolkit on MSDN:
http://msdn2.microsoft.com/en-us/asp.net/aa336558.aspx
Gang of Four (GOF) Patterns:
http://www.dofactory.com/Patterns/Patterns.aspx
There are many other references out there - just do some searching :)
--
Dave Sexton
"Sharon" <no*****@null.voidwrote in message
news:e0****************@TK2MSFTNGP04.phx.gbl...
Hi.
I'm working on an application with a Data Access Layer, API and UI.
There are some entity classes defined in the DAL which the UI uses through
the API.
This means that there is some coupling between the DAL and the UI.
Is it possible or advisable to separate the DAL completely from the UI?
How can i achieve this?
Thanks,
Sharon.