Mr./Mrs. DotNet,
I have struggled with this problem and it turns out that I had to use
multiple tools for each job. If you have many interactions between your
"objects" then an object model is appropriate. In the cases were I needed
to return alot of data it (usually the case with reporting), I went
directly to the database using a DataReader. This approach gave me the best
response.
You could also return a series of proxy objects that have only the
information that is diplayed in the UI and then using a lazy load, fetch the
data from the database at the user requests.
Good Luck,
Dan
"DotNet" <(E-Mail Removed)> wrote in message
news:eMFUr%(E-Mail Removed)...
> hi
> I am currently developing an Access DB driven windows application in c#.
I
> need some help on design ideas. There are two ideas I am considering.
> 1. Use dataset.
> 2. Have a middle layer. Map each table in database as object(for example,
> Table customers would be mapped to Customer object). Use datareader to
read
> database and return an arraylist of customers.(public ArrayList
> GetAllCustomers() which return an arraylist of customer objects.) OR
(public
> bool UpdateCustomer(Customer cus) which takes a customer object).
> I am a java programmer before starting programming c#. I prefer the second
> OOP idea. However I have tested that an arraylist of 3000 customer object
in
> my application would boost memory usage from 800KB to 100MB and drag the
> performance down dramatically!!! Sometime I do need an arrayList of 3000
> customers for customer listing.
>
> Can anybody please point me at the right direction please?
>
> Thanks in advance
>
>
|