4 ms·
> That makes the "feels like a desktop app" experience impossible that originally was one of the major selling points of ajax. The vast majority of single-pa
by ryanbrunner 10y ago
> That makes the "feels like a desktop app" experience
impossible that originally was one of the major selling
points of ajax.
The vast majority of single-page applications I see on the internet nowadays still function in a way that would be perfectly serviceable if they were implemented without AJAX.
Absolutely there's cases where the request-response cycle doesn't map well to what actually happens in the app, but I don't think anyone is claiming that Intercooler, or serving HTML from an AJAX request, is the final answer in building web apps.
Everyone seems to forget about using the right tool for the job when the right tool is unsexy.
- xg15 10y agoWhat I don't understand is what benefit serving HTML from Ajax would bring you in the short time if you plan to switch to JSON anyway. Wouldn't that be one unnecessary backend rewrite?
- ryanbrunner 10y agoWell, a couple of things there: 1. You may not plan to switch to JSON anyway. Serving HTML, whether through a full request or AJAX can be perfectly fine. The site we're on now has no real Javascript of note, for instance. 2. You might introduce a JSON API for customers, but that doesn't mean that it needs to or even should be the same API you use internally. 3. Even assuming that you know that you'll ultimately move to a JSON API, it can be advantageous to take a quicker approach while you're still figuring out the solution. When you come back to the API, you'll have a better idea of precisely how it should be used.
- xg15 10y agoWell, those are fair points, I agree.