inicio mail me! sindicaci;ón

Archive for Javascript

Lazy Loading and Packaging of Javascript (DojoPackageSystem)

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 ...

Ruby on Rails 0.13 and Script.aculo.us

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.

Writing Efficient Javascript Code

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]

Ajax Frameworks, qooxdoo and Rico Toolkits

  • AJAX Frameworks - The folks over at AjaxPatterns.org have been putting together a list of all the known Ajax frameworks. I didn't know there were so many of them and the list is growing. If you know of any which aren't on the list (or are creating one yourself), either just edit the Wiki and add it or contact the site to have them add it.
  • qooxdoo - I have no idea what the title means or even how to pronounce it, but I am very impressed at what it can do. As quoted from the website:

    qooxdoo is an advanced open-source javascript based toolkit. qooxdoo continues where simple HTML is not enough anymore. This way qooxdoo can help you to get your rich web application interface done - easier than ever before. Read more...

    If you've ever seen Bindows, qooxoo is very similar to that. You should definitely check out the demos to get a better feel of what can be done with this thing. Very impressive.

  • Rico - Rico is a javascript library packed with some very nice features:
    • AJAX SUPPORT
    • DRAG AND DROP
    • CINEMATIC EFFECTS
    • BEHAVIORS

    Rico uses the Prototype library to do most of its cinematic effects. Now if only the developers of Rico, Prototype and Effects V2 would combine their efforts and put together a really nice framework. Even if they don't, each library can be used independantly or together to create some very rich internet applications. Nice.

Prototype Effects V2

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

« Previous entries · Next entries »