Honestly it feels like intercooler.js is building in functionality that should exist in HTML in the first place. For example, the unintuitive "href" tag sends a GET request, and POST requests are only sent with forms and buttons. What about PUT, PATCH, OPTIONS, or DELETE? According to http://softwareengineering.stackexchange.com/a/211790 , "At this point, it seems that the main reason why there is no support for thes…
Intercooler.js – Making AJAX as easy as anchor tags
41–50 of 156 posts
Re: Intercooler.js – Making AJAX as easy as anchor tags
#42This has been reposted so many times by the author and by others that I can't help but finally ask. What's the point? This would lead to your API being comprised of blocks of HTML which are probably only useable for one product. Why not just use REST + JSON? It would take no more than five minutes to set up client-side rendering, and you could even make it attribute-based like this with barely any more effort. Is it…
It works for us because the site is extremely static…
Re: Intercooler.js – Making AJAX as easy as anchor tags
#43Re: Intercooler.js – Making AJAX as easy as anchor tags
#44This has been reposted so many times by the author and by others that I can't help but finally ask. What's the point? This would lead to your API being comprised of blocks of HTML which are probably only useable for one product. Why not just use REST + JSON? It would take no more than five minutes to set up client-side rendering, and you could even make it attribute-based like this with barely any more effort. Is it…
Thinking of almost all of the full stack, I feel like you could have more flexibility with something like Rails with Angular on the front-end. You can set up a Rails controller to return JSON or HTML depending on the request type.
Throw in UI Router and have your Angular routes match your Rails routes... You can have your pages rendered server and client side and still have the flexibility to render JSON.
It would be sick if there was a stack where you can take make your routes more functional and have the routing work clientside and serverside. I know Turbolinks is supposed to solve this problem, but it sort of messes up how events are fired.
Also, Angular templates cannot be modified on the front end... but these intercooler attributes can.
I will admit, the author is probably solving a problem that I haven't encountered or even fully understand. If people are digging it, more power to him.
Re: Intercooler.js – Making AJAX as easy as anchor tags
#45This has been reposted so many times by the author and by others that I can't help but finally ask. What's the point? This would lead to your API being comprised of blocks of HTML which are probably only useable for one product. Why not just use REST + JSON? It would take no more than five minutes to set up client-side rendering, and you could even make it attribute-based like this with barely any more effort. Is it…
The author did post a story about intercooler four times in the last 3 years. Where is the problem?
> This would lead to your API being comprised of blocks of HTML which are probably only useable for one product.
Whats the problem with that if their is no need to reuse the API, or if there is no API at all, just a bunch of uncool php scripts?
> It would take no more than five minutes to set up client-side rendering?
Is client-side rendering better per se?
> Is it really not worth spending the extra five minutes it takes to set things up in a way that is reusable and standard?
What standard do you refer to?
I think it is obvious that this lib isn't meant to be the foundation for the next facebook app, be a contender for the current hip bloatware frameworks or might be the best lib for single page apps generally. But I can see lots of use cases where this lib will help to spice up some projects without getting burden under some boatload of unnecessary tooling and boilerplate codes.
Re: Intercooler.js – Making AJAX as easy as anchor tags
#46Re: Intercooler.js – Making AJAX as easy as anchor tags
#47Disclaimer: I'm one of the original authors of Patternslib.
Re: Intercooler.js – Making AJAX as easy as anchor tags
#48This has been reposted so many times by the author and by others that I can't help but finally ask. What's the point? This would lead to your API being comprised of blocks of HTML which are probably only useable for one product. Why not just use REST + JSON? It would take no more than five minutes to set up client-side rendering, and you could even make it attribute-based like this with barely any more effort. Is it…
Re: Intercooler.js – Making AJAX as easy as anchor tags
#49Re: Intercooler.js – Making AJAX as easy as anchor tags
#50Main intercooler.js author here, glad to answer any questions. Happy to see people are enjoying it!