Application Design idea.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DotNet

    #1

    Application Design idea.

    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.(publ ic 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


  • solex

    #2
    Re: Application Design idea.

    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" <paul@eorganism .com> wrote in message
    news:eMFUr%23Mw DHA.560@TK2MSFT NGP11.phx.gbl.. .[color=blue]
    > hi
    > I am currently developing an Access DB driven windows application in c#.[/color]
    I[color=blue]
    > 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[/color]
    read[color=blue]
    > database and return an arraylist of customers.(publ ic ArrayList
    > GetAllCustomers () which return an arraylist of customer objects.) OR[/color]
    (public[color=blue]
    > 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[/color]
    in[color=blue]
    > 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
    >
    >[/color]


    Comment

    Working...