greptilian logo

IRC log for #rest, 2015-01-30

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
01:13 shrink0r_ joined #rest
01:19 talios joined #rest
01:50 shrink0r joined #rest
02:54 begriffs joined #rest
03:55 begriffs joined #rest
04:23 tr3onlin_ joined #rest
04:55 begriffs joined #rest
05:12 shrink0r joined #rest
06:29 _ollie joined #rest
07:00 shrink0r joined #rest
07:12 _ollie joined #rest
07:55 proteusguy_ joined #rest
08:15 azr joined #rest
08:41 azr joined #rest
08:51 blahdeblah joined #rest
08:51 blahdeblah joined #rest
09:17 graste joined #rest
10:03 quimrstorres joined #rest
10:06 quimrstorres joined #rest
10:14 martinfilliau joined #rest
10:37 aGHz joined #rest
10:38 azr joined #rest
11:01 blindscreen_ joined #rest
11:08 Left_Turn joined #rest
11:24 quimrsto_ joined #rest
11:40 huckleberry78 joined #rest
11:40 quimrstorres joined #rest
11:50 mezod joined #rest
12:18 azr joined #rest
12:35 huckleberry78 joined #rest
12:52 mezod joined #rest
12:58 huckleberry78 joined #rest
12:58 proteusguy joined #rest
13:02 begriffs joined #rest
13:14 nkoza joined #rest
13:36 azr joined #rest
13:56 huckleberry78 joined #rest
14:02 begriffs joined #rest
14:11 shrink0r joined #rest
14:40 Andre-B joined #rest
14:41 shrink0r_ joined #rest
14:43 shrink0r joined #rest
15:45 huckleberry78 joined #rest
15:49 nkoza joined #rest
16:34 diegoaguilar joined #rest
17:28 shrink0r_ joined #rest
17:31 shrink0r joined #rest
17:33 shrink0r_ joined #rest
17:58 shrink0r joined #rest
18:07 shrink0r_ joined #rest
18:08 shrink0r joined #rest
18:12 dreamdust joined #rest
18:12 shrink0r joined #rest
18:14 quimrsto_ joined #rest
18:20 mezod joined #rest
18:57 shrink0r_ joined #rest
18:58 shrink0r joined #rest
19:01 begriffs joined #rest
19:28 quimrstorres joined #rest
19:33 alxbl joined #rest
19:51 shrink0r_ joined #rest
20:01 quimrstorres joined #rest
20:17 tr3online joined #rest
20:32 shrink0r joined #rest
21:02 MLMitch joined #rest
21:04 MLMitch Just a general question, I am having trouble grasping how to build/design a restful website. Does anyone know of any good websites that explain it very well? I am just tired of google searches and not finding the best info out there. I figure you guys all learned it from somewhere, right? lol
21:05 trygvis it's hard to point to a single website, it's like trying to define SOA
21:09 saml MLMitch, use html?
21:09 trygvis html is a horrible hypermedia
21:10 saml what kind of website are you making?
21:10 saml and what user agents are you targeting?
21:10 MLMitch My project involves using php files, as the backend guy my responsibilites are mysql, php, and designing rest. I don't have a problem with the first 2 because they are more concrete.
21:10 saml ah you're building "api" ?
21:10 MLMitch Our hope is to have a website using angular that will be able to accompany many users
21:10 saml many use json
21:11 MLMitch ya an api and we are using json
21:11 saml angularjs is not recommended by many
21:11 saml basically you can think of each url (resource) like a file. you can GET, PUT, DELETE
21:11 MLMitch well I do tell my front end guy that, but he is my boss and wants it lol
21:11 trygvis saml: uhm, I would say it is very popular
21:12 saml popular, yes.
21:12 MLMitch I would say it is gaining a lot of popularity
21:12 saml ans just like file... what really matters is hypermedia
21:13 saml simple set of methods over hypermedia is rest
21:14 trygvis saml: but you wouldn't say that application/json is a hypermedia, would you?
21:15 saml no.
21:15 saml i think of json as container
21:15 saml like atom can be written as json or xml
21:21 MLMitch So I guess for our project since we are using angularjs, our php files are meant to be "processes" more so than "pages" wouldn't that make sense? I get most confused how to build/design/use an api and rest with angular which is essentially a single page app.
21:22 saml i don't know. i thought php file is a module?
21:22 MLMitch Or is it still good to design an api with pages even for angularjs?
21:24 trygvis I wouldn't bother with REST for a single page app, it's not worth the hassle. I would make sure the backend produced raw json that is easy to consume in whatever format the frontend want
21:25 trygvis what you want is a classic RPC thing, your PHP code is a remote end of a method call, expected to process some data or query some database
21:26 MLMitch The thing is our website is meant to be huge, it is a fantasy sports website we hope to open to the public. So I feel some sort of api/rest design is necessary.
21:27 MLMitch I just said single page app to compare to angularjs because from my understanding that is basicalyl how it is built? But as you can see my ignorance is showing now haha.
21:31 trygvis you can still use the caching mechanism you have in HTTP, even if you use RPC
21:31 trygvis just don't use POST for everything
21:31 trygvis but, using big stuff like "architecture", "design" and "REST" is just silly until you have something that is useful :)
21:33 trygvis but seriously, one of the major upsides by controlling both sides of a communication (like you do with the JS and PHP parts) is that you can change the protocol whenever you want to
21:38 quimrstorres joined #rest
21:39 MLMitch What do you mean exactly by useful?
21:43 trygvis well, an application that is useful by consumers. so for you, a site where you can play your fantacy sports
21:43 shrink0r_ joined #rest
21:46 MLMitch Ok, I really appreciate the help both of you, just dialogue even on the subject helps grasp the idea better and presents new alternatives. So the chat did help a lot.
21:46 trygvis shibby
21:59 Andre-B joined #rest
22:01 _ollie joined #rest
22:04 dreamdust I don't think REST is a hassle for a single page app. Your tooling sucks if it is.
22:05 MLMitch I think my real struggle is just designing an api if anything.
22:06 trygvis dreamdust: I just don't see what you will gain by the added complexity
22:06 dreamdust I'd try to find tooling that handles the REST communication for you. For example, you define your models and relationships and the REST API logic is not something you implement directly but introspected from your models
22:08 dreamdust REST reduces complexity.
22:08 trygvis at work we've made a fair amount of tooling, but it is not anywhere near RESTful
22:08 dreamdust Consistency is less complex.
22:08 trygvis REST reduces complexity if you need it
22:11 trygvis on the client side (we make a massive angularjs app) we have a single generated class to do HTTP calls for us which has a one to one mapping with our server side controller and the controllers method
22:11 trygvis Data.InvoiceController.getInvoicesF​orCompany(ctrl.company.id).then(..)
22:12 trygvis for us, that is totally awesome. no rest, lots of RPC and out of bounds data
22:12 trygvis but it works like a motherfucker and we can add features super fast
22:14 trygvis but whatever floats your boat really
22:15 dreamdust that makes sense… but you can do the same and have it RESTful. You just need the tooling to be RESTful. Invoice.get({ companyId: 123 }) just looks at a url defined in the model and GETs it. Invoice.save(…) uses the appropriate POST or PATCH, etc.
22:15 dreamdust the tooling out there for REST sucks
22:15 dreamdust at least outside of JS land it seems
22:17 dreamdust peopel should only have to work with their models and the tooling should handle the rest communication automagically
22:17 trygvis in Invoice.get(), you would send in URI template arguments?
22:18 _ollie dreamdust: such as JSF abstracts HTTP for you in Java… yes, that really works well… not :)
22:18 trygvis (I'm not arguing against REST in general, just for your average SPA)
22:19 dreamdust Not familiar with JSF… but I don't see why that won't work well. I've done this at the last 3 companies I've built services for. https://github.com/mio/mio
22:19 dreamdust If you discretely model resources and relationships all the REST comm should be able to handles automatically
22:30 quimrstorres joined #rest
22:50 shrink0r joined #rest
23:04 azr joined #rest

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

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