| Time |
S |
Nick |
Message |
| 00:39 |
|
|
m0ltar joined #rest |
| 01:02 |
|
|
jzsprague joined #rest |
| 02:13 |
|
|
ldiamond joined #rest |
| 02:28 |
|
|
ldiamond joined #rest |
| 02:29 |
|
|
jzsprague joined #rest |
| 03:28 |
|
|
jzsprague joined #rest |
| 03:36 |
|
|
_ollie joined #rest |
| 06:16 |
|
|
rosstuck joined #rest |
| 06:46 |
|
|
wilmoore joined #rest |
| 07:10 |
|
|
ph88 joined #rest |
| 07:58 |
|
|
jzsprague joined #rest |
| 08:20 |
|
|
graste joined #rest |
| 08:46 |
|
|
Left_Turn joined #rest |
| 08:52 |
|
|
martinfilliau joined #rest |
| 09:14 |
|
|
_ollie joined #rest |
| 09:42 |
|
|
_ollie joined #rest |
| 09:55 |
|
|
dEPy joined #rest |
| 10:05 |
|
|
bgale joined #rest |
| 11:11 |
|
|
rosstuck joined #rest |
| 11:19 |
|
|
_ollie joined #rest |
| 11:52 |
|
|
_ollie joined #rest |
| 12:12 |
|
|
shrink0r joined #rest |
| 12:18 |
|
|
danizord joined #rest |
| 12:28 |
|
|
_ollie joined #rest |
| 12:38 |
|
|
ldiamond joined #rest |
| 12:51 |
|
|
charlex joined #rest |
| 13:11 |
|
|
seantallen joined #rest |
| 13:30 |
|
|
m0ltar joined #rest |
| 13:49 |
|
|
saml joined #rest |
| 14:35 |
|
|
_ollie joined #rest |
| 14:52 |
|
|
adaro joined #rest |
| 15:43 |
|
|
wilmoore joined #rest |
| 16:32 |
|
|
adaro joined #rest |
| 17:01 |
|
|
fumanchu joined #rest |
| 17:19 |
|
|
danizord joined #rest |
| 17:31 |
|
|
danizord joined #rest |
| 17:34 |
|
|
m0ltar joined #rest |
| 18:56 |
|
|
wilmoore joined #rest |
| 19:04 |
|
|
shrink0r joined #rest |
| 20:09 |
|
|
ph88_ joined #rest |
| 21:06 |
|
|
dEPy joined #rest |
| 21:21 |
|
|
bezhermoso joined #rest |
| 21:23 |
|
bezhermoso |
Are fields that can both accept an identifier or a full resource (for creation and subsequent assignment) considered a bad practice? |
| 21:26 |
|
whartung |
"fields"? |
| 21:26 |
|
asdf` |
i did that in a project and personally i'd consider it not worth the hassle, you can just fire 2 requests instead |
| 21:27 |
|
asdf` |
but that's from a technical difficulties point of view |
| 21:27 |
|
asdf` |
(validation is harder, code gets more complex) |
| 21:29 |
|
bezhermoso |
whartung: Sorry I'm not totally familar with terminologies used in REST. By "fields" i mean the properties of a resource: { "id" : 1 } . "id" being a "field". |
| 21:30 |
|
whartung |
oh ic |
| 21:30 |
|
bezhermoso |
Now I'm curious what it's really called :D |
| 21:31 |
|
bezhermoso |
asdf` : I see. Other than the issue with validating the inner resource (which I think I can manage just fine using the framework I'm using), are there any issues that comes to mind? |
| 21:32 |
|
bezhermoso |
One of the intent is actually for the creation of the resource to be atomic. |
| 21:33 |
|
bezhermoso |
So requiring two API calls would not fit my needs. (Unless there's a RESTful way of dealing with that) |
| 21:33 |
|
whartung |
well the other issue is that it seems you're thinking referentially…unless the embedded resource has value as "just an identifier", are you using the identifier to "link" to another resource? |
| 21:33 |
|
|
dEPy joined #rest |
| 21:34 |
|
bezhermoso |
whartung: I'm writing a pastebin to illustrate a quick example. Gimme a sec... |
| 21:34 |
|
asdf` |
bezhermoso, hmm, what's your framework? i did it with django, but we kinda went full on on this, with both updating embeds, updating embed lists etc. Had to consider lots of suble points, eg. when updating a list there's some bookkeeping you need to do, explicitly un-link the dropped resources etc (so that django's signals would fire) |
| 21:35 |
|
asdf` |
my point is, the embedding system thing is easily like 30% of the whole application code |
| 21:36 |
|
|
dEPy joined #rest |
| 21:37 |
|
bezhermoso |
asdf` : I'm using Symfony2 (PHP) |
| 21:38 |
|
bezhermoso |
whartung: https://gist.github.com/bezhermoso/3b18a4297e8c2d7f1508 |
| 21:39 |
|
whartung |
do those say the same thing? |
| 21:39 |
|
bezhermoso |
Nope. The first call would create a new House resource and assign the user to that. |
| 21:40 |
|
bezhermoso |
The second call would simply assign the user to the referenced house (identified by 24) |
| 21:40 |
|
whartung |
I don't understand the "organization" : 24 |
| 21:40 |
|
bezhermoso |
Oops sorry |
| 21:40 |
|
bezhermoso |
whartung: Updated it. That should be "house" not "organization". |
| 21:42 |
|
whartung |
I would think the reference would be a URL |
| 21:42 |
|
bezhermoso |
So first call would create the house resource, and embed it to the user. All done in one call, instead of calling POST /houses > retrieve ID > POST /users |
| 21:42 |
|
bezhermoso |
Ooooh! Good point. |
| 21:43 |
|
bezhermoso |
asdf` : I think I understand what you are now getting at. |
| 21:43 |
|
bezhermoso |
That's heavy work indeed. |
| 22:33 |
|
|
talios joined #rest |
| 23:10 |
|
|
bezhermoso left #rest |
| 23:27 |
|
|
Left_Turn joined #rest |