The true advantage of a rich client is it's ability to handle these kinds of tasks without having to burden the server so by all means, do the sort on the client.
As for which part of an MVC framework should do the work (your question implied you are using MVC... right?), I think it could be debated but I would think the View would be the appropriate place to do the sort if the sort is just for the benefit of the end user. In other words if you are sorting items i a table to make it easier for the user to see the contents then I would think this is just another interpretation of the data and therefore should be left to the View. Nested collections of data is another issue but again i would think everything about how that data is represented should be handled by the View. Jamie On Dec 25, 2007 5:10 PM, Kevin <[EMAIL PROTECTED]> wrote: > > > > > > > I am wondering what the best practice is for sorting nesting > collections in data managed or remote objects? > > Sort on the server? It is not hard for us to create SortedSet's (via > Java) on the server objects and then send those back. The only > problem we have run into with this is that it seems that the sort > order is not updated when new objects are persisted via Flex. For > example, the initial fill comes in sorted, however when we then use > addItem to a data managed, nested collection, the object is persisted > in the database, but the full set is not returned to flex and thus > the new sort order is not updated. It seems that because of this > there is no reason to do any sorting on the server except for objects > that are not data managed. Does this make sense? > > Sort on the client? It is easy enough to add sorts to > ListCollections. however when the ListCollections are nested inside > other objects where is the best place to add these sorts? In the > constructor of the value object? In the view which binds it? In some > collection listener? With the simplicity of data binding it seems > that there is no great place to add a default sort to a collection. > Am I missing something obvious? > > Sort in the destination config? Is there a way to add a default sort > to a data-management-config destination? It seems like this might be > an appropriate place to add a default sort declaration... > > I would love to hear how others have addressed this situation? > > Happy Holidays, Kevin >

