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页
炼铁设备 内容简介 本书共分10章,内容包括高炉炼铁生产与设计概述、高炉本体、高炉冷却、高炉车间原料系统、炉顶装料设备、送风系统、煤气处理系统、喷吹系统、渣铁处...
雪球财经是一家奉行价值投资理念的互联网金融信息服务公司。旗下拥有服务中国美股投资者的中文网站i美股www.imeigu.com,和服务全球中国概念股投资者的英文...
【南风系列】第2季 《南风过境》姐妹篇 再续傅式温柔情深十八岁的夏天,在暮云古镇过暑假的顾阮阮在河里游泳时,救下了车子坠河的傅西洲。高烧昏迷的傅西洲在 三天后醒...
传染病监测预测与优化控制 本书特色 《传染病监测预测与优化控制》针对传染病疫情防控,在致病微生物采样和检测、传染病疫情预测和传染病疫情优化控制三个方面进行了系统...
本书收入的两篇是奥古斯丁探讨人的本质的代表作。《论自由意志》探讨恶的来源和人的自由意志问题。《论本性与恩典》探讨人的全然败坏与上帝的全然恩典。《论自由意志》是为...
从计算机发展史早期的Cobol、Fortran到后来的C、Java,编程语言的家族不断壮大。除了这些广为人知的语言外,还涌现了Erlang、Ruby等后起之秀,...
针法卷-中国针灸交流通鉴 本书特色 《中国针灸交流通鉴》分为9卷,由《历史卷·上》《历史卷·下》《临床卷·上》《临床卷·下》《针法卷》《科研卷》《教育卷》《行业...
作品目录清修妙论笺 上卷清修妙论笺 下卷四时调摄笺 春卷四时调摄笺 夏卷四时调摄笺 秋卷四时调摄笺 冬卷起居安乐笺 上卷起居安
作品目录张爱玲研究的历史回顾夏公与“张学”张爱玲再生缘――重复、回族与衍生的叙事学近二十年来张爱玲在大陆的“接受史”张爱
建筑装饰装修室内空间照明设计应用手册(上、下册) 内容简介 本手册主要涉及到住宅空间、餐饮空间、办公空间、酒店及会所空间、民宿空间、零售店铺空间、超市空间、书店...
马礼荣,当代法国著名哲学家,现象学运动新一代的领袖人物,巴黎四大和芝加哥大学教授,主要著作:《还原与给予》、《没有存在的上帝》、《白色神学》等。
晓航,第四届鲁迅文学家获得者。本名蔡晓航,城市文学的领军人物,出版《被声音打扰的时光》《所有的猪都到齐了》《旧梦如花》《不能没有她》《一起去水城》《送你一棵凤凰...
阿曼达•诺克斯,这个在百度上搜索指数一直高居不下、被人们议论纷纷的名字,多次被搬上各种荧幕的主角:今年多伦多电影节展映了许多制作精良的纪录片,其中《阿曼达•诺克...
中平卓马,摄影家,摄影评论家。1938年生于东京, 1958年进入东京外国语大学西班牙语系就读。毕业进入《现代之眼》担任编辑,1968年与高梨丰、多木浩二共同创...
精彩摘录许由不洗耳。后世有何徵。(○《文选》五十五陆机演连珠注引李陵诗。○此与上两句或是同篇残文。《诗纪》据升庵诗话列诗
玄关.过道-家居细部设计300例 本书特色 《家居细部设计300例:玄关.过道》:细部——自己可以掌控的家居灵感。“不小无以为大”,细部向来都是家居装修中*能出...
保罗•贾维斯(Paul Jarvis)从企业网页设计师起步,做过互联网咨询顾问,早年曾为顶级专业运动员沃伦•萨普、史蒂夫•纳什、沙奎尔•奥尼尔及雅虎、微软、梅赛...
冨樫 義博(とがし よしひろ、1966年4月27日 - )は、日本の漫画家。男性。愛称は「ヨシりん」、「冨樫王子」など。「富樫」は誤表記。妻は『美少女戦士セーラ...
みことあけみイラストレーター。漫画家。群馬県出身。代表作に戯画『キスシリーズ』、コミカライズ『エイルンラストコード』、『異世界覚醒超絶クリエイトスキル』など実績...
罗伯特·F.埃贝尔(Robert F. Hébert)美国奥本大学经济学荣休教授;他的研究集中在经济思想史、经济史以及最近的宗教经济学方面。在中国出版过《经济理...