JavaScript: The Good Parts(影印版)
JavaScript: The Good Parts(影印版)
Douglas Crockford
出版时间:2009年01月
页数:153
大多数编程语言包含优良和拙劣的部件,但对JavaScript而言后者的比重较大,因为它在匆忙中开发和发布,还没能够得到精炼。这本权威的书剔除了大多数可怕的JavaScript特性,展现了JavaScript的另一部分,这一部分比JavaScript语言作为一个整体更加稳定、更具有可读性以及可维护性 —— 可以用这个部分创建真正可扩展的和高效的代码。

作者Douglas Crockford(他被很多开发社区认为是JavaScript专家)提出了足够多的好想法,让JavaScript成为一个杰出的面向对象编程语言。不幸的是,这些好想法(比如函数、弱类型、动态对象和表达能力很强的对象文字注释)被掺杂了些坏想法(比如基于全局变量的编程模型)。

当Java Applet陨落的时候,JavaScript成为了Web编程的缺省语言,但它的流行程度跟它作为一个编程语言的质量完全没有关系。在《JavaScript:The Good Parts》一书中,Crockford深度分析了一堆好的意图和盲目的错误,为你提供了所有JavaScript的地道优良部分的细节,包括:

* 语法
* 继承
* 方法
* 对象
* 数组
* 风格
* 函数
* 正则表达式
* 美丽的特性

使用《JavaScript:The Good Parts》一书, 你会发现一个美丽、优雅、轻量级和具有很强表达能力的语言,让你创造有效的代码,无论你正在管理对象库,还是只是试着让Ajax快速运行。如果你为Web开发站点或者应用程序,那么这本书是绝对必需的。

Douglas Crockford是雅虎的高级JavaScript架构师,他以发明和维护JSON(JavaScript对象注释)而闻名。他经常在JavaScript高级主题的会议上发言,也是ECMAScript委员会的成员。
  1. Preface
  2. 1. Good Parts
  3. Why JavaScript?
  4. Analyzing JavaScript
  5. A Simple Testing Ground
  6. 2. Grammar
  7. Whitespace
  8. Names
  9. Numbers
  10. Strings
  11. Statements
  12. Expressions
  13. Literals
  14. Functions
  15. 3. Objects
  16. Object Literals
  17. Retrieval
  18. Update
  19. Reference
  20. Prototype
  21. Reflection
  22. Enumeration
  23. Delete
  24. Global Abatement
  25. 4. Functions
  26. Function Objects
  27. Function Literal
  28. Invocation
  29. Arguments
  30. Return
  31. Exceptions
  32. Augmenting Types
  33. Recursion
  34. Scope
  35. Closure
  36. Callbacks
  37. Module
  38. Cascade
  39. Curry
  40. Memoization
  41. 5. Inheritance
  42. Pseudoclassical
  43. Object Specifiers
  44. Prototypal
  45. Functional
  46. Parts
  47. 6. Arrays
  48. Array Literals
  49. Length
  50. Delete
  51. Enumeration
  52. Confusion
  53. Methods
  54. Dimensions
  55. 7. Regular Expressions
  56. An Example
  57. Construction
  58. Elements
  59. 8. Methods
  60. 9. Style
  61. 10. Beautiful Features
  62. Appendix A. Awful Parts
  63. Appendix B. Bad Parts
  64. Appendix C. JSLint
  65. Appendix D. Syntax Diagrams
  66. Appendix E. JSON
  67. Index
书名:JavaScript: The Good Parts(影印版)
作者:Douglas Crockford
国内出版社:东南大学出版社
出版时间:2009年01月
页数:153
书号:978-7-5641-1447-3
原版书出版商:O'Reilly Media
Douglas Crockford
 
Douglas Crockford是一名来自Yahoo!的资深JavaScript架构师,以创造和维护JSON (JavaScript Object Notation) 格式而为大家所熟知。他定期于各类会议上发表有关高级JavaScript的主题演讲,并且他也是 ECMAScript 委员会的成员之一。
Douglas Crockford is a senior JavaScript architect at Yahoo! who is well known for
discovering and popularizing the JSON (JavaScript Object Notation) format.He is
the world’s foremost living authority on JavaScript.He speaks regularly at conferences
about advanced web technology, and he also serves on the ECMAScript
committee.
 
 
The animal on the cover of JavaScript: The Good Parts is a Plain Tiger butterfly
(Danaus chrysippus).Outside of Asia, the insect is also known as the African
Monarch.It is a medium-size butterfly characterized by bright orange wings with six
black spots and alternating black-and-white stripes.
Its striking looks have been noted for millennia by scientists and artists.The writer
Vladimir Nabokov—who was also a noted lepidopterist—had admiring words for
the butterfly in an otherwise scathing New York Times book review of Alice Ford’s
Audubon’s Butterflies, Moths, and Other Studies (The Studio Publications).In the
book, Ford labels drawings made previous to and during Audubon’s time in the 19th
century as “scientifi-cally [sic] unsophisticated.”
In response to Ford, Nabokov writes, “The unsophistication is all her own.She
might have looked up John Abbot’s prodigious representations of North American
lepidoptera, 1797, or the splendid plates of 18th- and early-19th-century German
lepidopterists.She might have traveled back some 33 centuries to the times of Tuthmosis
IV or Amenophis III and, instead of the obvious scarab, found there frescoes
with a marvelous Egyptian butterfly (subtly combining the pattern of our Painted
Lady and the body of an African ally of the Monarch).”
While the Plain Tiger’s beauty is part of its charm, its looks can also be deadly.
During its larval stages, the butterfly ingests alkaloids that are poisonous to birds—
its main predator—which are often attracted to the insect’s markings.After ingesting
the Plain Tiger, a bird will vomit repeatedly—occasionally fatally.If the bird lives, it
will let other birds know to avoid the insect, which can also be recognized by its
leisurely, meandering pattern of flying low to the earth.