Grab UI by the Handlebar

A couple weeks back, I talked about HAML and why I’m not a fan of its approach. I promised in that article that I would be following up with some discussion of how I think UI templating should work. I intended to post earlier than this, but then I dove into a fun new coding [...]

Simulated Chaining in JavaScript

What I have to talk about here is not going to be earth shattering, but it is a technique that has proved useful in a few different sites and scenarios for me. In fact, I regularly get questions regarding advanced use cases for LABjs (a parallel JavaScript loader), and invariably it comes back to something [...]

HowTo: Custom “Error” types in JavaScript

There are lots of patterns for various styles of object-oriented JavaScript. They range from the simple few-liner patterns to the complex libraries with lots of syntax sugar. Also, this great book on OO JS by Nicholas Zakas is a must-read.
However, I have to admit that I am typically not a fan of most Object-Oriented JavaScript [...]

A visual of page-load improvements (via LABjs)

If you run a website but you’re not aware of Google’s free Webmaster Tools, you need to get in the loop! These tools allow you to analyze a number of important aspects of how your site is viewed/analyzed by Google’s search engine index.
Yet, with all the power and insight these tools give, it still [...]

How LABjs speeds up DOM-ready

Last week, I asserted that DOM-ready detection sucks because there’s a chicken-and-the-egg problem where some frameworks (like jQuery 1.3.2 and before) that do DOM-ready detection have trouble detecting the “event” if the framework is loaded dynamically after DOM-ready has already occurred.
I stand by that assertion, especially now that you’ve seen the launch of LABjs 1.0, [...]

LABjs: how to deal with inline code

This is a quickie how-to post to help address a couple little gotchas you may run into when implementing LABjs onto your site.
Consider standard page code like this:

<script src=”framework.js”></script>
<script src=”myscript.js”></script>
<script>
myscript.init();
</script>
<script>
framework.init();
framework.doSomething();
</script>

In this example, “myscript.init” is a function that is defined in “myscript.js”, and “framework.init” and “framework.doSomething” are both defined inside [...]

Posted in: JavaScript by getify No Comments ,