greptilian logo

IRC log for #rest, 2014-10-08

https://trygvis.io/rest-wiki/

| Channels | #rest index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
00:02 shrink0r joined #rest
00:06 Mxyzpltk_ joined #rest
00:14 rue joined #rest
00:22 rue joined #rest
00:57 proteusguy joined #rest
01:12 philbot joined #rest
01:12 Topic for #rest is now #rest REpresentational State Transfer | logs: http://irclog.greptilian.com/rest/today |  http://tech.groups.yahoo.com/group/rest-discuss | http://code.google.com/p/implementing-rest/ | http://en.wikipedia.org/wiki/Representational_State_Transfer
01:33 pezra joined #rest
01:53 tr3online joined #rest
02:07 Mxyzpltk_ joined #rest
02:47 systmkor joined #rest
04:08 Mxyzpltk_ joined #rest
04:50 pdurbin joined #rest
05:10 tr3online joined #rest
05:12 tr3online joined #rest
05:39 tr3online joined #rest
05:42 tr3online joined #rest
06:08 Mxyzpltk_ joined #rest
06:21 talios joined #rest
06:27 MasterPiece1 joined #rest
06:42 rosstuck joined #rest
06:44 trygvis one point to: pdurbin!
06:51 tmoore they don't matter to API clients, but they matter to the humans that are trying to write them
06:53 trygvis you're in #rest, it's all about the machines
06:53 trygvis I'm sure there is a #seo channel somewhere :)
06:54 talios joined #rest
07:01 tmoore I'm not talking about that, I'm talking about being comprehensible to API developers... easy to trace, debug, etc
07:29 philbot joined #rest
07:29 Topic for #rest is now #rest REpresentational State Transfer | logs: http://irclog.greptilian.com/rest/today |  http://tech.groups.yahoo.com/group/rest-discuss | http://code.google.com/p/implementing-rest/ | http://en.wikipedia.org/wiki/Representational_State_Transfer
07:31 tr3online joined #rest
07:47 fumanchu_ joined #rest
07:50 fumanchu joined #rest
08:08 shrink0r joined #rest
08:08 azr joined #rest
08:09 Mxyzpltk_ joined #rest
08:17 fumanchu_ joined #rest
08:40 graste joined #rest
08:42 systmkor1 joined #rest
08:48 rue joined #rest
08:53 rue joined #rest
09:10 azr joined #rest
09:14 azr_ joined #rest
09:15 martinfilliau joined #rest
09:33 rue joined #rest
10:10 Mxyzpltk_ joined #rest
10:25 rue joined #rest
10:26 Left_Turn joined #rest
10:29 MasterPiece joined #rest
10:29 MasterPiece1 joined #rest
10:37 pdurbin humans have to read the API documentation
10:43 trygvis yeah, but that shouldn't include URLs
10:43 trygvis (mainly shouldn't)
10:57 pdurbin most API docs don't have URLs in them?
10:58 trygvis most API docs document RPC APIs
11:00 * pdurbin wonders if there's an #rpcapis channel :)
11:00 trygvis I think it's called #soap :)
11:01 trygvis :P
11:04 pdurbin :)
11:05 pdurbin probably there's some middle ground. where the majority are. not quite REST but better than SOAP
11:11 igitoor joined #rest
11:11 pindonga joined #rest
11:11 MasterPiece joined #rest
11:11 `0660 joined #rest
11:11 ChrisAnn joined #rest
11:11 ChrisAnn joined #rest
11:12 rue joined #rest
11:14 MasterPiece joined #rest
11:15 igitoor joined #rest
11:19 trygvis sure
11:19 trygvis people have to make their own architecture, REST is just a style
11:51 tr3online joined #rest
11:55 rue joined #rest
11:57 tr3online joined #rest
12:02 Left_Turn joined #rest
12:04 _ollie joined #rest
12:09 tr3onlin_ joined #rest
12:11 Mxyzpltk_ joined #rest
12:21 txomon|fon joined #rest
12:22 txomon|fon hi, I have been looking at http://www.narwhl.com/ and I http://programmers.stackexchange.com/questions/141410/restful-state-changing-actions
12:22 txomon|fon but I haven't been able to know how to represent actions
12:22 txomon|fon I am modeling a game
12:23 txomon|fon and in the game, the idea is that the user acts uppon objects
12:23 txomon|fon how may I represent that?
12:23 txomon|fon I don't like the idea of putting it in a GET param
12:24 trygvis what kind of game is it?
12:24 txomon|fon multiplayer
12:25 trygvis that doesn't explain much :)
12:25 txomon|fon the question isn't too specific =)
12:25 txomon|fon anyway
12:25 txomon|fon it's a PoC to get sure my friends like it
12:25 trygvis you can model actions like html's <form>
12:25 txomon|fon what do you mean?
12:25 txomon|fon in the form, you put an action, don't you?
12:26 txomon|fon the idea is, how may I represent that action in a RESTFull with JSON and HATEOAS
12:26 txomon|fon I want to use the full stack
12:27 txomon|fon I can understand how to give an item to a player
12:27 txomon|fon or how the player can pick an item
12:27 txomon|fon but I can't understand how to make the player use one specific item on something
12:27 trygvis that's where you have a need for something form-like
12:28 trygvis each item can include forms that describes the actions available
12:28 trygvis "actions" is probably not the right word, sometimes it's about navigating data instead of manipulating data
12:28 txomon|fon http://restful-api-design.readthedocs.org/en/latest/forms.html ?
12:29 trygvis I meant the concept, you'll have to implement it in our own media type
12:29 trygvis or choose a media type that already has a concept of forms
12:30 txomon|fon I still don't get it
12:30 txomon|fon ;(
12:32 trygvis can you paste an example response on pastie.org?
12:32 txomon|fon I haven't done anything yet
12:32 txomon|fon I am trying to disguise how REST works
12:32 txomon|fon to design my game over it
12:33 txomon|fon for example, if I want to point out that /player/1/inventory/34 has been used in /player/5, how would I mark it? and if instead of pointing out that player/1 has used, I want to say has given
12:33 txomon|fon etc.
12:35 trygvis {name: "player 1", forms: {'start-game': {method: 'POST', fields: [..]}}
12:36 charlie_ joined #rest
12:37 txomon|fon so you mean that REST can, not only use nouns, but also verbs?
12:37 mezod joined #rest
12:39 txomon|fon http://restful-api-design.readthedocs.org/en/latest/methods.html#actions
12:48 txomon|fon trygvis, so, in that case, I would be falling in RPC, wouldn't I?
12:48 txomon|fon is it OK to mix RPC with REST?
12:48 txomon|fon for this sort of things I mean
12:48 trygvis no, it's not RPC
12:51 txomon|fon so, for the example I said, lets say the user just has id and nickname and the item just has id and name
12:51 txomon|fon what should I do?
12:51 txomon|fon let say the client has all the data needed
12:51 trygvis they don't have IDs, they have URIs
12:52 txomon|fon ok, hiperlinked form then
12:53 txomon|fon so, the client has the URI/content of player 1 and 5, and the item 34 one
12:53 txomon|fon and wants to do action X, from player 1 to player 5 with item 34
12:53 trygvis so you find a form called "mark item as used", fill it and submit it as described in the form
12:53 trygvis just like you would with a html <form>
12:54 txomon|fon but I have to provide that form!
12:54 txomon|fon what is the structure of the call
12:54 trygvis indeed
12:54 txomon|fon (curl)
12:54 txomon|fon in my mind, it was to do something like:
12:55 trygvis how the client should construct the resource URI and/or body to send to the server has to be specified in the media type
12:55 trygvis HTML specifies that the user should use application/x-www-form-urlencoded in some cases and multipart/form-data in other cases
12:56 txomon|fon an rpc call ;(
12:56 txomon|fon on /player/1/inventory/34
12:56 trygvis uhm
12:56 txomon|fon like, use item
12:56 txomon|fon or something like that
12:56 trygvis you have a funny definition of RPC
12:57 trygvis it's not like REST prevent you from manipulating resources
12:57 txomon|fon yeah, I was thinking on providing verbs to RPC
12:57 trygvis it's just that it is expected that the server tells the client what it can do inline in the document instead of the client using out of bound data/knowledge
12:57 txomon|fon humm
12:57 txomon|fon so
12:58 txomon|fon /player/1/inventory/34/action/use/player/5 ?
12:58 txomon|fon althought I don't know if that's too clean
12:58 trygvis I think you should start to sketch out your request and response interactions
12:58 txomon|fon it has more than 3 levels
12:59 trygvis what? it's REST, nobody cares about the URL
12:59 trygvis do you know how HTML's form work?
12:59 txomon|fon it's a post to the target, where you send <id>=value& pairs
12:59 txomon|fon that?
13:00 trygvis well, yes. that's a part of it
13:01 txomon|fon also found this: http://quoderat.megginson.com/2005/04/03/post-in-rest-create-update-or-action/
13:01 txomon|fon I need an standard way to do this :()
13:02 trygvis there is no standard way
13:02 txomon|fon someone has had to come up with a way
13:02 txomon|fon standard way
13:02 trygvis SOAP is one standard, feel free to use that
13:03 txomon|fon nope
13:03 txomon|fon that's horrible
13:03 txomon|fon I tried to read all the spec and I almost turned zombie
13:04 txomon|fon trygvis, there is no real need to specify the media type,is it?
13:05 txomon|fon I mean, to give specifics on mediatype, sort of, item can be used like this
13:06 trygvis HATEOAS is all about using media types
13:06 txomon|fon hummm
13:06 trygvis it's an essenstial part of REST
13:07 trygvis feel free to invent a better media type that is specific for your game
13:08 txomon|fon you mean content-type, don't you?
13:08 txomon|fon just to get sure
13:09 trygvis http uses the header content-type to indicate the media type of the body, yes
13:10 txomon|fon yeah
13:10 trygvis but remember that there is no strict relationship between http and rest, though I haven't seen a rest application that doesn't use http
13:10 txomon|fon so, I should define content types in both client and server so that they can map objects directly to REST objects?
13:10 trygvis but http is not rest
13:16 txomon|fon http://stackoverflow.com/questions/10711122/other-restful-actions-on-a-resource ?
13:16 txomon|fon is that a better link trygvis?
13:17 txomon|fon the first answer of course
13:18 trygvis better link?
13:18 txomon|fon better solution
13:18 txomon|fon is what you said, isn't it?
13:25 trygvis I'm not sure what you're asking
13:25 trygvis but if you're saying that some other guy said the same thing as I did, and you like it? sounds good!
13:25 txomon|fon something like that
13:26 txomon|fon I am looking forward for an implementation of this
13:26 txomon|fon the problem is that for me, the forms are sort of RPC
13:26 txomon|fon xD
13:27 txomon|fon because if we are serious, we would at the end have /form and a post request specifying all the data
13:27 trygvis no, they are not. RPC depend on out-of-bounds knowledge and hardcoded values in the clients
13:27 txomon|fon so you mean that if I did get /form I would have all the forms
13:27 txomon|fon and in RPC no?
13:29 trygvis you have have a /all-forms-service that contains all possible methods, sure
13:29 trygvis you would end up with something that is super flexible and possibly not very easy to use
13:29 trygvis (super generic stuff tends to be harder to use)
13:33 foist joined #rest
13:34 trygvis but it is often useful to keep some of the forms within the resource as well, then it is easier to assume what kind of resource that you're working with
13:34 txomon|fon oh sure
13:34 txomon|fon but I was trying to specify the forms as an item
13:34 trygvis sometimes the available options change given this context which can be expressed through including different sets of forms
13:34 trygvis you can also have different set of fields available in the form
13:48 Mxyzpltk_ joined #rest
14:15 nkoza joined #rest
14:57 rue joined #rest
15:04 pezra joined #rest
15:14 shrink0r joined #rest
15:18 shrink0r joined #rest
15:20 Andre-B joined #rest
15:30 saml do you use jsonschema? http://json-schema.org/latest/json-schema-core.html
15:31 saml i need to use this for validation.. but i can't specify schema so that it'll accept anything
15:31 saml everything
15:34 Mxyzpltk_ joined #rest
17:08 woky joined #rest
17:10 woky Hello. Is this good REST design? http://sprunge.us/OUNA
17:11 woky What worries me is that DELETE doesn't really delete the /resource-list path resource but rather what the query says.
17:11 foist joined #rest
17:17 begriffs joined #rest
17:20 pezra woky, that makes sense to me. The resource is identified by the *entire* url not just the path component of it
17:21 begriffs_ joined #rest
17:41 woky pezra, ok, thank you
18:03 shrink0r joined #rest
18:10 foist joined #rest
18:10 rue joined #rest
18:20 foist joined #rest
18:51 talios joined #rest
19:08 daxim_ joined #rest
19:09 pezra joined #rest
19:19 woky left #rest
19:38 graste joined #rest
20:03 Andre-B joined #rest
20:13 shrink0r joined #rest
21:18 tr3online joined #rest
22:36 tr3online joined #rest
22:47 tr3online joined #rest
23:00 tr3online joined #rest
23:25 tr3online joined #rest
23:58 pezra joined #rest

| Channels | #rest index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

https://trygvis.io/rest-wiki/