5 ms·
My response to this consists of a library: http://intercoolerjs.org/ http://intercoolerjs.org/ Server-side rendered HTML: an idea so crazy... It. Just. Might.
by carsongross 12y ago
My response to this consists of a library: http://intercoolerjs.org/ http://intercoolerjs.org/
Server-side rendered HTML: an idea so crazy... It. Just. Might. Work.
- Scaevolus 12y agoI like the simplicity. How does this handle CSRF tokens?
- carsongross 12y agoIt looks for the standard meta CSRF meta tag, it will include it if the request is within a form with a CSRF hidden input, and you can hook in via the usual jQuery AJAX hooks if you are doing something else.
- Procrastes 12y agoNice! I'll have to try this out in my next side project.
- CGamesPlay 12y agoGood for the simplest of "rich" interactions, but quickly drops off when responsiveness becomes a factor. For example, you cannot implement optimistic responses using this library (click the "save todo" button and the saved item immediately appear in its read-only interface; this interaction requires reimplementing your templating library and validation code on the client and the server).
- carsongross 12y agoI wouldn't dismiss it so blithely. I implemented a remote job runner UI here: http://intercoolerjs.org/examples/jobrunner.html http://intercoolerjs.org/examples/jobrunner.html You can get pretty far with it. It isn't a perfect fit for every app, but most apps have at least a few areas where using it would simplify things considerably. Also, there are a lot of nice things that are extremely easy to use that are a PITA with most other frameworks. For example, AJAX-aware history is an ic-push-url="true" away: http://intercoolerjs.org/examples/history.html http://intercoolerjs.org/examples/history.html I realize that most front end people who see this will immediately dismiss it as "simple", but it's a very rich library and can be used to accomplish an awful lot: you can fire client side events using custom HTTP headers, show and hide request indicators using only a CSS selector, etc.