n-tier design with "adapter" layer - keepin business layer clean...

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi -
(not really a C# question -...apologies)

I seem to have gravitated towards a particlar design pattern - and
would welcome your opinions as to it's sanity - thanks...

The basic idea is that - in an effort to keen the Business Classes as
clean as possible - I have *totally* excluded any data load/
persistance code.

In my model a Data Adapter is used to load/persist the Business
objects eg:

Customer c = Adapter.LoadCustomer(id);

or

Customer c = new Customer(id);
Adapter.Hydrate(c);

Basically the Adapter acts as a bridge between Business and Data
aspects.

The UI gets nice Business Objects to work with, the Data Access Layer
returns only built in types (eg Dataset) and the Adapter marries the
two.

here's a piccie of my architecture:

UI
|
| --------------|
Bus Adapter
|
Data Access
|
Data Source

I don't think I've invented this myself - but googling only turned up
models where the following might be done:

Customer c = new Customer(id);
c.Load();

comments appreciated !

O.
.



Relevant Pages

  • Re: OOP/OOD Philosophy
    ... between database logic and "business" logic. ... this would not longer be "business" ... tomorrow be regarded as low-level data access logic. ...
    (comp.object)
  • Re: n-tier design with "adapter" layer - keepin business layer clean...
    ... That's the best design in terms of flexibility really because it allows you to separate concer... ... In my model a Data Adapter is used to load/persist the Business ... Customer c = Adapter.LoadCustomer; ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: What problems are people in the MV world trying to solve
    ... This is a combination of business and technical. ... system is centered around a customer account and the ID assigned to it so ... contact files by account ID. ... The sales analysis system only ...
    (comp.databases.pick)
  • Re: My Frustrations
    ... Again, this is not an issue of communication, or geeks versus business men. ... This is not an issue of proving or demonstrating the quality of ones self or service. ... This is an issue of enabling the customer to make the right decision. ... landing the customer in a very poor security state, ...
    (Pen-Test)
  • Re: Ms Access 2003
    ... "I'd like to pay less than $150 for this project." ... One would expect that for such a low price as ... though there's no add-ons to increase profits, increase the customer base, ... a small business which employs five consultants. ...
    (comp.databases.ms-access)