greptilian logo

IRC log for #rest, 2014-09-09

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:19 fumanchu joined #rest
00:33 systmkor joined #rest
01:09 talios joined #rest
01:14 _ollie joined #rest
01:17 fumanchu_ joined #rest
02:07 tr3onlin_ joined #rest
02:14 tr3online joined #rest
03:21 _ollie joined #rest
03:33 ChrisAnn_ joined #rest
03:33 rickharrison__ joined #rest
03:34 blindscreen_ joined #rest
03:40 warehouse13 joined #rest
03:48 ssedano joined #rest
04:06 proteusguy joined #rest
04:56 DrCode joined #rest
05:08 fumanchu joined #rest
05:17 mgomezch_ joined #rest
05:28 adaro joined #rest
05:36 tr3online joined #rest
06:29 adaro joined #rest
06:59 systmkor joined #rest
07:05 adaro joined #rest
07:43 rosstuck joined #rest
08:09 interop_madness joined #rest
08:19 graste joined #rest
09:06 rosstuck joined #rest
09:10 martinfilliau joined #rest
10:33 shrink0r joined #rest
10:39 ruibrito joined #rest
10:42 ruibrito joined #rest
10:42 ruibrito hey friends, can anybody give me some points into doing a session in my Web Service?
10:43 ruibrito I'm doing my server in JAVA using the Jersey framework, but I guess is pretty much the same in others
11:27 rosstuck joined #rest
11:47 _ollie joined #rest
12:05 pdurbin maybe something like this: http://porterhead.blogspot.com/2013/01/writing-rest-services-in-java-part-6.html
12:18 _ollie joined #rest
13:04 _ollie joined #rest
13:22 tr3online joined #rest
13:37 Mxyzpltk joined #rest
13:54 _ollie joined #rest
13:55 DrCode joined #rest
14:30 Mxyzpltk in collection+json, I have a collection of entities, each of wich has members, how would I represent this members array in the data:[] ?
14:38 trygvis each item can have links, one of those can be a link to the item's child resources
14:41 Mxyzpltk so two requests are necesary to get the full info... hmmm
14:42 Mxyzpltk in data[] just the info about the entity and a link to a members collection... is that right?
14:44 trygvis no, you can include the referenced entities there too if you want to
14:44 trygvis but part of the point with using c+j is to flatten your model so you won't have deeply nested objects
14:45 Mxyzpltk but how would the members array would look, I just can't see it...
14:45 trygvis but doing a request to first get teh list of items and then another one to get more detail is usually not a problem
14:45 trygvis what kind of data do you want to model?
14:47 Mxyzpltk the entity has some info about it, they are comitee kind of collections... so they have the memebers, each who is peaple...
14:47 Mxyzpltk so they would have name, dateCreated, etc, and members[]
14:48 Mxyzpltk this members would only be a reference to the people with a link to the full info about the person
14:50 Mxyzpltk it would be as having another items: inside items:, but as far as I know, that's not allowed in c+j
14:50 Mxyzpltk right...
14:50 Mxyzpltk ?
14:53 trygvis a c+j resource is only a list of items where each item is just a list of key+value pairs
14:54 trygvis if you want to boil it down to its essence
14:55 Mxyzpltk yes, and each item can only have href, data and links, right...
14:55 trygvis members sounds like something that should be its own list, so I would let an item have a link with rel="members" which points to another list
14:55 trygvis yes
14:56 Mxyzpltk ok, then, persons are actually congress persons, which we call "diputados" in my country, so the members link will go to api/diputados?{uri_template} with the query for that comittee, does that sound right?
14:58 Mxyzpltk the comitee are called "comisiones" so the endpoint is api/comisiones, I could do comisiones/{id}/members or diputados?{query}, what sounds better?
14:58 trygvis the client won't care how the URLs look, it will only follow links
14:59 saml can diputados be in different comisiones?
14:59 Mxyzpltk yes
14:59 saml yah urls don't really matter
15:00 Mxyzpltk I'm just trying to make some sense of it... do you think I would be better with odata or hal with this setup?
15:00 Mxyzpltk <-- newbie here :)
15:00 saml /diputadoes?comisiones=Comisiones+Name   gives you diputadoes who belong to Comisiones+Name comisiones
15:01 Mxyzpltk yes, I guess that makes sense...
15:02 Mxyzpltk I just wanted to have the list of members in a shorthand way in the comision collection...
15:03 Mxyzpltk but I guess I can do it this way also...
15:04 interop_madness joined #rest
15:05 Mxyzpltk can I bother you guys with one more question, for the diputado collection, there's a query with options, but I don't know if I'm giving the options the right way
15:05 Mxyzpltk this is a search that gives only the diputados with names 'like' "luis", http://api-ojoalvoto.rhcloud.com/api/diputados?ident=2&search=luis
15:05 Mxyzpltk at the end you'll see the query with options... can you guys please take a look
15:06 Mxyzpltk the one with "name": "partidos"
15:09 Mxyzpltk is options part of collection.next and not c+j?
15:09 trygvis the queries part of c+j is quite weak, so what you have there is not legal strict c+j
15:09 trygvis oh, I've never seen collection.next before
15:10 Mxyzpltk my first time also, I was trying to find the options documentation :)
15:10 trygvis there are many useful extensions to c+j at the github repository
15:10 trygvis https://github.com/collection-json/extensions
15:11 Mxyzpltk and is considered 'ok' to use this extensions?
15:11 trygvis oh vnd.collection.next+json is actually registered with iana
15:21 Mxyzpltk so, should I look at odata or hal, or stick with c+j and extensions?
15:23 trygvis you'll have to decide that for yourself. odata is much more record-oriented from what I know, hal is a completely different thing
15:23 trygvis I'm a big c+j fan :)
15:24 Mxyzpltk I think my data acommodates to c+j fine, but I'm thinking about devs doing extra steps and just complaining about it :)
15:25 Mxyzpltk this extension might be what suits me, https://github.com/collection-json/extensions/blob/master/value-types.md
15:25 trygvis that's always an issue. developers love hal because they can easily deserialize the data, but it it doesn't give you many of the advantages of c+j
15:26 trygvis yes
15:27 Mxyzpltk but it's not clear if in this "array":[] I could use some known format, like [{href: "uri", rel: "member"} ... ]
15:28 Mxyzpltk even more vague in the "object": {}
15:29 trygvis it is made to cater the issues you're seeing now, something you just want to include blobs of data
15:31 Mxyzpltk ok, I'll try to finalize some thoughts in code, and will bother you again when the representations are live so that I can get more feedback, that is if you don't mind me being a pita :)
15:47 trygvis please do!
15:52 Mxyzpltk thanks
16:40 tr3online joined #rest
17:50 tr3online joined #rest
17:52 tr3online joined #rest
18:15 ph88 joined #rest
19:03 shrink0r joined #rest
19:22 shrink0r joined #rest
19:39 tr3online joined #rest
20:14 daxim joined #rest
20:17 systmkor joined #rest
20:50 danizord joined #rest
21:06 tr3online joined #rest
21:18 daxim joined #rest
22:23 talios joined #rest
22:35 `0660 joined #rest
22:41 systmkor joined #rest
22:48 fumanchu_ joined #rest
22:51 `0660 joined #rest
22:52 fumanchu joined #rest

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

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