DailyJS

Def.js, CSS3 Pie

Alex R. Young

Subscribe

@dailyjs

Facebook

Google+

libraries css3 oo

Def.js, CSS3 Pie

Posted by Alex R. Young on .
Featured

libraries css3 oo

Def.js, CSS3 Pie

Posted by Alex R. Young on .

Def.js

If you don't love Prototype objects and inheritance there are many
alternative options available. Mainly because prototype-based
programming is so flexible, which is ironic when you think about it.
Anyway, I found Def.js (MIT
License) today. It's written by Tobias Schneider, and aims to ape Ruby's
object model.

What I found interesting about this library is it uses a single method
to generate objects. I haven't seen this approach before, but I'm
probably just late to the party:

def('User') ({
  init: function(name) {
    this.name = name;
  }
});

def('Admin') << User ({
  init: function(name){
    __super__();
  }
});

I like the use of def('Admin') << User.

CSS3 Pie

CSS3 Pie (Apache 2.0) by Jason Johnston stands for Progressive Internet Explorer. It brings CSS3 features to IE
through IE's HTML
Components

and JavaScript. Although Modernizr is
widely used, Pie is simply focused on bringing the missing CSS3 elements
to IE.