JavaScript: The Definitive Guide, Sixth Editio javaScript权威指南(第6版) pdf 文字版-文字版, javascript电子书, 和javascript 有关的电子书:

13.7 Client-Side Frameworks

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.

There are many JavaScript frameworks other than jQuery—many more than I can list here. Some of the best known and most widely used open source frameworks include:

Prototype

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

effects.

Dojo

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.

GWT GWT, the Google Web Toolkit ( http://code.google.com/webtoolkit/ ), is a completely different kind of client-side framework. It defines a web application API in Java and provides a compiler to translate your Java programs into compatible client-side JavaScript. GWT is used in some of Google’s products, but it is not as widely used as their Closure library.

13.7 Client-Side Frameworks | 339

欢迎转载,转载请注明来自一手册:http://yishouce.com/book/1/27704.html
友情链接It题库(ittiku.com)| 版权归yishouce.com所有| 友链等可联系 admin#yishouce.com|粤ICP备16001685号-1