rave-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Franklin <m.ben.frank...@gmail.com>
Subject Re: CXF Rest + WS Data Model
Date Wed, 27 Mar 2013 17:16:10 GMT
On Thu, Mar 21, 2013 at 5:32 PM, Chris Geer <chris@cxtsoftware.com> wrote:
> I've done a first cut at adding some new CXF based REST web services which
> use a different data model

As part of RAVE-924, I have created a new page model for web.  As I
was building it, it occurred to me that there are a couple of
different ways we will want/need to use the REST interface for Page:

1) As an export mechanism
2) As an OMDL export mechanism
3) As an entry point for applications who want to render widgets
(including the portal)

IMO, #1 is straight forward.  For number 2, I was thinking that it
would be better if there was an OMDL mime type so the logical mapping
remains the same (/api/pages/{id}) as in the regular export.  What
does everyone think about using application/vnd.omdl+xml?

The hard part is how to deal with rendering.  For this "mode" we will
need to export the Wookie iFrame URL (which is per-user), the
openSocial security token and the OpenSocial metadata.  These require
a User to be authenticated and should not be exposed across things
like the OMDL or Page export.  What would everyone think about the
following url for this case?:  /api/pages/{id}?render=true

Since we want to be able to "bootstrap" the client MVC framework with
a pre-fetched & serialized version of the "Page" we will also need to
do the same translation between what is currently returned from the
service layer in both the server MVC and the REST API; which raises
the question as to wether or not we just abstract all of that
functionality in the service layer and only expose the "web" model
from that layer or do we create yet another layer to translate from
the current service to the web model?


View raw message