In this post, I give an overview over JavaScript HTML templating and list a few elegant solutions. I’ll also say which one I ended up choosing for a project of mine.
Big companies often use Content Delivery Networks (CDNs). Such a network consists of servers spread all over the world that all host the same content which ensures fast delivery. Some CDNs also host popular JavaScript libraries for the public, for free. Dave Ward gives three reasons why you might want to use such hosted libraries instead of storing them next to your own code:
Marco Arment explains how InstaPaper works its magic. In case you don’t know: InstaPaper has a bookmarklet that, when clicked on, uploads the current web page to the InstaPaper server. Afterwards, the page can be downloaded by one of the InstaPaper apps for offline reading. Naively, you would expect the bookmarklet to send the URL of the current page to the InstaPaper server which would then crawl the contents of the page. But that would not work with sites where you need to log in. Thus, Arment implemented the following hack.
John Resig has written a post on HTML5 (most people seem to write it without a space before the “5”) parsing. Before HTML5, parsing was ad-hoc. Netscape was the first popular web browser and its lenient parsing lead to many web pages containing all kinds of syntactical errors (the HTML “tag soup”). Afterwards, other web browsers mainly tried to replicate the bugs and features of the Netscape parser. Bad news: HTML5 did not opt for a much cleaner syntax. Good news: There is now a specification about how to parse HTML. It makes the tag soup the de facto standard. While it is scarily technical (you didn’t expect a grammar, did you?), it does bring stability for browser implementers.
The history of computing has seen many different ways of interacting with devices and new ones are invented frequently. This post groups these interactions into three contexts and then discusses what they mean for the future of device interaction.
Harmony is the code name of the next version of JavaScript that is currently being worked on. Brendan Eich (the creator of JavaScript) outlines what his ideal Harmony would look like.
There were a number of interesting proposals to adapt CSS layouting to the needs of GUI application developers. None of them really took off.
Some JavaScript framework authors took matters into their own hands and implemented surprisingly capable layout on top of traditional CSS. Others (such as Qooxdoo) perform layout calculations in JavaScript and recompute the layout every time they receive a resize event. That is not as smooth as relying on CSS, but leads to more capable solutions.
Palm presented Enyo, a framework that allows one to dynamically change layout depending on the size of the screen (think cell phone versus tablet).
Grid Layout
Now there is a new proposal out, by Microsoft. It is called Grid Layout. It has got everything one could wish for: Define a grid with flexible and fixed columns and rows, place your HTML elements on that grid, etc. It has the hitherto unavailable option to let content occupy the minimal space possible (e.g. vertically, in a horizontal toolbar at the top of a view). In current CSS-driven and JavaScript-driven solutions, you need to specify pixels as a work-around and that is a very fragile solution.