Transparent Javascript
There is this fairly recent notion about making “transparent Javascript”. The idea is that you don’t complicate your markup with Javascript and keep it all in include .js files. The JS files identify various spots in your pages via IDs or classes and attach event handlers at some point on page load time.
So far I’m not a fan. I might warm up to it later, but I’ve been working with it so far and its really hard for me to tell where the code is for anything. I’ve got some piece of HTML, but finding out what it actually does or how to fix it when it stops doing what its supposed to is a pain. Just too “transparent”.
Its similar to various MVC patterns. Good factoring of code can be a really good thing. It can be crucial to build big projects that you can maintain. And I really do like the concept of keeping the HTML clean so that designers can work it it more easily without messing with script all over the place. But abstractions can go too far. I’m also not a fan of the purist MVC models- I’d rather have something that doesn’t abstract so much that its hard to trace the actual code execution.
posted in Technology, Developers, Software | 0 Comments