View unanswered posts | View active topics It is currently December 17th, 2010, 9:45 am



Reply to topic  [ 3 posts ] 
LABjs 
Author Message

Joined: June 29th, 2009, 9:23 am
Posts: 1
Post LABjs
Not sure where the best place to post about this is. Wanted to talk about your approach with LABjs.

Also, this link is busted: http://labjs.com/LABjs-0.3.js

I've written something similar based on Souder's work: http://github.com/duncanbeevers/transmi ... _loader.js

Usage is similar.
Code:
ScriptLoader.loadScripts([ 'script1.js', 'script2.js' ], function() {
// script1.js and script2.js loaded
});


Additional invocations can be peppered throughout your markup, allowing you to mingle script-load-order-dependencies with markup-dependencies.

Code:
<div id="important_div"></div>
<script type="text/javascript">ScriptLoader.observe([ 'script1.js' ], function() {
// Do important stuff now that the important div is available
});
</script>


This additional functionality is intended to promote lighting up UIs as quickly as possible (as soon as all their dependencies are filled) rather than waiting for the document:ready hook.

I like the generic handling of multiple-parameter invocations, that makes the API nice and idiot-proof. In fact, I think the whole API can probably be condensed into a single loadOrObserve entry point, hopefully one with a better name.

Since I haven't been able to actually view the source for labjs yet, I'm curious to see how the .block is implemented.


June 29th, 2009, 11:03 am
Profile E-mail
Site Admin

Joined: May 30th, 2008, 1:31 pm
Posts: 385
Location: Austin, TX
Post Re: LABjs
If this project takes off, I'll have a a forum over on labjs.com for it. This one is obviously an unrelated forum, but since you posted here I'll at least answer your questions.

Not sure where that link came from. If you can tell me, I'll correct it. The link should be:

http://labjs.com/LABjs-0.3.zip (zip, not js).

The JS file itself: http://labjs.com/LAB.js

I'd be very interested to see your code and solutions. Before doing LABjs, I had looked around and hadn't quite found what I was looking for. But if I missed yours, it'd be great for me to be able to at least see it now. Thanks for posting.

The best way to further communicate with me on LABjs is via twitter: @getify

_________________
Kyle Simpson
flensed Administrator
Getify Solutions, Inc.


June 29th, 2009, 11:25 am
Profile E-mail WWW
Site Admin

Joined: May 30th, 2008, 1:31 pm
Posts: 385
Location: Austin, TX
Post Re: LABjs
Just found that the link on labjs.com was wrong. The text said ".zip", but the link had ".js". Sorry. Thanks for the catch. Fixed now.

_________________
Kyle Simpson
flensed Administrator
Getify Solutions, Inc.


June 29th, 2009, 11:29 am
Profile E-mail WWW
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF