Announcement Announcement Module
No announcement yet.
How long list should be handled Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • How long list should be handled


    In iBatis there is a PaginatedList that permits to split a long query in chunk. From reading the code it doesn't seem very optimized (it ignores already read records before reading next pageSize).

    How should I handle long list in a 3 tiers, rich client architecture. Using List all over the place can cause memory exhaustion not talking about performance degradations?



  • #2
    It depends on you

    In my current project we have defined a Page class that implements the List interface and add some pagination information. Our daos can return Page or List of Objects based on the same criteria.

    I think it would be better to always return List and to do pagination behind the scene with a kind of callback. I think this is a little bit tricky because your transaction can be closed between two calls. I am working with hibernate and cannot managed to do that easily with it.

    I think the solution you choose is a matter of taste.