JavaScript and leaky abstractions
2006-8-24
Simon Willison talks about JavaScript libs and what is important to keep in mind about using them. I like what he has to say about using libs as crutches to handle things you do not know as a programmer: "It's basic tenet is that abstractions that are designed to save the programmer time inevitably leak, and if they leak at a lower level of abstraction than the programmer is familiar with they prove almost impossible to debug. Paradoxically, the more time saving abstractions you are using the more you actually have to know."
Also point 5 of his list had me nodding. Been there, done that: "Libraries should play well with others. Reusable code that excludes other code from being reused has severely limited long-term value. In JavaScript, that means that libraries that mess with Object.prototype or pollute global namespaces should be treated with caution. The Prototype library was a major culprit here, but thankfully has cleaned up its act (at least with regards to altering Object.prototype) in recent releases. It's all very well saying that you'll always be using code built with your core language modifications in mind, but you may well change your tune when you try to incorporate Yahoo! or Google Maps and everything breaks." - Simon Willison: Notes on JavaScript Libraries (credits go to lcom for pointing to this)
Similar
- making money of a blog
- is talking good when it's all you can do?
- when do you want something the most?
- Uhm yes, but no...
alles Bild, Text und Tonmaterial ist © Martin Spernau, Verwendung und Reproduktion erfordert die Zustimmung des Authors