PC Review


Reply
Thread Tools Rate Thread

Application Design idea.

 
 
DotNet
Guest
Posts: n/a
 
      12th Dec 2003
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


 
Reply With Quote
 
 
 
 
solex
Guest
Posts: n/a
 
      12th Dec 2003
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
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Database Design Idea Gina Whipp Microsoft Access Database Table Design 13 29th Jul 2009 02:02 PM
Re: Database Design Idea Keith Wilby Microsoft Access Database Table Design 1 22nd Jul 2009 04:51 PM
RE: Database Design Idea NG Microsoft Access Database Table Design 0 22nd Jul 2009 04:10 PM
Is this a viable design idea? Tosch Microsoft Dot NET 4 30th Jul 2004 10:55 AM
Re: Design Idea for online help Ken Cox [Microsoft MVP] Microsoft ASP .NET 0 17th Sep 2003 02:25 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:48 AM.