-
Industrial strength asset packaging in Ruby

BEFORE

AFTER
In the process of getting my first major Ruby application out the door, I’ve been assessing the various asset packaging systems. Asset packaging offers a number of advantages on production websites, including obfuscation through compression of CSS and JS files, and embedding of images and fonts. The biggest advantage however is the speed gained by reducing the number of bits sent to the client from the server.
Jammit offers all of this in a nice ruby friendly gem. It can compress your JS and CSS using either Yahoo’s YUI Compressor, or Google’s Closure. I chose Closure, but installed both (YUI Compressor gem and Closure Compiler gem) in case I decided to change.
Another benefit of Jammit is it’s ability to provide GZIP’d assets if supported. Fonts and images are embedded using Base64, and IE compatibility is provided using MHTML.
All of this is packed up nicely in a small gem. All you have to provide is a small configuration file in the form of YAML, specifying the files to compress and few other options, and it’s all good to go.
I’ve seen amazing performance gains even just in development, especially where webpages have lots of small images referred to in CSS, and with a number of @fontface rules. Admittedly, the results pictured above show development (un-minified) Javascript libraries. However, I’m impressed by the simplicity of installation, and by the gains I’m seeing in development so far. Check it out, and let me know your thoughts.
-
Apple Showcases HTML5 & CSS3 →
These examples are outstanding.
Safari’s typography support is stunning. This could effectively kill other typography solutions like SIFR. And I wonder what it will do to Typekit’s business model?
-
I love the visualization these guys came up with for this. You can read more about how they achieved this using Sass (syntactically awesome stylesheets). I’ve been using Sass for a while now in my Rails projects, and while I love some of the benefits, I’m not totally convinced. I do find myself straying back to plain old CSS syntax from time to time, and I haven’t put my finger on why I’m doing this. Sass has a big brother called Haml, which I’ve used also, but I like it less. It’s probably the fact that Sass is intrinsically tied to Haml, that unconsciously grates on me. I do applaud the efforts of Hashrocket on these DSLs though.
-
Safari 5 →
Both Safari 5 and Rails 2.3.8 released this week. It’s like two Christmases at once! HTML5, Forms 2.0 and CSS3 here I come.
Safari 5 has some major new features:
- Reader (try it on Wikipedia),
- greater HTML5 support, faster rendering,
- additional search engine support (Bing and Yahoo!); and
- a new extensions system supporting HTML/CSS/JS plugins (like FF has had forever).




I’ve installed Safari 5, and I’ve noticed a big difference in rendering on some sites - especially sites constructed using well formed HTML. Rendering of HTML5 seems blazingly fast - and has really given me the impetus to start using it wherever I can.