none
How do I refresh business object better? RRS feed

  • Question

  • Since we are programming in multi user environment, database content may not in sync with the loaded business object.

    The simplest way doing refresh is to create a new object, let it reload from database, and rebind it to the presentation. However, if the object is massive, say a huge list, and the data sits in a really remote location, a complete reload could kill performance, it's certainly not worthy for updating just a few rows .

    Are there any "smart" method to solve this? May be a "row refresh", I guess, but how to do it?

    Thanks in advance.

    Saturday, November 3, 2007 4:08 AM

All replies

  •  

    Maybe u can take a look at these DAL and ORM:

     

    - nhibernate

    - nettiers

    - microsoft enterprise library

     

    All pay attention to performance, caching, transaction, etc.

     

    Stefano Benedetti

    Saturday, November 3, 2007 7:50 AM
  • It is a trade off, either the data will be out of sync or you need to sycn the data constantly degrading performance. In your hypothetical scenario, regardless of if it is a huge list, the user can only see 10-20 items at a time...what would be the logic of trying to make sure the whole list is current.

    My suggestion is that, inform the user's that old data is just that..old data. First in wins and that if the user wants the peace of mind that the data is fresh, give them an option to refresh data manually.
    Saturday, November 3, 2007 10:45 PM
  •  OmegaMan wrote:
    It is a trade off, either the data will be out of sync or you need to sycn the data constantly degrading performance. In your hypothetical scenario, regardless of if it is a huge list, the user can only see 10-20 items at a time...what would be the logic of trying to make sure the whole list is current.


    Thanks for your time.

    Well, that means first of all, I have to page the data. However, sometimes data paging can be very complicated.

     

     OmegaMan wrote:

    My suggestion is that, inform the user's that old data is just that..old data. First in wins and that if the user wants the peace of mind that the data is fresh, give them an option to refresh data manually.


    Could you point me to some references or code samples, thanks.
    Monday, November 5, 2007 3:25 AM
  • > Could you point me to some references or code samples, thanks.

    Check out the very robust SQL project examples as found in the Starter Kits.

    Also there are 101 Samples for Visual Studio 2005 which is a robust, initial development tasks to more involved tasks for winforms, web development etc which may help you in other areas.

    Also out some of the VB/C# examples for the basic operations .

    Monday, November 5, 2007 2:20 PM