Yes, it will work for view models too.


On 11 November 2015 at 15:32, Cesar Lugo <cesar.l...@sisorg.com.mx> wrote:

> Just looked into it, it looks like a very helpful feature to significantly
> simplify and improve client requests. Would this work also for ViewModels?
>
> Cesar.
>
> -----Original Message-----
> From: Willie Loyd Tandingan [mailto:tandingan....@gmail.com]
> Sent: Wednesday, November 11, 2015 8:44 AM
> To: users@isis.apache.org
> Subject: Re: Restful objects list action result with domain object
> representation instead of links
>
> Hey Dan,
>
> I just tried it and works great for domain object, properties, collections!
>
> Is it possible to extend it also for action results? Our use case involves
> search actions (with keywords, or all) returning lists that need to be
> displayed in a grid.
>
>
> Many thanks,
> Willie
>
> On Tue, Nov 10, 2015 at 2:26 AM, Dan Haywood <d...@haywood-associates.co.uk
> >
> wrote:
>
> > Hi Willie,
> >
> > Edit:this was in my drafts, forgot to send! Don't think it says
> > anything you didn't work out already...
> >
> > just following up, I've got the x-ro-follow-links stuff working to
> > support the eager loading of either collections, or of parent
> > references; ie
> > ISIS-1232 and ISIS-1233.  My original plan for x-ro-follow-links was
> > to make it fully generic, but that's a lot of testing without
> > necessarily any real use case.  So I think I'm going to descope it
> > just to support your use cases.
> >
> > To explain how to use this feature I've recorded a screencast [1]
> > which uses the kitchensink app [2]
> >
> > If you want to try this out, you'll need to checkout the ISIS-1232
> > branch and build locally.
> >
> > Feedback welcome!
> >
> > Thx
> > Dan
> >
> > [1] https://youtu.be/hSKnqqBQ7Zo
> > [2] https://github.com/isisaddons/isis-app-kitchensink
> > Hi Willie,
> >
> > I admit I haven't thought about any of this too much over and above
> > what's in the spec (that I wrote a *long* time ago).  I just wanted to
> > commit myself mentally to doing this stuff soon.
> >
> > I know that some of this stuff has been implemented on Naked
> > Objects.NET, so I will check with those guys (Richard and Stef) to see
> how they did it.
> >
> > But if you have ideas, please feel free to comment on the tickets raised.
> >
> > Thx
> > Dan
> >
> >
> >
> > On 4 November 2015 at 16:57, Willie Loyd Tandingan <
> > tandingan....@gmail.com>
> > wrote:
> >
> > > That's great to hear!
> > >
> > > I'm pretty curious on how x-ro-sort-by, x-ro-page, and
> > > x-ro-page-size
> > will
> > > be implemented. Will these parameters be acquired from a request
> > > scoped service or something like an action invocation context? How
> > > about the properties for the paged collection e.g. total number of
> > > records, page number, size, etc.?
> > >
> > > On Tue, Nov 3, 2015 at 8:31 AM, Dan Haywood <
> > d...@haywood-associates.co.uk>
> > > wrote:
> > >
> > > > I've raised ISIS-1232, ISIS-1233, ISIS-1234 and ISIS-1235 for these.
> > > I'll
> > > > aim to implement the first two (x-ro-follow-links, table grids) in
> > > 1.11.0.
> > > >
> > > > Thx
> > > > Dan
> > > >
> > > > https://issues.apache.org/jira/browse/ISIS-1232
> > > > https://issues.apache.org/jira/browse/ISIS-1233
> > > > https://issues.apache.org/jira/browse/ISIS-1234
> > > > https://issues.apache.org/jira/browse/ISIS-1235
> > > >
> > > >
> > > > On 15 October 2015 at 22:26, Dan Haywood
> > > > <d...@haywood-associates.co.uk
> > >
> > > > wrote:
> > > >
> > > > > OK, I can focus on those sections, as and when I get the chance.
> > > > >
> > > > > IIRC, I did implement some of the x-ro-follow-links stuff, but
> > > > > it
> > must
> > > > > have been over 2 years ago, so I forget the details as to how to
> > > > > make
> > > it
> > > > > work exactly.  Some slightly odd xpath-like syntax, I think.
> > > > >
> > > > > Thx
> > > > > Dan
> > > > >
> > > > > On 14 October 2015 at 19:29, Willie Loyd Tandingan <
> > > > > tandingan....@gmail.com> wrote:
> > > > >
> > > > >> Hello Dan,
> > > > >>
> > > > >> The short answer is no.  I'm not averse to enhancing this with
> > > > extensions
> > > > >> > as they make sense.
> > > > >> >
> > > > >> > But the longer answer is that there a couple of SPI services
> > > > >> > that
> > > > allow
> > > > >> you
> > > > >> > to customize the representations, [1], [2].  The default RO
> > > > >> representations
> > > > >> > are performed by an implementation of [1].
> > > > >> >
> > > > >> > Eventually I'm thinking that Isis might provide
> > > > >> > out-of-the-box implementations for HAL, Collection+JSON,
> > > > >> > Siren etc... but you
> > might
> > > > >> find
> > > > >> > that your client-side (Javascript?) widget UI libraries work
> > > > >> > best
> > > with
> > > > >> some
> > > > >> > other more "adhoc" representations.
> > > > >> >
> > > > >> > What these SPI services *don't* allow is for the resources
> > > > >> > defined
> > > by
> > > > RO
> > > > >> > (or their input JSON) to change.  I don't see any particular
> > > > >> > need
> > to
> > > > >> > customize this, though.
> > > > >> >
> > > > >>
> > > > >> I think I saw ContentMappingService being used in ToDoApp.
> > > > >> Using
> > those
> > > > >> SPIs
> > > > >> would work, however while going through the Spiro framework as
> > > discussed
> > > > >> in
> > > > >> the other thread, I saw interesting additional sections in the
> > > > >> RO
> > spec
> > > > >> v1.1.0 about:
> > > > >>
> > > > >> 34.4 Minimizing Round-trips (x-ro-follow-links)
> > > > >> 34.9 Minimizing Round-trips by supporting table grids
> > > > >>
> > > > >> I had skimmed through RO v1.0.0 before and afaik, those weren't
> > there
> > > > yet.
> > > > >> Those sections, especially 34.9, addresses our need.
> > > > >>
> > > > >> 34.2 Sorting (x-ro-sort-by) and 34.3 Pagination (x-ro-page,
> > > > >> x-ro-page-size)
> > > > >> are also nice to haves.
> > > > >>
> > > > >
> > > > >
> > > >
> > >
> >
>
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
>

Reply via email to