Javascript Libraries and Code-Snippets

April 6, 2008

Talking from web2.0, you think of fade effects, live form validation and other nice and often practical effects. But how are these things realized? Is it something that only professional programmer can assemble?

The only thing that would be helpful is a general understanding of Javascript and HTML. Many of the effects you may have in mind are realized by using open-source libraries or other freely available code snippets. You just have to integrate a few Javascripts and call a few functions to have a beautiful web2.0-ish effect for your website.

In my view the best library is script.aculo.us in connection with prototype.js. They are easy to understand, have a large documentation and a good community. Other libraries worth mentioning are jQuery, Dojo, MochiKit, mootools and YUI. After installing the libraries, it’s so easy to create. Make a few Ajax calls, fall back on entire functions, get some groove effects – and your code is much lighter than before! So why not try to use one of these libraries, after a bit practice you will thank yourself for taking this step.

But even if a library can’t provide you the effect you need, there always is a better way than writing everything on your own. Use some ready-made code snippets. You find them everywhere on the Internet. Snippets for some common problems are Lightbox and ThickBox, which make it possible to overlay an image or other content on the current page. Sometimes the snippets make use of a specific Javascript library. But be careful that not all libraries work well together.

To sum up, I can say that both JS libraries and code-snippets will save you a lot of time (and maybe money). So have a look at them and don’t let the complexity awe you.

Like this post? Post Comment, Download and Subscribe RSS

Leave a Comment