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页
巫哲:晋江超人气作家。巫哲总有出人意料的点子,尤擅长于细微处戳人。已出版《炮楼》《狼行成双》《格格不入》等。新浪微博:@那个狗蛋儿
萨义德·侯赛因·纳速尔,当代伊斯兰教思想大家,世界知名比较宗教研究学者。 1933年出生于伊朗,1958年获哈怫大学哲学博士后回国,先后任教于德黑兰大学、亚利安...
Negotiationispartofeveryhumanencounter,andmostofusdoitbadly.Whetherdealingwithfa...
近年来,随着传统文化的升温,大家对中国古代服饰的兴趣也日益浓厚。由于目前中国服饰史研究和普及工作的相对滞后,加上现代古装影视剧中大量毫无依据的造型设计的误导,人...
职场通识系列,由颉腾文化策划出版。畅销20载,更新至第7版的美国经典演讲教程,职场百万学习者使用的公开演讲最佳准备手册。人际、沟通、表达三部曲,人文素养修炼——...
★2019新京报年度阅读推荐图书★2019南大出版社最受读者喜爱的十大好书★一本料多、劲爆、老练的美国思想产业实录。公共知识分子跌下神坛,思想领袖居于社科金字塔...
国医大师李济仁 内容简介 全书分别从学术思想、方药心得、验案撷英、薪火相传、医话随谈、成才之路、年谱七个部分对李济仁教授从医60余载治疗内、妇科等疑难杂症的临床...
《这样买保险不吃亏:保险行家手把手教你买对保险》内容简介:本书从读者对保险的刻板认识开始,用通俗易懂的语言说清保险的真相,
作者:矢玉四郎1944年出生于日本大分县别府市,1967年千叶大学工学部毕业。曾做过商业设计家、漫画家,现在的身份是作家、画家及作词家。主要作品有“晴天有时下猪...
In"ThisStrangeIdeaoftheBeautiful",FrancoisJullienbringstogetherideasofbeautyfrom...
全科医生用药指南 内容简介 本书根据临床医药学的发展和临床安全用药的实际情况,以人民卫生出版社出版的《中华人民共和国药典》2010年版,《国家基本药物》2010...
我们如何理解语言?我们又如何创造意义?我们的所看所想如何影响我们对事物的理解?如果说我们一直在创建意义,那么什么才是意义之源?这些认知语言学领域的核心问题正是《...
草军书,真名章庆,安徽省铜陵市人,是一名创作个性鲜明、创作态度严谨的作家。文风诙谐幽默、轻松明快,古典而不乏时尚;笔法独特老辣、妙语连珠,传统中蕴藏新意。著有《...
作品目录第一章 我被美丽当场打动1 对岸的女孩2 北方女孩3 初恋4 美丽的七星螺5 避雨的蝴蝶6 陪着你走7 你的来信8 小雨9 躲躲闪
公元466年,宋明帝刘彧与在寻阳称帝的侄子刘子勋二帝并立,内战几乎波及刘宋全境,继而演变为与北魏之间的战争。生于南朝中层官僚家庭的王钟儿,被迫卷入,家破人亡,两...
刘慈欣:祖籍河南,长于山西,高级工程师,中国科普作家协会会员,山西省作家协会会员,中国科幻小说作家代表人物。自1999年处女作《鲸歌》问世以来,刘慈欣已发表短篇...
《给少年的中国地理书·陕西》内容简介:这是一片古老又年轻的土地,航拍中国的镜头,将带你从海南岛北部开始,见识火山怎样改造大
2010-10-27 23:23:39 来自: 蘑菇豆丁 (舟山)哲学的书怎么给孩子看http://landaishu.zhongwenlink.com/hom...
沈从文,小说、散文大师,代表作:《边城》《长河》《湘行散记》等。汪曾祺,小说、散文大师,代表作:《受戒》《邂逅集》《蒲桥集》等。梁实秋,散文大师,代表作:《雅舍...
徐向前(1901~1990)原名徐象谦,字子敬。山西五台永安村人。黄埔军校第一期毕业。曾在国民军第二军第六混成旅任教导营教官、参谋、团副。1927年在武汉中央军...