Sergey Beryozkin-5 wrote:
>
> Hi
>
> On Fri, Apr 29, 2011 at 12:07 AM, cogitate <[email protected]>
> wrote:
>> hi sergei :
>> i am thinking more in terms of
>> 1. RESTfulie =>
>> https://github.com/caelum/restfulie
>> http://restfulie.caelum.com.br/
>> yes which basically supports "links" with every entity or model.
>>
>
> Can you elaborate a bit more about your requirements ?
> Is it about the client runtime following the links ? Is it about
> making sure links are added at the moment resource representations are
> returned ?
>
> thanks, Sergey
>
yes - having client runtime follow links. as well as server side producing
appropriate links for a resource. it should be possible to have this with
some kind of annotation/configuration support.
the key is how to seamlessly integrate this with "controllers/entities" w/o
polluting them with "resource links".
Restfulie has a way to do that but miss some of the powerful features of CXF
like interceptors for outgoing and incoming messages of any type is missing.
here's what restfulie has :
so let's say a basket controller has a list method that supports items
each controller constructs a "Restfulie restfulie" object and a "Result
result" object and relations for a
resource akin to code below.
@Get
@Path("/items")
public void list() {
ConfigurableHypermediaResource resource =
restfulie.enhance(database.list());
resource.relation("basket").uses(BasketsController.class).create(null);
result.use(representation()).from(resource, "items").serialize();
}
this gets translated as when items are returned - i use the particular
hypermedia resource to give links out and represent them to my result.
restfulie also provides nice wrapper methods around http header return
values like "404 NOT found" is represented w/ "return result.notFound()"
regards
--
View this message in context:
http://cxf.547215.n5.nabble.com/CXF-with-HATEOS-or-hypermedia-tp4347138p4361446.html
Sent from the cxf-user mailing list archive at Nabble.com.