Activate your free membership today | Log-in

Thursday, September 25th, 2008

Pi.js: Simple JavaScript Library

Category: JavaScript, Library

Azer Koculu has released his Pi.js framework, which is a lightweight system that includes a minimal set of modules, and the ability to use and provide plugins.

By default you get:

  • pi.env: browser detection
  • pi.get: DOM access
  • pi.util: Extensions to JavaScript (e.g. support currying, includes, viewport config, and more)
  • pi.base: OO subsystem
  • pi.element: Create and modify the DOM
  • p.xhr: Remoting
  • Extensions to native objects such as Array, Function, Number, and String

There are then plugins to provide functionality such as Comet support, and a storage wrapper.

Pi has been used in the excellent Firebug Lite update that Azer worked on.

Posted by Dion Almaer at 6:04 am
12 Comments

+++--
3 rating from 29 votes

12 Comments »

Comments feed TrackBack URI

whats the fuzz ?

Comment by Montago — September 25, 2008

Who would use this framework?

I took a quick look at the documentation and I didn’t find anything interesting/different/cool. Apologies if I missed something obvious.

Comment by ragjunk — September 25, 2008

How about a slickspeed competition?

Comment by Aimos — September 25, 2008

pi.env = {
ie: /MSIE/i.test(navigator.userAgent),
ie6: /MSIE 6/i.test(navigator.userAgent),
ie7: /MSIE 7/i.test(navigator.userAgent),
ie8: /MSIE 8/i.test(navigator.userAgent),
firefox: /Firefox/i.test(navigator.userAgent),
opera: /Opera/i.test(navigator.userAgent),
webkit: /Webkit/i.test(navigator.userAgent)
};

Oh, boy!

Comment by eyelidlessness — September 25, 2008

Holy crip it’s a crapple:
.

var MyForm = new pi.element("form").attribute.addClass("MyForm").child.add(
new pi.element("label").update("Username:"),
new pi.element("input").attribute.set("type","text"),
new pi.element("button").event.addListener("click",function(){
alert("Hello World!");
}).update("Submit")
).insert(document.body);

.
.
to create:

Username:

Submit

Comment by TNO — September 25, 2008

Ajaxian fail…corrected result from above code:

to create:
<form class=”MyForm”>
<label>Username:</label>
<input type=”text”>
<button>Submit</button>
</form>
</code>

Comment by TNO — September 25, 2008

looks good, but can u give the sample. i confuse how to use it.
fari, programmer of bikini girls

Comment by farisalom — January 4, 2009

Well look not bad, but if you look deep inside…nothing special there.
oldtimerock, working for indian sildenafil viagra

Comment by oldtimerock — March 18, 2009

Abercrombie And Fitch Abercrombie And Fitch Abercrombie And Fitch
Fix it Fix it Fix it
Columbia Sportswear Columbia Sportswear Columbia Sportswear
Pandora Jewelry Pandora Jewelry Pandora Jewelry
wedding dresses Wedding Dresses wedding dresses

Comment by pop530 — February 22, 2010

Fitch store in general Abercrombie And Fitch , everything a good matrimony before marriage have nothing to retain the preceding “female mad batch -Abercrombie” part of the two is the first home in new york city a horde promotion sportswear for men and it is a successful lawyer, that is, fitch.Ezra fitch in a charge over a very intricate to read from the abercrombie is obstinate to read and long abercrombie & fitch. He’s also very good brandAbercrombie Clothing, including Abercrombie Sale and Abercrombie And Fitch Clothing, Abercrombie and Fitch Hoodies, Abercrombie and Fitch Jeans. Has become a fashionable personage’s first choice,Abercrombie and Fitch Pants is all over the world, of course, is also expected toAbercrombie and Fitch Tees.
New Year was coming, everyone wants new clothes to disguise themselves,Abercrombie and Fitch Shorts is a good choice. BecauseAbercrombie and Fitch Sweaters is a well-known brand,Abercrombie and Fitch Outerweareverywhere, abercrombie is very much a Cheap Abercrombie. There has Abercrombie and Fitch Polos, Abercrombie Womens andAbercrombie and Fitch Shirt. Personally, I’m looking forward to Abercrombie Hollister’s 2009 New Arrivals, such as Abercrombie Ruehl No.925 like this style.
Fitch store in general Abercrombie And Fitch , everything a good matrimony before marriage have nothing to retain the preceding “female mad batch -Abercrombie” part of the two is the first home in new york city a horde promotion sportswear for men and it is a successful lawyer, that is, fitch.Ezra fitch in a charge over a very intricate to read from the abercrombie is obstinate to read and long abercrombie & fitch. He’s also very good brandAbercrombie Clothing, including Abercrombie Sale and Abercrombie And Fitch Clothing, Abercrombie and Fitch Hoodies,Abercrombie and Fitch Jeans. Has become a fashionable personage’s first choice,Abercrombie and Fitch Pants is all over the world, of course, is also expected toAbercrombie and Fitch Tees.
New Year was coming, everyone wants new clothes to disguise themselves,Abercrombie and Fitch Shorts is a good choice. BecauseAbercrombie and Fitch Sweatersis a well-known brand,Abercrombie and Fitch Outerwear everywhere, abercrombie is very much a Cheap Abercrombie. There has Abercrombie and Fitch Polos, Abercrombie Womens andAbercrombie and Fitch Shirt. Personally, I’m looking forward to Abercrombie Hollister’s 2009 New Arrivals, such as Abercrombie Ruehl No.925 like this style.

Lace Wigs
Wedding Dresses
ugg boots

Comment by CYJisGod — March 3, 2010

ED Hardy Hoodies ED Hardy Hoodies
Ed Hardy Swimwear Ed Hardy Swimwear
ed hardy tops ed hardy tops
ed hardy shoes ed hardy shoes
ed hardy t shirt ed hardy t shirt
ed hardy shirts ed hardy shirts
christian audigier christian audigier
ed hardy kids ed hardy kids
Ed Hardy Sunglasses Ed Hardy Sunglasses
ED Hardy belts ED Hardy belts
ed hardy Bags ed hardy Bags
ed hardy purse ed hardy purse
ed hardy mens ed hardy mens
ed hardy womens d hardy womens
ed hardy mens shirts ed hardy mens shirts
ed hardy mens tops ed hardy mens tops
ed hardy mens hoodies d hardy mens hoodies
ed hardy mens swim trunks ed hardy mens swim trunks
ed hardy mens shoes ed hardy mens shoes
ed hardy womens swimwear ed hardy womens swimwear
ed hardy womens t shirt ed hardy womens t shirt
ed hardy womens tops ed hardy womens tops
ed hardy womens pants ed hardy womens pants
ed hardy womens hoodies ed hardy womens hoodies
ed hardy womens shoes ed hardy womens shoes
ed hardy womens clothing ed hardy womens clothing

Comment by CYJisGod — March 9, 2010

Links of London
links of london
links of london

Comment by LinksLondoncharms — March 17, 2010

Leave a comment

You must be logged in to post a comment.