News for hackers. Stuff that matters.
Re:Rails is just an API by instakill on Wednesday March 21, 2012 @03:52PM (#3736266)
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.

Re:Rails is just an API by untog on Wednesday March 21, 2012 @03:54PM (#3736274)
Thing 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.
Re:Rails is just an API by virtualeyes on Wednesday March 21, 2012 @05:03PM (#3736641)
quite 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...

Re:Rails is just an API by stdbrouw on Wednesday March 21, 2012 @04:36PM (#3736475)
The 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.
Re:Rails is just an API by mark_l_watson on Thursday March 22, 2012 @06:25PM (#3742360)
A 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.