3 ms·
So what's the future for Rails? If you talk to the likes of 37Signals and GitHub, it's pjax and server side rendering. This involves fetching a partial of HTML
by instakill 15y ago
So what's the future for Rails? If you talk to the likes of 37Signals and GitHub, it's pjax and server side rendering. This involves fetching a partial of HTML from the server with Ajax, updating the page and changing the URL with HTML5 pushState.
I really hope not. Rails is awesome and I love it to bits, but I will hate to have to use a framework that is massively invested in Ajax/Pjax. The reason for this is simple: UX. Companies don't seem to understand that there's more to the world than just America and America's top-notch Internet [1]. A lot of web traffic comes from places where the connectivity is simply shit and interfaces like Quora, GMail, Twitter et al that have so much functionality with server-side JavaScript as a prerequisite make it seriously difficult to have an enjoyable experience more often than not. If you've ever tried to access Google Analytics on a 1mbps shared connection in a relatively populated office, you'll know what I mean.
Yes of course Ajax and the interactivity and convenience it offers are awesome, but they come at a massive expense, and this is something that will be very saddening if Rails starts considering it as a major part of its core sooner rather than later.
[1] Alright so it's not just America, but my point stands.
- untog 15y agoThing is, AJAX should help with this stuff. No more wasteful page reloads where 90% of the HTML is the same, etc. Granted, we don't see that all the time, but the theory is sound.
- stdbrouw 15y agoThe point of PJAX, though, is that it's super-easy to have it gracefully degrade, so I wouldn't lump it together with plain AJAX that easily.
- virtualeyes 15y agoquite the contrary, pjax reduces bandwidth and, properly implemented, reduces total # of requests (since once html, css, js, images are downloaded, you just hit the server for the content that varies; usually the page's main content area and title) can't get much leaner than that. IE 10 supports pushState(), so the future is looking bright. I's all-in now, give poor ole' JVM beast a break, it might OOME on me if I actually put it to work...
- mark_l_watson 15y agoA bit off topic, but: I find that either Rails + pjax or Clojure/Noir + pjax really hits a sweet spot of ease of coding, not too much Javascript, and an AJAXy user experience. Worth spending a little time experimenting with.