Introducing the Prototype JavaScript Library
(Page 1 of 4 )
When using JavaScript for the behavioral layer of an application, it is often preferable to arm yourself with a third-party JavaScript library. Prototype is one such prebuilt JavaScript library. This article, the first in a three-part series, introduces you to the principal functions of this popular framework.
When it comes to using JavaScript for developing the behavioral layer of a web application, you're presented with an interesting variety of options. Obviously each of one of then has its own set of pros and cons. Naturally, the first approach to take here consists simply of coding your own group of JavaScript functions, according to specific development requirements, or even using a pre-existing library, which has also been the result of your creativity and effort.
However, to be frank, this approach can be a time-consuming process, not to mention the fact that code reusability is merely discarded in favor of developing custom JavaScript routines. Definitely, this scenario should be quite familiar to many web developers out there, including yourself, of course.
On the other hand, as you may have guessed, the other logical approach to follow when building a web application is based upon picking up a third-party JavaScript library that comes packaged with enough features and goodies that allow you to tackle the most common issues that web developers have to face on a frequent basis.
Particularly, in this terrain there are some third-party packages that have emerged in the last two years, aimed at making JavaScript programming as painless as possible. Nonetheless, among the pre-built JavaScript libraries that are available these days, there's one that has caught the attention of many developers. I'm speaking of Prototype, definitely a framework that has become extremely popular due to its excellent features for developing robust AJAX-based applications and working with online forms, easily manipulating web page elements and handling arrays iterators, and so forth.
Therefore, keeping in mind that Prototype can be as useful to you as it is to me, over the course of this three-part series, I'll be showing you how to use its principal functions. I'll discuss the ones aimed at working with AJAX, using the DOM, handling events, and much more.
Hopefully, by the end of this series, you should be armed with a respectable background of how to use the neat features that come included with Prototype. This should add a boost to the development of your own web applications.
Ready to make your way in the universe of Prototype? Okay, let's do it together!
Next: Handling specific elements of a web page: introducing the $ function >>
More JavaScript Articles
More By Alejandro Gervasio