First of all many thanks, resthub rocks in a just-feels-right kind of
way. I stumbled on it last week while trying to figure out the
plumbing involved in creating a generic service; i don't have
extensive experience with spring and couldn't figure out why nobody
was doing it. Bumped on resthub, messed around for half an hour, then
scraped all my code and just moved over my model classes and bits to
it overnight. I enjoyed it.
Right now I could use some hints on how to approach two issues the
right way to keep this up:
A) How to properly use Json views [1] or anything similar with
resthub, i.e. how do you folks approach the task of exposing different
subsets of an entity's members for different CRUD use-cases? For
example, consider an admin editing a subset of a user's profile VS the
same user editing his own "extended" profile.
Mostly concerned about the spring stack on this but wouldn't mind
pointers including backbone.js. It's pretty new for me but makes sense
nevertheless.
B) Any jsonp related app-wide magic specific to resthub i could tap
on? When i started with it a few days ago, i just threw a servlet
filter to add json padding to my controller responses. My intention
was to just hook those to some jquery client i was going to probably
painfully patch up, work on security stuff like tokens and so on.
However, after checking out the backbone.js stack i feel i'm missing
some big opportunity here. Sorry if this sounds stupid but is there a
way to make, for example, the "RESThub Backbone Stack tutorial" [2]
work over jsonp? Any non-obvious gems on this? The app i'm working on
is completely cross-domain so this would really be something.
[1]
http://wiki.fasterxml.com/JacksonJsonViews
[2]
http://resthub.org/backbone-stack.html#tutorial
Cheers,
Manos