greptilian logo

IRC log for #rest, 2015-02-12

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:03 ewalti joined #rest
00:04 ewalti joined #rest
00:08 shrink0r_ joined #rest
00:14 shrink0r joined #rest
00:24 shrink0r_ joined #rest
01:38 shrink0r joined #rest
02:45 fumanchu joined #rest
02:56 fragamus joined #rest
02:57 StatelessCat joined #rest
03:05 shrink0r_ joined #rest
03:07 shrink0r joined #rest
04:06 ralphschindler joined #rest
04:26 lemur joined #rest
05:20 ewalti joined #rest
06:51 proteusguy joined #rest
07:19 proteusguy joined #rest
07:41 lemur joined #rest
08:00 shrink0r joined #rest
08:37 azr joined #rest
08:51 rosstuck joined #rest
09:02 fragamus joined #rest
09:10 sulky joined #rest
09:30 proteusguy joined #rest
10:08 interop_madness joined #rest
10:13 martinfilliau joined #rest
10:56 Left_Turn joined #rest
11:22 mezod joined #rest
11:56 daxim joined #rest
13:06 azr joined #rest
13:39 rosstuck joined #rest
15:03 shrink0r joined #rest
15:08 ralphschindler joined #rest
15:29 nkoza joined #rest
15:40 Tobbe joined #rest
15:43 Tobbe We use /users/<user-id>/edit-form as a URI for a form to edit an existing user. Now we want a URI for a form to edit common properties for multiple users. What URI would you suggest?
15:43 Tobbe The list of <user-id>s can be too long to fit in a URL
15:45 saml Tobbe, /groups/<gropu-id> ?
15:45 saml how do you determine "multiple users"?
15:46 saml do all users share some common properties?
15:46 trygvis Tobbe: uhm, why ../edit-form and not just a POST <user-id>/ directly?
15:46 Tobbe One idea right now is /users/{"age":"46"}/edit-form which would edit all users of age 46
15:46 saml ah
15:46 Tobbe trygvis: it's GET to show the edit-form
15:46 trygvis which hypermedia are you using?
15:46 Tobbe another suggestion for a URI right now is /users/edit-form?age=46
15:46 saml i'd just do /users/edit-form
15:47 saml and has rich client dynamically generating html form
15:47 trygvis the URL doesn't matter
15:47 saml like,  Step 1: which users do you want to edit?   (can be drag drop each user.. or write search criteria)
15:47 Tobbe trygvis: I know it doesn't matter when it comes to REST. But it matters for the users using our service
15:47 saml Step 2: dynamically generates common properties of selected users
15:48 saml in the end, it'll be POST /users
15:48 trygvis Tobbe: why?
15:48 trygvis Tobbe: and you're asking the in the wrong place if your know you are not trying to use REST
15:48 trygvis this is #rest after all
15:48 saml with list of users and modification in request body
15:48 Tobbe trygvis: I know I'm in the wrong place. I just didn't know a better channel to join
15:49 saml you can do   GET /users  to return whatever.  and implement content negotiation.
15:49 saml many just do extension like GET /users.html  (html form)       GET /users.json  (json web scale)
15:49 trygvis Tobbe: well that is fucked up
15:49 Tobbe heh ;)
15:52 Tobbe saml: Our "Step 1" is /users, which is a search form. From there you can select to edit just one users (/users/<user-id>/edit-form) or select to edit all found users. But at what URI should we put that edit form?
15:53 Tobbe If I understand correctly your suggestion is /users/edit-form, and then put the list of users to edit in the body
15:53 Tobbe right?
15:53 saml yes. or POST /users  body could contain query criteria if list of users is huge
15:54 saml GET /users.html  for html form.  users type in search critera.  form POST /users the criteria
15:54 saml in html form, you can use angularjs and modern web technology
15:55 saml flat design and web components. hire 10 more frontends
15:55 Tobbe GET /users.html is already used for the search form for finding users. Can't use it for the edit form
15:56 saml yah you can do GET /users.form.html    or GET /users/edit-form   whatever
15:56 saml don't really matter
15:56 Tobbe right
15:57 saml all i'm saying is, let client generate forms dynamically instead of server outputting different forms
15:57 saml GET /users/edit-form?age=46     vs.  GET /users/edit-form?sex=male     instead of doing this
15:58 saml just do GET /users/edit-form   and client has all checkboxes.. etc
15:58 saml or what i'm suggesting is bad. i don't know
15:58 saml i tend to prefer to delegate a lot of work to client
15:59 saml and keep server simple, cause frontend labor is cheaper
15:59 Tobbe We can't do it all in the client, the list of users is too big
15:59 saml no, client in the end generates short criteria
15:59 saml client talks to server,  hey, update all users whose age is 46 to 45 because leap year or something
16:00 saml that's pretty short sentence
16:00 saml but some argues it's not really RESTful
16:00 saml some say, client genreates 1000 PUT requests
16:00 saml client does search for all users whose age is 46.  and for each user, makes PUT to update age
16:02 Tobbe What if we wanted a bookmarkable URL for updating all males that are 46 years old?
16:03 Tobbe We already support /users?age=46 to get a list of all users of age 46
16:04 Tobbe now we want to support multi-edit of all those users
16:06 saml oh i see
16:07 Tobbe the question is at what URI to display a form to input new information for those users
16:07 saml GET /users.edit?age=46  hehehheehehe
16:08 Tobbe for a single user we use GET /users/<user-id>/edit-form
16:14 fumanchu This isn't rocket science. HTTP URI's are hierarchical. users/{id}/ is subordinate to users/, etc. find the resource which corresponds to the scope of data you want to alter. If you can PUT a modified version of the representation you GET there, do so. If not, and you have an established PATCH format, use it. If not, POST instructions regarding what you want to do.
17:31 proteusguy joined #rest
17:36 ewalti joined #rest
17:40 lemur joined #rest
17:50 lemur joined #rest
19:02 shrink0r joined #rest
19:05 ewalti joined #rest
19:13 fragamus joined #rest
19:24 fragamus joined #rest
19:46 ralphschindler joined #rest
20:13 rickharrison joined #rest
20:16 gluegadget joined #rest
20:18 ramsey joined #rest
20:19 lebster joined #rest
21:06 shrink0r joined #rest
22:03 mezod joined #rest
23:46 StatelessCat joined #rest

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

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