resthub / resthub-spring-stack

RESThub Spring stack
http://resthub.org/spring-stack.html
Other
121 stars 66 forks source link

Hypermedia or references support #45

Open ymazzer opened 12 years ago

ymazzer commented 12 years ago

Jersey allows the use of serialization by reference[1], which implies that we can have subpath like : http://my.url.ly/path/path_id/subpath/subpath_id

Is there a way to do that in Resthub despite Hades ?

[1] https://wikis.oracle.com/display/Jersey/Hypermedia+Examples#HypermediaExamples-SerializationByReference

sdeleuze commented 12 years ago

We should have a look to Spring HATOAS or Jackson 2 references support ...

sdeleuze commented 11 years ago

HAL support has been added to Spring HATEOS, seems to be interesting:

bclozel commented 11 years ago

Other resources:

manosbatsis commented 11 years ago

I tend to use urls like api/parent/{parentId}/children/{childID} to view collections, as well as add or remove to them. it would be nice to have conventions for those that make things easier in resthub, for example the urls could be mapped automatically somehow, with the end result to be pretty much the same as the "parent" level CRUD support already provided. Even a servlet filter could perhaps pickup the url patterns and FW a reguest to the right controller method build for the parent level crus, so to add a child it would end up actually posting to api/child.

Another thing to consider is using paths to filter collections or update a collection item property, e.g. api/parent/{parentId}/femaleChildren/{childID} to get the girls or add/remove from them with PUT/DELETE.

I would surely appreciate hearing from anyone's experience.

manosbatsis commented 11 years ago

Can someone please outline the changes required to utilize spring-hateoas in resthub-spring-stack? It seems to me this could be the basis for a resthub-backbone-stack that can handle arbitrary entities dynamically without being domain driven.

bclozel commented 11 years ago

jsonapi.org adds to the discussion...