Main

My Blog Tools Archives

February 4, 2007

script.aculo.us is cool

As a technology realist I like to try stuff out before I say how cool it is (or not). I can say script.aculo.us is cool. Over the weekend I was looking for ways to make my Blog a little cleaner and more dynamic. Please check out my (Search etc) links in the top right corner you’ll see my little widget in action. Pretty cool eh?

To say this was completely simple is an over statement. You definitely need to cut some JavaScript and CSS code. But what intrigues me is that my learning curve was the toolkit and not making this cross browser capable (tested with IE 6, 7, Opera and Firefox). Also, I was able to complete this widget with about 10 lines of code. Very impressive! Lots of good examples out there too a good sign of a well adopted toolkit. One can quickly surmise there is an excellent foundation of AJAX and JavaScript here.

Now the techi stuff… In the process of creating this widget I came to a dilemma where I needed to serialize a series of Effects. Basically I needed to make sure my menu control was done hiding before showing the new menu. (try selecting Search then Subscribe)

Through a little research I deduced two resolutions.

Resolution A - Use an afterFinish callback
new  Effect.SlideUp('inner-search', { afterFinish: function() { 
Effect.SlideDown(elem); } 
 } ); 

Resolution B - Queue up effects
new  Effect.SlideUp('inner-search');
Effect.SlideDown(elem, {queue: 'end' });

There are many ways to skin a cat, right. Here is how I made my choice. Resolution A a) Complex code b) 2 effect limit Resolution B a) Simple code b) Ability to queue up N number of effects

Recommendation: Go with Resolution B. To wrap, I will create more data points for myself but, script.aculo.us is indeed cool!

About My Blog Tools

This page contains an archive of all entries posted to Martin's Blog in the My Blog Tools category. They are listed from oldest to newest.

Identity is the previous category.

OpenSSO is the next category.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.34