Archive for the ‘CSS’ Category

OOCSS for JavaScript Pirates

November 15th, 2010

A few weeks back I had the awesome opportunity to speak at the jQuery Conference in Boston. A colleague, Boaz Sender, encouraged me to propose a topic, but I couldn’t help wondering, “What could a dojo enthusiast possibly speak about at a jQuery conference?”

Speak about dojo? Uh, no way. That wouldn’t fly.

How about something about pure JavaScript? Maybe I could extract a feature of cujo.js and turn it into a jQuery plugin! … Nah, that’ll take too long. No time.

Wait! OOCSS! It’s applicable to all JavaScript development!
Read more…

CSS, jQuery, Non-programming, OOCSS

cujo.js — OOJS, OOCSS, and OOHTML — Part 1 (OOCSS for Engineers)

August 31st, 2010

One of the coolest concepts in cujo.js is the introduction of Object-Oriented CSS into the Views and Widgets. I’ve seen several engineer’s eyes glaze over when I mention OOCSS, but don’t dismiss it as just a rehashed retelling of how to structure your CSS. OOCSS is a very powerful and efficient tool, especially when used in conjunction with Object-Oriented JavaScript and inheritable HTML templates.

I’d love to dive right in and show you how it all works in cujo.js, but you’ve got to have a firm understanding of OOCSS for any of it to make sense. Let’s get started…

Read more…

CSS, cujo.js, In-browser MVC, Inheritance, Javascript, OOCSS

Firefox’s proposed Resource Packages spec blows!

August 3rd, 2010

It’s no secret that one of the keys to a decent user experience is a responsive (fast) user interface. And the most critical component to a fast web app is minimizing the HTTP requests. So it’s no mystery that people are working on ways to solve this problem.

Firefox, of course, is one of the leaders in this area. Their proposal started out fine. Here’s a sample of what it would look like (if you didn’t read the article):

<link rel="resource-package" 
               images/info.png" />

You specify that the file, /static/”, contains the listed resources. JavaScript, CSS, and images. (I imagine SWFs and videos would also be options.)

But for some reason, this concise, nearly-valid implementation was trashed in favor of a terse, unfamiliar, and nearly unusable alternative. Here’s what the spec looks like now:

<html packages='[ img1.png script.js styles/style.css]

In this bastardization, the packages are specified as an attribute on the document element (<html> tag). Package definitions in the packages attribute are delimited by square brackets, and the resources within them are delimited by spaces.

WTF? Not only is this ugly and non-standard, but it also has some serious drawbacks. Here’s why:

Read more…

CSS, cujo.js, dojo, HTML / DHTML, In-browser MVC

It’s official: the Cujo Project is underway

June 9th, 2010

I’ve teased.

I’ve threatened.

I’ve promised.

The Cujo Project is finally underway.
Read more…

CSS, cujo.js, Javascript