| Time |
S |
Nick |
Message |
| 01:04 |
|
|
mezod joined #rest |
| 01:23 |
|
|
TeddyMurray joined #rest |
| 01:52 |
|
|
shrink0r_ joined #rest |
| 02:21 |
|
|
lemur joined #rest |
| 04:37 |
|
|
lemur joined #rest |
| 06:23 |
|
|
lemur joined #rest |
| 09:18 |
|
|
Left_Turn joined #rest |
| 10:53 |
|
|
lemur joined #rest |
| 14:43 |
|
|
mezod joined #rest |
| 15:44 |
|
|
_ollie joined #rest |
| 15:55 |
|
|
fumanchu joined #rest |
| 16:10 |
|
|
fumanchu_ joined #rest |
| 16:16 |
|
|
azer joined #rest |
| 16:19 |
|
|
Jefffrey joined #rest |
| 16:20 |
|
|
Jefffrey_ joined #rest |
| 16:54 |
|
|
_ollie1 joined #rest |
| 17:35 |
|
|
mgomezch joined #rest |
| 17:36 |
|
|
TeddyMurray joined #rest |
| 17:53 |
|
|
rosstuck joined #rest |
| 17:54 |
|
|
azer joined #rest |
| 18:16 |
|
|
cigarshark joined #rest |
| 18:27 |
|
|
_ollie joined #rest |
| 18:47 |
|
|
vanHoesel joined #rest |
| 18:52 |
|
|
azer joined #rest |
| 19:19 |
|
|
bobjames joined #rest |
| 19:21 |
|
bobjames |
If I have a resource URL like http://example.com/foo/bar/ and I return relations like "baz/" then they are to be interpreted relatively right, i.e. example.com/foo/bar/baz/ |
| 19:50 |
|
|
lemur joined #rest |
| 19:59 |
|
|
vanHoesel joined #rest |
| 20:01 |
|
vanHoesel |
bobjames: not sure if you got an answer in the mean time |
| 20:01 |
|
vanHoesel |
but you are basicly right |
| 20:02 |
|
vanHoesel |
relations usually follow the same pattern as what you remember of the web |
| 20:02 |
|
bobjames |
vanHoesel: thanks :) |
| 20:02 |
|
bobjames |
vanHoesel: I know in REST there are attempts at prividing recipes so explicit URLs don't need to be sent back. |
| 20:03 |
|
bobjames |
I'm thinking... if all my relations are literally like this: "foo" : "foo/" then... it does kind of make you question is I can express this with less redundancy |
| 20:04 |
|
bobjames |
I realize the URL is not supposed to be constructable out of thin air. |
| 20:04 |
|
bobjames |
But All my URLs are... the relation + "/" |
| 20:04 |
|
vanHoesel |
are you specifacally concerned about the trailing '/' ? |
| 20:12 |
|
vanHoesel |
i would rather not have trailing slashes |
| 20:14 |
|
vanHoesel |
the '/' is interperted as some kind of hierchy where there '/' seperates the names of the relations... there is nothing to seperate at the end |
| 20:15 |
|
|
shrink0r joined #rest |
| 20:18 |
|
bobjames |
vanHoesel: I kinda agree, but there are practical and historical reasons |
| 20:19 |
|
bobjames |
vanHoesel: most routers are set up to have a trailing slash because for some reason people find such URLs look more "complete". |
| 20:19 |
|
bobjames |
vanHoesel: also technically every resource can have subresources, so it's technically a "folder" of resources, and that is expressed with "/" |
| 20:20 |
|
bobjames |
vanHoesel: third reason is that without trailing slash you can't navigate using relative URLs as easily |
| 20:20 |
|
bobjames |
Oops. |
| 20:20 |
|
|
vanHoesel joined #rest |
| 20:20 |
|
bobjames |
Oh I thought I bored you :P |
| 20:20 |
|
vanHoesel |
nope, accidently kicked myself |
| 20:20 |
|
bobjames |
vanHoesel: third reason is that without trailing slash you can't navigate using relative URLs as easily |
| 20:21 |
|
bobjames |
vanHoesel: consider how'd I specify "a sub-resource to that resource" with "foo" if my current path has no trailing "/" |
| 20:21 |
|
bobjames |
I can't express it |
| 20:21 |
|
vanHoesel |
well, a relation without a leading slash can simply joined with a '/', can't it ? |
| 20:22 |
|
vanHoesel |
join '/' , $resource, $relation |
| 20:22 |
|
bobjames |
vanHoesel: not sure what you mean; to be more specific: /foo/ + bar/ === /foo/bar/ and /foo + bar === /bar |
| 20:22 |
|
bobjames |
vanHoesel: it makes relative URLs need a lot more context |
| 20:23 |
|
bobjames |
vanHoesel: basically makes relative URLs redundant |
| 20:23 |
|
bobjames |
instead of /foo/ + bar/ I need to give: /foo + foo/bar |
| 20:23 |
|
vanHoesel |
what about: /foo + '/' + 'bar' === 'foo/bar' ??? |
| 20:23 |
|
bobjames |
vanHoesel: well the relative URL rules are already set. |
| 20:24 |
|
vanHoesel |
sorry that shpuld be === '/foo/bar' |
| 20:24 |
|
bobjames |
vanHoesel: when I return a relative URL it's interpreted as it is relative to the current URL |
| 20:24 |
|
vanHoesel |
correct |
| 20:24 |
|
bobjames |
Well I can't express that "/" in the middle |
| 20:24 |
|
bobjames |
Or can I |
| 20:25 |
|
bobjames |
What would be the relative URL to return so /foo becomes /foo/bar |
| 20:25 |
|
bobjames |
Only one I can think is "foo/bar" |
| 20:25 |
|
vanHoesel |
it would be 'bar' |
| 20:25 |
|
bobjames |
vanHoesel: that would resolve to /bar not /foo/bar |
| 20:26 |
|
vanHoesel |
if it returned a relation called '/bar' yep |
| 20:26 |
|
bobjames |
vanHoesel: no I mean /foo + bar = /bar :P |
| 20:26 |
|
bobjames |
If you want try it in a browser ;) |
| 20:27 |
|
bobjames |
Maybe I shouldn't use the plus sign but I mean href="bar" at document /foo resolves to document /bar |
| 20:27 |
|
bobjames |
theo nly way to keep the context is with the trailing slash |
| 20:28 |
|
bobjames |
Or by passing it redundantly in the relative link |
| 20:28 |
|
vanHoesel |
let me try |
| 20:28 |
|
bobjames |
I could be wrong, but I don't know a way around it :D |
| 20:30 |
|
vanHoesel |
it doesn't work in my browser anyways |
| 20:30 |
|
bobjames |
Oh well it works in any browser.. |
| 20:31 |
|
vanHoesel |
oh... holdon... as a href |
| 20:31 |
|
bobjames |
Sure |
| 20:31 |
|
bobjames |
<a href=""> |
| 20:32 |
|
bobjames |
vanHoesel: it's a bit of a murky territory. We're told resources don't sit in a hierarchy, it's an opaque URL string... yet, relative URLs exist :) |
| 20:32 |
|
bobjames |
vanHoesel: and I for one don't mind using them :/ |
| 20:32 |
|
vanHoesel |
i love relative relationships |
| 20:33 |
|
bobjames |
vanHoesel: :) |
| 20:39 |
|
|
lemur joined #rest |
| 20:44 |
|
vanHoesel |
just checked with my browser.... <A HREF="related/here.html">here?</A> works fine |
| 20:49 |
|
vanHoesel |
and routers that think that a 'thing' on the web is either identified by a URL that ends in a .suffix OR in a trailing '/' to indicate "resource/index.html" should be electrocuted |
| 20:59 |
|
bobjames |
vanHoesel: I feel you didn't understand my point. |
| 21:00 |
|
bobjames |
vanHoesel: can you make an <a> link that points to /foo/bar from /foo page, without mentioning foo |
| 21:01 |
|
vanHoesel |
would i need to asume you have the '/foo' resource loaded already ? |
| 21:02 |
|
vanHoesel |
if so, a <A HREF="bar"> does the thing altready for you |
| 21:03 |
|
vanHoesel |
question is, however, does the server know how to handle '/foo/bar' ? |
| 21:06 |
|
vanHoesel |
more clearly... if you have some resource (or html page) with URL: '/artists/1234' and a relationship called 'albums'.... then it would point to '/artists/1234/albums' |
| 21:07 |
|
vanHoesel |
the '/' between the '4' and the 'a' will be put there for you |
| 21:08 |
|
vanHoesel |
that's the browser (client / user-agent) it's responsabillity |
| 21:10 |
|
bobjames |
vanHoesel: if I am at page "/foo |
| 21:11 |
|
vanHoesel |
that should join the 'BASE' and the relation or relative URL with a '/' |
| 21:11 |
|
bobjames |
vanHoesel: if I am at page "/foo" and I click link "bar" I'll go to "/bar" |
| 21:11 |
|
vanHoesel |
silly browser |
| 21:11 |
|
bobjames |
vanHoesel: if I am at page "/artists/1234" and I click "albums" I'll go to "/artists/albums" |
| 21:12 |
|
bobjames |
vanHoesel: well that's because directories and files are assumed to be fundamentally different |
| 21:12 |
|
* vanHoesel |
grumbles |
| 21:12 |
|
bobjames |
vanHoesel: and I'm kinda like "well everything is potentially a host of sub-things related to it - so everything is a directory" and boom. |
| 21:12 |
|
bobjames |
Of course the only exception is actual file URLs. But file URLs never have "subfiles" so that's fine |
| 21:17 |
|
trygvis |
the rules for creating absolute URLs is specified by the media type |
| 21:17 |
|
trygvis |
like HTML's base attribute |
| 21:19 |
|
bobjames |
trygvis: interesting point. But in the absense of base, what happens if it's not HTML and it's relative. Undefined behavior? |
| 21:20 |
|
bobjames |
trygvis: that's actually a very interesting point... |
| 21:21 |
|
trygvis |
relative URLs are kinda useless for anything machine-generated |
| 21:21 |
|
bobjames |
trygvis: I could define a media type where my relations are expressed only by their name... so instead of {"profile": "http://e.com/foo/123/profile"} I can just have ["profile"] ... and yet that would be considered not aligned with HATEOAS |
| 21:22 |
|
bobjames |
trygvis: machines deal fine with relative URLs.. |
| 21:22 |
|
trygvis |
only if told how to transform them into absolute URLs |
| 21:23 |
|
trygvis |
but my point was that it doesn't add value |
| 21:23 |
|
bobjames |
trygvis: well if my media type can specify how to convert them into full URLs does that qualify as out of band info or not? |
| 21:24 |
|
bobjames |
trygvis: it kind of becomes very murky very quickly |
| 21:24 |
|
trygvis |
the user agents are expected to implement the media type they support and since the construction of URLs are specified by the media type you're good |
| 21:26 |
|
bobjames |
trygvis: that almost feels like a loophole to call anything HATEOAS if I use a custom media type with lots of implicit URL building rules. |
| 21:50 |
|
pdurbin |
ramsey: you know bigbluehat too? I just met him the other day and didn't realize he was in this channel. :) |
| 21:52 |
|
|
lemur joined #rest |
| 22:09 |
|
pdurbin |
nice guy, nice hat |
| 22:24 |
|
|
mezod joined #rest |