Java Reference
In-Depth Information
15
JavaScript Frameworks
As you've seen in several examples in this topic, especially the latter chapters, the problem with
client-side development is the many different web browsers you have to account for. Be it writing
event-driven code or an Ajax application, somewhere down the line you'll run into the incompati-
bilities between the browsers.
Many professional developers found cross-browser development to be too time-consuming and
cumbersome to deal with on a daily basis, so they set out to develop frameworks or libraries to
aid in their cross-browser development. Some framework authors released their frameworks to
the public, and a few of them gained quite a following, like jQuery, Prototype, and MooTools.
In this chapter, you'll take a look at three of the many JavaScript frameworks available on the
Internet, and you'll learn how to use them to make your cross-browser development much easier.
Before beginning, a word of note from your authors: There is no doubt that JavaScript frame-
works add benefi t to your development time and process. But they are no substitute for a solid
understanding of the JavaScript language and the intricacies of the different browsers you have to
develop for. Frameworks and libraries come and go, but knowledge is forever.
Picking a Framework to Work With
Over the course of several years, the web has seen many JavaScript frameworks, and they can
typically be categorized into two groups: general and specialty.
The aim of general frameworks is to balance the differences between browsers by creating a new,
unifi ed API to perform general tasks like DOM manipulation and Ajax functionality. Specialty
frameworks, on the other hand, focus on a specifi c ability, such as animation. So identify what it is
you want to achieve and choose a framework based on that. For example, if you wanted to perform
animations and only animations, the script.aculo.us framework (http://script.aculo.us/)
would be a good choice for you.
Search WWH ::




Custom Search