Re:Syncify.js – Eliminates the need for callbacks in the bro...
by alttab on Sunday May 10, 2015 @03:53PM
(#9521099)
For real, this sounds like it simply allows front-end dev's to scour backend APIs and lace together really slow, really brittle web pages.
Re:Syncify.js – Eliminates the need for callbacks in the bro...
by dmak on Sunday May 10, 2015 @01:08PM
(#9520534)
Very common. RESTful architectures always give rise to this type of pattern. For example, you fetch a user id, and then you fetch all the blog posts by the user then you fetch the comments for the blog posts.
Re:Syncify.js – Eliminates the need for callbacks in the bro...
by fny on Sunday May 10, 2015 @01:38PM
(#9520635)
Very common in poorly designed RESTful architectures. Hypermedia-style APIs take care of this. [0] The performance advantage of lightweight payloads to an SPA gets trashed by network latency otherwise.
[0]: http://jsonapi.org/
Re:Syncify.js – Eliminates the need for callbacks in the bro...
by Kiro on Sunday May 10, 2015 @04:35PM
(#9521201)
How would the URL for dmak's example look?
Re:Syncify.js – Eliminates the need for callbacks in the bro...
by fny on Wednesday May 13, 2015 @01:04PM
(#9540347)
/users/1/posts?include=user,comments
Re:Syncify.js – Eliminates the need for callbacks in the bro...
by dmak on Sunday May 10, 2015 @08:07PM
(#9521995)
I don't think the structure of the response would be the dictating factor for a "poorly designed RESTful architecture". This response format no longer makes things RESTful because it lumps together so many different models. This format is more suited for command/presenter pattern (orchestration).
Wouldn't you just send a request to the server and have it handle things and spit out the correct response/return value? What's the need for multiple ajax calls?! I know we're obviously not using this to fetch first and last names - what's a realistic example for this usage pattern?