incubator-isis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Haywood <...@haywood-associates.co.uk>
Subject Re: Action result types in RestfulObjects (json) viewer
Date Mon, 16 Jul 2012 07:42:46 GMT
On 16 July 2012 07:22, Adam Howard <howard.adam@gmail.com> wrote:

>
> I was looking in a few different places and noticed some
> inconsistencies that I wanted to ask about.
>
> The action result representation has a resultType property. In the
> 1.0.0 spec that allowed values are "object", "list", "scalar", and
> "void".
>
> In the latest Isis code the ActionResultRepresentation.ResultType enum
> has the following values:
>
> DOMAIN_OBJECT("domainobject"), LIST("list"),
> SCALAR_VALUE("scalarvalue"), VOID("void");
>
> So "domainobject" and "scalarvalue" are different. This could be based
> on allowed values from the 0.52 spec. The oldest copy I have is 0.69.0
> and it has the same allowed values as 1.0.0.
>

I have all the older versions if you want.  In fact, 0.52 is zipped up here
[1] along with the very first versions of the spec.



>
> But...looking at the code in the jqMobile demo I see that the
> handleActionResultRepresentation function in generic.js checks for
> values of "object" and "list". How does this work? Does the demo not
> have any actions that return a single object?
>

I suspect that's true, yes.  It's only half completed, just as a
demonstrator that JS apps could be written against the RO API.   And, in
fact, it doesn't yet provide the mechanism to invoke object actions, merely
to browse between objects.  (The first page that lists all todo items is
hard-coded).



> Whatever the case it looks like an easy fix to update the enum.
> However, making this change (and any others to resolve ISIS-233) will
> temporarily leave the viewer in a "between spec versions" state where
> there is a little bit of 0.52 and a little bit of 1.0.0. Is this a
> concern? Is releasing 0.3.1-incubating dependent on completing
> ISIS-233?
>

One of the benefits of having a small community is that no-one's beating
our door down to get 0.3.1-incubating released.  So, yes, in my opinion we
should complete ISIS-233 before 0.3.1-incubating is released.

As you've seen, I'm also working on ISIS-14 (the JDO object store); I want
this piece of work to be complete too.

What I suggest is that you go ahead and make the changes to the
restfulobjects-viewer as need be, in whatever order works.  Hopefully
before too long that'll end up taking it to v1.0.0 anyway.  But if you
don't have that amount of time or get sidetracked, then I'll chip in to
complete the work before we release 0.3.1-incubating.

Dan



>
> Thanks.
> --
> Adam
>

[1]
https://dl.dropbox.com/u/10536589/restful-spec-archives-%280.10-0.58%29.zip

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message