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页
藏医药学创新巨匠 内容简介 《藏医药学创新巨匠》从藏医学历史发展的角度简介绍做出过杰出贡献的十三位历史人物及一位现代创新人物。生平成就,创新内容,简明扼要,通俗...
《别独自用餐》是法拉奇的第一部作品,也是一本畅销书。法拉奇用亲身经历讲述了一个来自贫穷家庭的孩子,从给人当球童起,悟出人际交往和人脉对成功的重要性。这让他在寻求...
本书的灵感来源于无聊与迷恋的感觉:对常规的数据结构与算法介绍的无聊,对复杂系统的迷恋。数据结构的问题在于教师在教授这门课程的时候通常不会调动起学生的积极性;复杂...
Examiningthepoetsviewofthehumanbodyandissuesofembodiment,Colwellprovidesanaccess...
渔业装备与工程用合成纤维绳索 本书特色 石建高编的《渔业装备与工程用合成纤维绳索》详细介绍了渔业装备与工程用合成纤维绳索基础知识、聚烯烃纤维生产工艺、绳纱生产工...
作品目录【第58集】第545話 不死軍團!!第546話 新舊影對決第547話 有價值的東西第548話 鳴人 vs 鼬第549話 鼬的提問第55
吉娜 基廷(Gina Keating)记者、专栏作家,为路透社和国际联合通讯社工作了近十年。她的文章经常见诸报端,曾为《福布斯》等杂志兼职撰稿。
中华人民共和国民法典总则编解读 本书特色 由参与立法工作的专家编写的逐一条文解读 运用**手立法材料,准确、全面、深入解析法律内容 逐条解释立法原意和立法背景,...
疑难杂症一扫光-很灵很灵的中药方 本书特色 《很灵很灵的中药方,疑难杂症一扫光》介绍了疑难病医案168个,方剂130首,其中名方47首,自拟方83首,内科、外科...
作品目录前序 我写今之侠者的动机第一部 空手道一 差一点就要发生的格斗二 煮酒论武林三 爆发了的格斗第二部 石头拳第三部 铁线
身份重要还是真爱永恒?面对现实还是抱持理想主义?一场车祸案引发的美国非法药物交易大揭秘,一个关于第二故乡与移民身份的凄美爱情故事。旅美作家长篇小说处女作,小说连...
免疫学原理 内容简介 《免疫学原理(第四版)》为教育部研究生办公室推荐的研究生教学用书,也是一本水平相当的参考书即免疫学高级教程。全书共分三部分(免疫系统、免疫...
蒋寅,1988年毕业于南京大学中文系,现为中国社会科学院文学研究所研究员,博导。华南师范大学特聘教授。
Shanghai, a dynamic world metropolis, is home to a multitude of religions, from ...
AyouthsatuponalogbyaclearstreamintheValleyofVirginia,mendingclothes.Heshowedskil...
作者简介唐浩明,湖南衡阳人,1946年出生,文学硕士、编审,长期致力于近代文献的整理出版与历史小说创作,著有长篇历史小说《曾
柳依华:真名杨雯,年龄即将奔三,不过作为女士,当然要说还是“二八”芳华。毕业于广外大英语语言文学专业,目前只是一名小小的笔译员,勉强糊口。
「宛如青春电影一般,迷走在平凡、炙热、残酷的二十岁 」1.日系摄影代表作者首次引进国内,独家附赠彩色摄影别册作者小林纪晴凭借《DAY ASIA》荣获日本摄影协会...
中华人民共和国国家安全法-全国人民代表大会常务委员会公报版 本书特色 为加强法制宣传,迅速普及法律知识,服务于我国民主法制建设,多年来,中国民主法制出版社根据全...
[美]埃里克·托普(Eric Topol)● 美国知名心脏病学家、基因组学教授,曾连续14年担任克利夫兰诊所心血管科主任,并带领其科室成为美国排名首位的心脏中心...