O
oliharvey
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.
(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.