13.7 Client-Side Frameworks
Many web developers find it useful to build their web applications on top of a client-side framework library. These libraries are “frameworks” in the sense that they build a new higher-level API for client-side programming on top of the standard and proprietary APIs offered by web browsers: once you adopt a framework, your code needs to be written to use the APIs defined by that framework. The obvious benefit of using a framework is that it is a higher-level API that allows you to do more with less code. A well-written framework will also address many of the compatibility, security, and accessibility issues described above.
This book documents jQuery, one of the most popular frameworks, in Chapter 19 . If you decide to adopt jQuery for your projects, you should still read the chapters leading up to Chapter 19 ; understanding the low-level APIs will make you a better web developer, even if you rarely need to use those APIs directly.
The Prototype library ( http://prototypejs.org ) focuses on DOM and Ajax utilities,
like jQuery does, and adds quite a few core-language utilities as well. The Scrip
taculous library (http://script.aculo.us/ ) can be added on for animations and visual
Dojo ( http://dojotoolkit.org ) is a large framework that advertises its “incredible
depth.” It includes an extensive set of UI widgets, a package system, a data ab
straction layer, and more.
YUI YUI ( http://developer.yahoo.com/yui/ ) is the in-house library of Yahoo!, and it is used on their home page. Like Dojo, it is a large, all-encompassing library with language utilities, DOM utilities, UI widgets, and so on. There are actually two incompatible versions of YUI, known as YUI 2 and YUI 3.
Closure The Closure library ( http://code.google.com/closure/library/ ) is the client-side library that Google uses for Gmail, Google Docs, and other web applications. This library is intended to be used with the Closure compiler ( http://code.google.com/ closure/compiler/ ), which strips out unused library functions. Because unused code is stripped out before deployment, the designers of the Closure library did not need to keep the feature set compact, so Closure has a sprawling set of utilities.
13.7 Client-Side Frameworks | 339欢迎转载,转载请注明来自一手册:http://yishouce.com/book/1/27704.html