JavaScript: The Good Parts (Paperback) (JavaScript:優雅之處)

Douglas Crockford

買這商品的人也買了...

相關主題

商品描述

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 scrapes away these bad features to reveal a subset of JavaScript that's more reliable, readable, and maintainable than the language as a whole-a subset you can use to create truly extensible and efficient code.

Considered the JavaScript expert by many people in the development community, author Douglas Crockford identifies the abundance of good ideas that make JavaScript an outstanding object-oriented programming language-ideas such as functions, loose typing, dynamic objects, and an expressive object literal notation. Unfortunately, these good ideas are mixed in with bad and downright awful ideas, like a programming model based on global variables.

When Java applets failed, JavaScript became the language of the Web by default, making its popularity almost completely independent of its qualities as a programming language. In JavaScript: The Good Parts, Crockford finally digs through the steaming pile of good intentions and blunders to give you a detailed look at all the genuinely elegant parts of JavaScript, including:

  • Syntax
  • Objects
  • Functions
  • Inheritance
  • Arrays
  • Regular expressions
  • Methods
  • Style
  • Beautiful features

The real beauty? As you move ahead with the subset of JavaScript that this book presents, you'll also sidestep the need to unlearn all the bad parts. Of course, if you want to find out more about the bad parts and how to use them badly, simply consult any other JavaScript book.

With JavaScript: The Good Parts, you'll discover a beautiful, elegant, lightweight and highly expressive language that lets you create effective code, whether you're managing object libraries or just trying to get Ajax to run fast. If you develop sites or applications for the Web, this book is an absolute must.

商品描述(中文翻譯)

大多數程式語言都有優點和缺點,但JavaScript的缺點比其他語言更多,因為它在尚未完善之前就匆忙開發和發布。這本權威性的書籍剔除了這些不好的特性,揭示了JavaScript的一個子集,比整個語言更可靠、可讀和可維護,你可以使用這個子集來創建真正可擴展和高效的代碼。

作者Douglas Crockford被許多開發社區的人認為是JavaScript的專家,他確定了JavaScript中許多好的想法,使其成為一個優秀的面向對象編程語言,例如函數、鬆散類型、動態對象和表達性的對象字面表示法。不幸的是,這些好的想法與壞的和極糟糕的想法混在一起,比如基於全局變量的編程模型。

當Java小程序失敗時,JavaScript成為Web的默認語言,使其受歡迎程度幾乎完全獨立於其作為一種編程語言的品質。在《JavaScript: The Good Parts》中,Crockford終於深入研究了這些好意和錯誤,詳細介紹了JavaScript中所有真正優雅的部分,包括:

- 語法
- 對象
- 函數
- 繼承
- 數組
- 正則表達式
- 方法
- 風格
- 優秀的特性

真正美妙的地方在於,當你使用本書介紹的JavaScript子集前進時,你也將避免需要「忘卻」所有壞的部分。當然,如果你想了解更多關於壞的部分以及如何糟糕地使用它們的信息,只需參考其他任何一本JavaScript書籍。

如果你開發網站或Web應用程序,這本書絕對是必讀之作,你將發現一個美麗、優雅、輕量且高度表達性的語言,無論你是管理對象庫還是只是想讓Ajax運行更快。