Most programming languages contain good and bad parts, but JavaScript has more than its share of the bad, having been developed and released in a hurry before it could be refined. This authoritative book offers a detailed explanation of the features that make JavaScript an outstanding object-oriented programming language, and warns you about the bad parts.
In the process, JavaScript: The Good Parts defines a subset of JavaScript that's more reliable, readable, and maintainable than the language as a whole. Author Douglas Crockford, a member of JavaScript 2.0 committee at ECMA, is considered by many people in the development community to be the JavaScript expert.
A beautiful, elegant, lightweight and highly expressive language lies buried under a steaming pile of good intentions and blunders, he explains. The very good ideas include functions, loose typing, dynamic objects, and an expressive object literal notation. Awful ideas include a programming model based on global variables. With JavaScript: The Good Parts, you can release this elegant programming language from its old shell, and create more maintainable, extensible, and efficient code.
The book's topics include:
* Syntax
* Objects
* Functions
* Inheritance
* Arrays
* Regular expressions
* Methods
* Style
* Beautiful features
Appendices summarize JavaScript's bad parts and awful parts. But the greatest benefit of studying the good parts is that you can avoid the need to unlearn the bad parts. If you want to learn more about the bad parts and how to use them badly, consult any other JavaScript book.
JavaScript is the language of the Web -- the only language found in all browsers -- so avoiding it altogether is not an alternative. But, whether you're managing object libraries or just trying to get Ajax to run fast, Crockford's guidance in JavaScript: The Good Parts will help you create truly effective JavaScript code.
Douglas Crockford is a Senior JavaScript Architect at Yahoo!. He is the maintainer of the JSON format, and a regular speaker at conferences on advanced JavaScript topic. He is also on the JavaScript 2.0 committee at ECMA.
Weallfindthegoodpartsintheproductsthatweuse.Wevaluesimplicity,andwhensimplicityisn’tofferedtous,wemakeitourselves.Mymicrowaveovenhastonsoffeatures,buttheonlyonesIusearecookandtheclock.Andsettingtheclockisastruggle.Wecopewiththecomplexityoffeature-drivendesignbyfindingandstickingwiththegoodparts.Itwouldbeniceifproductsandprogramminglanguagesweredesignedtohaveonlygoodparts.
——引自第100页
不像许多其他语言,JavaScript中的代码块不会创建一个新的作用域,因此变量应该被定义在函数的顶端,而不是在代码块中。
——引自第10页
HXD3B型电力机车 本书特色 本册《hxd3b型电力机车》由铁道部运输局装备部组织编写,是《和谐型机车应急故障处理系列丛书》之一,是具体针对hxd3b...
Thisvolumeof"NewDirectionsforChildandAdolescentDevelopment"examinesthereciprocal...
小桥老树畅销书作家。著有《侯卫东官场笔记》《侯海洋基层风云》和《巴国侯氏》等多部畅销书。2010年至2013年连续4年登上中国作家富豪榜。2010年和2011年...
作品目录译者的话1962年第一版序言1981年第二版序言《西藏的文明》汉译第三版赘言第一章 地域与居民一、地区与风土二、居民三、
龚鹏程,祖籍江西吉安,1956年生于台北。台湾师范大学国文研究所博士毕业。曾任淡江大学文学院院长,台湾南华大学、佛光大学创校校长,台湾学生书局总编辑,台湾行政院...
中华人民共和国香港特别行政区基本法 本书特色 为了维护国家的统一和领土完整,保持香港的繁荣和稳定,并考虑到香港的历史和现实情况,国家决定,在对香港恢复行使主权时...
小约瑟夫·奈,现代哈佛大学杰出服务教授,曾任哈佛大学肯尼迪政府学院院长,并且担任过卡特政府的副国务卿帮办,克林顿政府的助理国防部长以及国家情报委员会主席。
马丽加·金芭塔丝,20世纪女神研究最重要的学者,女神复兴运动在学术理论方面的重要代表。金芭塔丝生前任美国加州大学洛杉矶分校文化史博物馆主任,她以一位考古学家的身...
克里斯廷•肯奈利 知名记者、作家,《纽约时报》《纽约客》《时代》的特约撰稿人,所写文章题材广泛,涉猎文化、历史、商业、经济、社会、科技、哲学等领域,观点犀利,笔...
化工园区风险管理与事故应急辅助决策技术 本书特色 《化工园区风险管理与事故应急辅助决策技术》以化工园区风险管理与事故应急辅助决策技术为主要研究对象,研究了化工园...
斯蒂安·麦茨(Christian Metz,1931-1993年),法国理论家、“电影符号学之父”。1953年获德国文学文学士学位,1971年获语言学博士学位,...
作品目录第一章 建筑——陌生的事物 第二章 空间——建筑的“主角” 第三章 空间的表现方法 第四章 历代的空间形式 古希腊的空间
段钢,国内信息安全领域具有广泛影响力的安全网站看雪学院的创始人和运营管理者,长期致力于信息安全技术研究,对当前安全技术的发展有深入思考。参与和组织专业人士推出的...
● 售出2000万册的全球超级畅销书,震撼36国读者心灵的史诗巨作;● 全球媒体公认“非虚构文学的创作典范”“战争纪实的巅峰之作”;● 真实!让历经鲜血和死亡的...
对联词典(双色版) 本书特色 词典收录经典和常见常用对联1400余副,根据所收对联的意义和广大读者的使用习惯进行分类编排。每个条目中先出联语,联语下设&ldqu...
安东尼,本名马亮,英文名Antony。现居澳大利亚,原居大连。就读于墨尔本大学商业管理系。小时候曾有语言障碍,受心理医生辅导后大有好转。高中时曾只身一人到上海。...
精彩摘录财富是理解的无情敌人。——引自第1页Povertywastheall-pervasivefactofthatworld.Obviouslyitisnot...
作品目录殷夏君璐 永不能忘的日子 附:“这必死的,总要变成不死的!” 殷夏君璐 记忆的苍穹 殷夏君璐 《殷海光全集》序 殷文丽
图解针织服装CAD应用设计(附光盘) 本书特色 本书以图解方式,侧重介绍了针织服装CAD(彩路图艺设计系统针织工作模块)的操作应用及科学的设计工作程序。本书作者...
【内容简介】1939年,巴塞罗那。西班牙内战最疯狂的时期。并非谁都讨厌战争,也有些人利用战争来掩藏不可言说的秘密。那些秘密、那些冤屈的灵魂,全都据记载蒙锥克堡监...