JS Frameworks

I’ve been using JQuery quite a bit recently and I just love how easy it is get stuff done.

Not necessarily difficult stuff either, but being able to do in three lines of code what would take at least 50 lines for me to write by hand, is very nice.

I’ve seen all kinds of very pursuasive agruments online about the evils of using JS frameworks (or Frameowrks of any flavour, I guess), which mainly say that if you can’t code it yourself by hand, then you shouldn’t be using a framework anyway.

I think this is a weirdly masochistic (and arrogant) stance to take. I wonder how many of those coders who write everything by hand drive cars. And of those, how many built their car by hand? But perhaps that’s not a fair comparison. After all, car drivers are “users” of the product, and we don’t expect users of our sites to be web developers just to be qualified to use them.

So how about car mechanics? Does the average grease monkey tool every part they use by hand? And do they braid the wires themselves from copper wire they also drew? I don’t think so. They go to the parts catalogue and buy the parts they need, ready made, to finish the job. And I’m sure they don’t lose much sleep wondering if people think any less of them for doing so.

Sure there are machinists out there who can, and do, make those parts from scratch. But in the JS Framework analogy, those are the same code monkeys who write the frameworks in the first place which the rest of us use.

For me it’s simply a question of productivity. What’s better? To spend a whole day finely crafting a brilliant bit of JS? Or spending 15 minutes getting the job done in JQuery?

4 Comments »

  1. Zooba said,

    June 20, 2008 @ 6:45 pm

    I’m definitely from the “you should be able to do it yourself” camp, though I have no problem using frameworks that are better written than mine. Being able to manually create a linked list or hash table (for example) gives you a much better understanding of how to use them and how they will react in different situations (granted you can be told all this, however, being able to do it yourself also gives you the ability to create a highly specific version if necessary, which occasionally it is).

    My preferred car analogy (which I prefer because it backs up my argument and not yours) is that while users can get away with using an automatic and not knowing how it all works underneath, a developer/mechanic should understand how the entire car works at a deeper level than “remove , buy identical part, replace part”.

  2. Xavier Shay said,

    June 23, 2008 @ 2:44 pm

    The biggest win for me is cross browser compatibility.
    Can you tell me how pageX and clientX work in IE/FF?
    What about complex event handling?
    What about IE memory leaks in said handling?

    I really don’t care. I just want it to work. Cross browser code isn’t interesting, isn’t fun, and doesn’t make you a better coder.

    Making awesome apps, that’s what makes you a better coder.

  3. Mark said,

    June 26, 2008 @ 11:47 am

    Yep,

    I use Prototype and Scriptaculous and there’s simply no reason to write the sorts of cross browser event handling and effects js in them by hand.

    They actually encourage me to dig into the language even more, Prototype for example adds / modifies existing native objects and functions and improves on them. In this way it helped me to look closer at metaprogramming and actually expand on the capabilities of the native objects themselves.

    I’m a big fan of javascript frameworks.
    A new one takes an interesting turn in dropping support for IE6 http://www.sproutcore.com/ I think this framework may be taking the technology a bit too far.

    The web isn’t the desktop - and when the javascript framework is this mammoth thing to try and get desktop like features I think it’s crossing the line.

  4. Lucien said,

    June 26, 2008 @ 12:15 pm

    Isn’t SproutCore apples answer to Flash and Silverlight? Interesting that they don’t support an MS product.

RSS feed for comments on this post

Leave a Comment