Ever download a huge javascript library that did a million things, yet you only needed a very small portion of it? Sure, you may be able to extract what you need, but most of the JS code written out there isn't as modular as we would like. There are tons of global vars. Functions referencing one another, etc.
Well, the folks working on the DojoToolkit have come up with a nice way to "Lazy Load" and package Javasctript functions. A snippet from the site:
The packaging system allows you to list a single script include file, which will then find and fetch packages as they are needed for your application, from the Dojo source tree. This means in the simplest case, no build process is required, and yet there is no need to include a script tag for every script file that is to be loaded.
Additionally, the packaging system allows for the creation of a compressed package file that contains all of the script code needed for your app, no more, and no less, through an Ant build step.
Read more ...
Looks like Ruby on Rails 0.13 has been released and with this release comes 225+ features and bug fixes. One of the coolest features added to this version of Rails is he addition of the Script.aculo.us Javascript libray.
Script.aculo.us is based on the Prototype javascript library and extends the basic visual effects provided by that library to create some really cool visual effects. Effects like: Appear, Fade, Puff, SlideUp and Down, BlindUp and Down, DropOut, Shake, Pulsate, Squish, Fold, Grow, Shrink and Highlight.
Besides the cool visual effects, Script.aculo.us also provides Drag 'n Drop functionality, dynamic element sorting that saves using Ajax, Google suggest functionality which also uses Ajax and some more that I'm sure I've forgotten about. This thing is simply amazing.
When writing Javascript code (or any code for that matter), it is important to be as efficient as possible, especially if you are dealing with the DOM and doing some major document object manipulation. With the increased interest in User Scripts (a la Greasemonkey and Browser powered User Scripts) optamizing your loops and object references could have a major impact on the performance of your scripts. Read the full article.
[via: Fiftyfoureleven.com]
For those of you who read my tutorials on Leaflink and the Dashboard, you noticed that I had to make some small modifications to the Prototype javascript library to achieve the effects that I wanted. Well, it seems like I may not have to do that anymore since version 2 of the Prototype library accounts for those changes and also adds a whole new set of functionality. I love the new transitional effects added and the fine grain control over the speed and timing of them. Have a look-see at the examples:
http://mir.aculo.us/demos/effects/effects2.html