Re: Re: Pagination and sort design in ddd

Dan Haywood <[email protected]>
Newsgroups gmane.comp.programming.domain-driven-design
Message-ID <CALJOYLHb0ECd09Vh9iCcSXY3FdUQay=bAsMmajQ3rCSQg8-e0w@mail.gmail.com>
With both 2 and 4, the metadata is read and used by a framework responsible
for the UI layer, which reflectively calls the  repository methods.

(2) is accomplished fairly trivially because the framework in this case
runs on .NET and returns an IQueryable, the framework basically just
updates the returned IQueryable with the metadata.

(4) is the way things work on the Java framework; the repository returns
the entire collection and the UI layer handles the paging using said
metadata.

Dan


On 18 April 2013 11:42, raymond_kolbe <[email protected]> wrote:

> If 4, how are you using metadata to accomplish this, if the whole
> collection is being returned?
>
> --- In [email protected], Dan Haywood <dan@...> wrote:
> >
> > Both 2 (ideally) but also 4, with metadata to indicate the page size.
> >
> >
> > On 17 April 2013 14:51, raymond_kolbe <rkolbe@...> wrote:
> > >
> > > 1) Return a *Query Object*
> > >
> > > 2) Return a *Lazy Collection*
> > >
> > > 3) Return a *Paged Result* obj.
> > >
> > > 4) Return a full *Collection* and rely on caching on the client side.
> > >
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.