3 ms·
This all boils down to compatibility. You can make your webpage or webapp work on a majority of devices by rendering most of it on the server and delivering it
by cwisecarver 10y ago
This all boils down to compatibility. You can make your webpage or webapp work on a majority of devices by rendering most of it on the server and delivering it as html with javascript handling the bits that can't be handled by html/css.
Or you can make your blog, which is essentially text on a webpage, that is rendered entirely by javascript. You can have your css download as javascript and be processed and rendered by the browser ... but why? Because they're new toys?
I think our infatuation with javascript has led us to the "when you have a hammer everything looks like a nail" situation.
Javascript is great but most developers I interact with aren't writing javascript. They're writing jQuery or Ember or Angular. They don't understand javascript as a language, they understand the flavor of javascript their library of choice gives them. They don't think about the fact that sorting a table in a browser will be a problem until it hits production, with 10,000 rows, and users without the top-of-the-line hardware are screaming.
It reminds me of the Windows vs Mac debate, which is really just a debate over control. Windows didn't control the hardware it was installed on; MS couldn't be sure everything would work so there were layers upon layers of compatibility solutions. Apple controls (most) of it's hardware so it has a smaller playing field and it knows what the next commit to it's repo will do to the majority of it's users' experiences.
Javascript is the same way. As web developers, you (should) know what your servers can do. You can plan for capacity. Offloading everything to the users' browsers is just evil. Think about the kid with his $200 hand-me-down chromebook who really wants to learn about programming or the guy in Africa trying to visit your site over GPRS on his mobile phone. They shouldn't need the newest version of chrome with ES6 to view a blog entry.
There are times where a SAP is the right choice for the user. We just have to realize everything isn't a nail.
[edit: english]