Hacker News new | ask | show | jobs
by out_of_protocol 3405 days ago
Actually pretty major release. Hopping on javascript's crazy train. It was expected anyway, there are no way to ignore js-crazyness anymore (most of the frontend toolset exists only as js implementation).

Also, Phoenix (ideological successor of rails) took this approach from the start

4 comments

Sure it's possible to ignore, via Turbolinks or similar. I have witnessed the shift back to the backend over the past year or two, including in the Phoenix community. With HTTP2 inbound and microsecond response times via Phoenix, the case for making your new app a SPA is harder to make, if you take an honest look at things. There are some benefits to be had with React Native, or Angular2 Dart + Flutter, but mobile apps are very difficult to justify, given the increased friction they cause to new users.
Hrm, can't really agree with the premise, I feel like the backend not being fast enough should never have been a significant reason to write an SPA.
Why would you build a SPA, if not for a more snappy user experience?
Not sure why http2 and SPA's are in conflict here. If anything they complement one another.
They definitely complement each other, but HTTP2 helps out with the request/response cycle and reduces latency in general, which reduces the threshold between rendering on the client and backend.
You know I used to think it's craziness, but it really makes for a much experience writing ES6 as opposed to random-ass jquery and javascript sprinkled all over the place. I've grown to love it.
Could you go into more detail on the concrete benefits?
ES6 brings to Javascript needed features that other programming languages already have had; like a cleaner way of writing classes, more basic collection classes, more tools for concurrency, the list goes on...

https://github.com/lukehoban/es6features

I'm no modern JS guru, but think of it as you get to advance the JS language, and use all the latest libraries independently of what version of JS is running on the client.

This is because you write in the latest JS syntax, which then gets converted into an older JS version (allowing greater client compatibility).

JQuery is still great if you only want some basic functionality - e.g. a datepicker, but if you're building Photoshop in the browser, then it quickly becomes complicated, and you'll find that you start attempting to build your own framework to support your development.

I mean, I don't know your tech background, but think of, like, the different between Web Forms and MVC or something.
I think the JavaScript updates are great news, enough for me to finally dive into Rails.
This release is in my opinion a life saver for Rails. Instead of forcing people to hop off the Rails train, it empowers them and let them choose their favourite JS library on top of it, while serving them hassle-free, in a very rails fashion.

Shouldn't this have been shipped in 5.1, it might have very well been a bit too late.

Welcome!
I imagine many rails developers were doing something like this anyway and just working around "the rails way" of handling frontend assets.