Time |
S |
Nick |
Message |
00:50 |
|
|
Mxyzpltk_ joined #rest |
02:09 |
|
|
Mxyzpltk_ joined #rest |
02:50 |
|
|
ybit joined #rest |
02:50 |
|
ybit |
oh cool |
02:50 |
|
ybit |
glad to see this channel is a thing :) |
02:50 |
|
ybit |
i've a question for everyone here |
02:50 |
|
ybit |
say you have a resource, and that resource has associated with it several other resources |
02:51 |
|
ybit |
which is better to do |
02:51 |
|
ybit |
{name: "foo", stuff: "http://api.example.com/stuff/343439"} |
02:51 |
|
ybit |
or |
02:51 |
|
ybit |
{name: "foo", stuff: [{name: bar, baz: "quz"} ... ]} |
02:51 |
|
ybit |
i kind of feel that the first one is more in tune with HATEOS |
02:52 |
|
ybit |
hateoas rather |
02:52 |
|
ybit |
i would love to hear some opinions on this |
02:54 |
|
pdurbin |
so in the first example the several other resources can be found by following the link |
02:56 |
|
ybit |
pdurbin: that is correct |
02:57 |
|
pdurbin |
and the second example has no links |
03:00 |
|
ybit |
pdurbin: well.. |
03:00 |
|
ybit |
there will be links for both |
03:02 |
|
ybit |
_links: {self: { title: "foo", href: "api.example.com/place/34334"}, parent: {... }}, {_items: { ... long list } } |
03:02 |
|
ybit |
that's the second example redone |
03:03 |
|
ybit |
rather.. {_meta: {}, _links: {self: { title: "foo", href: "api.example.com/place/34334"}, parent: {... }}, {_items: { ... long list } }} |
03:03 |
|
ybit |
vs |
03:04 |
|
ybit |
{_meta: {}, _links: {self: { title: "foo", href: "api.example.com/place/34334"}, parent: {... }, items: "http://api.example.com/stuff/34343" }} |
03:05 |
|
ybit |
i guess now that i put it like this.. |
03:05 |
|
ybit |
well... still not sure |
03:09 |
|
pdurbin |
do you see examples of both out there? in various APIs |
03:13 |
|
ybit |
pdurbin: yeah |
03:14 |
|
ybit |
maybe the curlies are confusing everyone |
03:14 |
|
ybit |
it's easier to keep track of curlies when you can put them on more than one line :) |
03:14 |
|
pdurbin |
yeah, pretty printed in a gist would be easier on the eyes |
03:14 |
|
ybit |
in the first _links contains self, parent and items |
03:14 |
|
ybit |
in the second, _links only contains title and aprent |
03:14 |
|
ybit |
_items should be at the same level as _meta and _links |
03:15 |
|
ybit |
..in the second |
03:15 |
|
|
systmkor joined #rest |
03:16 |
|
ybit |
/win 13 |
04:09 |
|
fumanchu |
ybit: embed the attributes the user/agent needs to select the right one(s) from the list. put all the other attributes across a link. In almost every case, the former are more properly attributes of the collection because they categorize the entity in that collection, rather than attributes of the entity itself. |
04:09 |
|
|
Mxyzpltk_ joined #rest |
04:11 |
|
|
systmkor1 joined #rest |
04:44 |
|
|
systmkor2 joined #rest |
05:41 |
|
|
lemur joined #rest |
05:42 |
|
lemur |
So I'm getting increasingly curious about something. Anyone care for a muse trip on APIs? |
05:43 |
|
lemur |
SOA is becoming more and more popular as a means of distributing application concerns, and with it the need to define clients. |
05:44 |
|
lemur |
A RESTful API is easy to predict in nature, and if there's a manifest request that can be made to get the sites schema layout, you can effectively define the entire clients connection logic |
05:45 |
|
lemur |
So effectively I'm musing on taking say a Rails API and having its manifest used to automatically generate the hooks for Angular, iOS, Droid, and any other framework at request. |
05:46 |
|
lemur |
Does this seem feasible? It just seems like so much of this is just straight boilerplate code that could be abstracted out. |
05:49 |
|
|
ramsey joined #rest |
06:10 |
|
|
Mxyzpltk_ joined #rest |
06:38 |
|
|
_ollie joined #rest |
06:51 |
|
|
rosstuck joined #rest |
07:30 |
|
|
_ollie left #rest |
07:30 |
|
|
_ollie joined #rest |
08:10 |
|
|
graste joined #rest |
08:11 |
|
|
Mxyzpltk_ joined #rest |
08:43 |
|
|
proteusguy joined #rest |
08:43 |
|
|
martinfilliau joined #rest |
08:51 |
|
|
interop_madness joined #rest |
09:08 |
|
|
proteusguy joined #rest |
09:16 |
|
|
interop_madness joined #rest |
09:33 |
|
|
Left_Turn joined #rest |
10:12 |
|
|
Mxyzpltk_ joined #rest |
10:27 |
|
|
shrink0r joined #rest |
10:37 |
|
|
_ollie joined #rest |
10:50 |
|
pdurbin |
lemur: give it a try! |
10:59 |
|
|
Andre-B joined #rest |
12:10 |
|
|
rosstuck joined #rest |
12:13 |
|
|
Mxyzpltk_ joined #rest |
12:50 |
|
Andre-B |
just saved $65 buying this video http://player.oreilly.com/videos/9781491900130 with coupon code: WCYAZ |
13:39 |
|
|
Mxyzpltk_ joined #rest |
13:39 |
|
|
foist joined #rest |
14:10 |
|
|
saml joined #rest |
14:44 |
|
|
fumanchu joined #rest |
16:00 |
|
|
Mxyzpltk joined #rest |
16:02 |
|
|
shrink0r1 joined #rest |
16:14 |
|
ybit |
thanks for the feedback pdurbin and fumanchu |
16:22 |
|
|
Mxyzpltk joined #rest |
16:27 |
|
Andre-B |
there’s a live stream right now on http://www.apistrategyconference.com/2014Chicago/index.php |
16:27 |
|
Andre-B |
in case you missed it. they have a break right now |
16:50 |
|
|
ph88_ joined #rest |
17:18 |
|
|
foist joined #rest |
17:27 |
|
Mxyzpltk |
thanks, watching |
17:44 |
|
pdurbin |
oh sure |
17:51 |
|
|
Left_Turn joined #rest |
17:54 |
|
|
systmkor joined #rest |
17:55 |
|
Andre-B |
I hope that they’ll put up the recordings later online |
19:06 |
|
|
shrink0r joined #rest |
19:15 |
|
|
graste joined #rest |
19:30 |
|
|
shrink0r joined #rest |
19:35 |
|
|
graste joined #rest |
19:46 |
|
|
systmkor1 joined #rest |
20:52 |
|
|
systmkor joined #rest |
21:12 |
|
|
shrink0r joined #rest |
21:14 |
|
ybit |
yet another question |
21:15 |
|
ybit |
when creating a resource, which should you prefer, numbers for ids or hex strings? |
21:15 |
|
ybit |
1 vs 5424593c4d04c1dce0fd157d |
21:16 |
|
ybit |
api.example.com/resource/5424593c4d04c1dce0fd157d seems a bit much, but most likely i won't have two duplicate inserts |
21:16 |
|
ybit |
s/two// |
21:42 |
|
|
tr3online joined #rest |
21:53 |
|
|
begriffs joined #rest |
21:55 |
|
|
begriffs_ joined #rest |
22:02 |
|
whartung |
not really germance ybit -- computers really don't care what the ID is. Long ids like that I end up cut and pasting anywhere I need to use them, so, as long as they're "double click" friendly (i.e. I double click on the id, and I get all, and only, the ID), I'm content |
22:04 |
|
whartung |
*germane |
22:06 |
|
|
begriffs joined #rest |
22:08 |
|
|
_ollie joined #rest |
22:09 |
|
|
begriffs joined #rest |
22:36 |
|
|
begriffs joined #rest |
22:46 |
|
|
begriffs joined #rest |
23:10 |
|
|
begriffs joined #rest |
23:28 |
|
|
begriffs joined #rest |
23:48 |
|
|
begriffs joined #rest |