WHIRLYCOTT wrote:

I was thinking about this some more on the way to work today, but before I offer up the idea I had, I will first re-iterate that this is probably a bad solution to whatever you are trying to do.

(If you can't fit all the data in memory, what do you expect a web browser to do with it? Concurrent requests?)

Anyway, you are right about the lack of clean separation between your MVC layers. Ideally, you would just pass the data in the request scope from your M to your C to your V. However, you've already pointed out that it's too big. To that, we all suggested an Iterator. And you've rightly poined out that you can't really pass an Iterator into your view, because the broker handling the underlying Connection will likely be closed at that point.


I guess it depends on what the receiver does with the data.

If the items are simply displayed (e.g. search results), then the 'normal' way of presenting the data is to use paging which likewise can be used in the db layer. E.g. you request objects 100-140 and get only those (which speeds up the db access too btw. because only those 40 items are fetched).

If all items have to be processed prior to showing something (e.g. for a report), then you should do that on the server (using the mentioned iterator approach) and only supply the preprocessed data to the view (e.g. the sums etc. of the report).

Tom


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to