Here’s an analogy (and I don’t know how useful it is). It’s about writing JavaScript for web pages.

A beetle, for example, has a hard external skeleton, to which everything else is attached. A cat, for example, has a hard internal skeleton, to which everything else is attached. A cat is soft outside (although with teeth and claws) while a beetle is soft inside.

So what’s this got to do with JavaScript and HTML? Well, a simple HTML page spruced up with some JavaScript for say form entry is a bit like a beetle, where the HTML is the hard external skeleton.

But a complex web page, constructed mostly from JavaScript and Ajax supplied data is something else. It’s too big and complex to be supported just by HTML and the DOM. It needs some sort of skeleton. And so perhaps should be built more like a cat.
(more…)

Advertisements