Closure the definitive guide
If you're ready to use Closure to build rich web applications with JavaScript, this hands-on guide has precisely what you need to learn this suite of tools in depth. Closure makes it easy for experienced JavaScript developers to write and maintain large and complex codebases -- as Google has d...
Otros Autores: | |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Sebastopol :
O'Reilly
[2010]
|
Edición: | 1st edition |
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009628460106719 |
Tabla de Contenidos:
- Copyright; Table of Contents; Foreword; Preface; My Experiences with Closure; Audience; ECMAScript Versus JavaScript; Using This Book; Conventions Used in This Book; Using Code Examples; Safari® Books Online; How to Contact Us; Acknowledgments; Chapter 1. Introduction to Closure; Tools Overview; Closure Library; Closure Templates; Closure Compiler; Closure Testing Framework; Closure Inspector; Closure Design Goals and Principles; Reducing Compiled Code Size Is Paramount; All Source Code Is Compiled Together; Managing Memory Matters; Make It Possible to Catch Errors at Compile Time
- Code Must Work Without CompilationCode Must Be Browser-Agnostic; Built-in Types Should Not Be Modified; Code Must Work Across Frames; Tools Should Be Independent; Downloading and Installing the Tools; Closure Library and Closure Testing Framework; Closure Templates; Closure Compiler; Closure Inspector; Example: Hello World; Closure Library; Closure Templates; Closure Compiler; Closure Testing Framework; Closure Inspector; Chapter 2. Annotations for Closure JavaScript; JSDoc Tags; Type Expressions; Simple Types and Union Types; Function Types; Record Types; Special @param Types
- Specifying optional parametersOptional parameters; Variable number of parameters; Subtypes and Type Conversion; The ALL Type; JSDoc Tags That Do Not Deal with Types; Constants; Deprecated Members; License and Copyright Information; Is All of This Really Necessary?; Chapter 3. Closure Library Primitives; Dependency Management; calcdeps.py; goog.global; Finer details of goog.global; COMPILED; goog.provide(namespace); Motivation behind goog.provide(); goog.require(namespace); goog.addDependency(relativePath, provides, requires); Function Currying; goog.partial(functionToCall, ...)
- goog.bind(functionToCall, selfObject, ...)Exports; goog.getObjectByName(name, opt_object); goog.exportProperty(object, propertyName, value); goog.exportSymbol(publicPath, object, opt_objectToExportTo); Type Assertions; goog.typeOf(value); goog.isDef(value); goog.isNull(value); goog.isDefAndNotNull(value); goog.isArray(obj); goog.isArrayLike(obj); goog.isDateLike(obj); goog.isString(obj), goog.isBoolean(obj), goog.isNumber(obj); goog.isFunction(obj); goog.isObject(obj); Unique Identifiers; goog.getUid(obj); goog.removeUid(obj); Internationalization (i18n); goog.LOCALE
- goog.getMsg(str, opt_values)Object Orientation; goog.inherits(childConstructorFunction, parentConstructorFunction); goog.base(self, opt_methodName, var_args); goog.nullFunction; goog.abstractMethod; goog.addSingletonGetter(constructorFunction); Additional Utilities; goog.DEBUG; goog.now(); goog.globalEval(script); goog.getCssName(className, opt_modifier), goog.setCssNameMapping(mapping); Chapter 4. Common Utilities; goog.string; goog.string.htmlEscape(str, opt_isLikelyToContainHtmlChars); goog.string.regExpEscape(str); goog.string.whitespaceEscape(str, opt_xml)
- goog.string.compareVersions(version1, version2)