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页
城市规划快题设计与表达 本书特色 《城市规划快题设计与表达(高等院校设计专业精品教材)》共分八个章节。**章,概论,介绍城市规划快题设计(以下简称快题设计)的概...
Digital video for user-centred co-design is an emerging field of design, gaining...
杨怡爽,笔名青泥,现居北京。不合格的脑力工作者一名,爱好是阅读和写作。喜爱所有天花乱坠活色生香的东西,最擅长身未动心已远式的发呆,经常一头浸浮到什么东西里就爬不...
孟景春解析古今奇症医案 本书特色 奇症医案的出处,古代的大多选自明末清初的名医,今时的有录于《中国中医药报》、《上海中医药报》、《古今名医临证金鉴》、“五部医话...
Obsessionswithcontamination,hoardingobjectsandexactorderliness,andcompulsionsinv...
叶嘉莹1924年生,1945年毕业于北京辅仁大学国文系,1954年开始在台湾大学任教, 1969年迁居加拿大温哥华,任不列颠哥伦比亚大学终身教授。1991年被授...
作者简介盐野七生1937年7月生于东京,毕业于学习院大学文学部哲学系,1963年~1968年间游学于意大利。 1968年开始执笔写作。
《黏住顾客:foursquare如何打造忠实客户群》内容简介:每个月,foursquare上会新增100万名用户,每秒钟会有23人次在上面检入(check in...
《景山的晚风:大明帝国的衰亡》内容简介:《景山的晚风:大明帝国的衰亡》讲述了明王朝残酷的君王与文官集团的拉锯战,君视臣如草
高木直子,1974年出生于日本三重县,插画家。初中一年级时,为美术课本中班本·沙恩的画所感动,糊里糊涂地立志成为一个画家。美术设计学校毕业后,进入名古屋的设计公...
[英] 法布·乔瓦内蒂(Fab Giovanetti)一位屡获殊荣的企业家、营销顾问、作家和客座讲师。法布·乔瓦内蒂是Alt营销学院和创意影响集团创始人,曾帮助...
饰面设计终极指南 本书特色 《饰面设计终极指南》涵盖了大量的精细、齐全的饰面材料图集,为设计师想法的实现提供了参考。本书在编写上将饰面材料与实际案例联系在一起,...
JGJ214-2010铝合金门窗工程技术规范 目录 1 总则2术语和符号2.1术语2.2符号3材料3.1铝合金型材3.2玻璃3.3密封材料3.4五金件、紧固件...
Reflecting the recent completion of LTEs specification, the new edition of this ...
毕业于常青藤名校布朗大学神经学专业,并在华尔街工作多年的莱恩•莱韦斯克(Ryan Levesque)于2008年孤身前往上海创业,随身只携带了一台450美元的笔...
Your web site is a business--design it like one. Billions of dollars in spending...
蔡澜,作家、电影监制、美食家、主持人。1941年8月生于新加坡,祖籍广东潮州。与金庸、黄霑、倪匡并称为“香港四大才子”。其人见识广博,吃喝玩乐、琴棋书画、文学电...
巴菲特投资一生,成为拥有500多亿美元资产的世界第二大富翁,他管理的伯克希尔公司净资产规模全球第一,是当代最成功的投资大师。古人云,大道至简。巴菲特告诉我们。真...
木结构建筑检测与评估 本书特色 “木结构建筑教学丛书”中《木结构建筑检测与评估》的主编由南京林业大学的张洋和中南林业科技大学的谢力生承担。全书共分9章,第1章概...
艾灸祛病边学边用 本书特色 本书从艾灸基础理论讲起,图文并茂而又详细、具体地讲解了各种艾灸方法、艾灸器具的使用。书中用图解的方式介绍了近百种常见病的治疗方法,以...