Too much fucking abstraction

You know what the problem with Rails Ajax helpers is? It’s not that they’re done wrong. Well, up until 3 they were done VERY wrong. But in the upcoming Rails 3, they adopted a set of practices popularly known as UJS (Unobtrusive JavaScript, I guess). Which is short for “JavaScript done right”, and nothing particularly groundbreaking since people who know their JS/HTML have been doing that for a while. Though it’s definitely a step in the right direction in you consider where things were before with embedded JS going all over the place.

But the problem is this: it’s still too much fucking abstraction. It seems like a good idea. It’s there so people who don’t know JS can use Ajax, right? Were Rails merely abstracting browser incompatibilities, for instance, I’d be buying Rails UJS t-shirts and wearing them at meetups. But that’s already done by libraries such as jQuery, or Prototype. And that is the level you want to work at.

These libraries are OK because 1) they abstract differences between browsers, specifically DOM and events related stuff, and 2) they give you a few constructs for building proper proper JS apps with less code. See what I coined when I said “JS apps”? You can’t build those with Ajax helpers. So if you only know JS through Rails helpers, make that your next objective as a developer: learn how to use either jQuery or Prototype properly.

Other frameworks such as ASP.NET, Spring, and GWT, also offer Ajax helpers, either directly or through libraries. Having worked with developers coming from all those 3 backgrounds, I have to say: it’s scary. If a task falls outside the realm of what the framework offers, either the fix will be VERY ugly, or they won’t be able to come up with one. That’s what happens when you’re out to build front-end centric applications without the slightest understanding of how the underlying tech works.

On a more philosophical level, this discussion illustrates a human problem: the more you abstract, the less you know. As a knowledge-hungry programmer though, you should strive to tune your throughput equation to stay as close as possible to the core concepts while retaining as much development speed as you can.

  1. gerald-dolfay reblogged this from julio-ody
  2. jose-bettinson reblogged this from julio-ody
  3. colby-lango reblogged this from julio-ody
  4. oliver-conelli reblogged this from julio-ody
  5. debbie-rivinius reblogged this from julio-ody
  6. kemberly-furtado reblogged this from julio-ody
  7. rigoberto-nickson reblogged this from julio-ody
  8. von-ode reblogged this from julio-ody
  9. lyman-principe reblogged this from julio-ody
  10. cierra-glasgow reblogged this from julio-ody
  11. julio-ody posted this