Refactoring JavaScript: Turning Bad Code Into Good Code
暫譯: 重構 JavaScript:將壞程式碼轉變為好程式碼
Evan Burchard
- 出版商: O'Reilly
- 出版日期: 2017-05-02
- 定價: $1,650
- 售價: 8.0 折 $1,320
- 語言: 英文
- 頁數: 442
- 裝訂: Paperback
- ISBN: 1491964928
- ISBN-13: 9781491964927
-
相關分類:
JavaScript、Refactoring
-
相關翻譯:
重構 JavaScript (Refactoring JavaScript: Turning Bad Code Into Good Code) (繁中版)
立即出貨
買這商品的人也買了...
-
$620$490 -
$990JavaScript Cookbook, 2/e (Paperback)
-
$780$616 -
$360$284 -
$520$442 -
$403解析深度學習 : 語音識別實踐
-
$520$442 -
$680$578 -
$500$395 -
$580$458 -
$520$442 -
$480$379 -
$380$296 -
$530$419 -
$590$460 -
$1,400Practical Modern JavaScript: Dive into ES6 and the future of JavaScript
-
$540$459 -
$390$257 -
$450$356 -
$540$459 -
$480$379 -
$400$312 -
$580$458 -
$560$476 -
$990Mastering Modular JavaScript (Paperback)
相關主題
商品描述
How often do you hear people say things like this? "Our JavaScript is a mess, but we’re thinking about using [framework of the month]."
Like it or not, JavaScript is not going away. No matter what framework or ”compiles-to-js” language or library you use, bugs and performance concerns will always be an issue if the underlying quality of your JavaScript is poor. Rewrites, including porting to the framework of the month are terribly expensive and unpredictable. The bugs won’t magically go away, and can happily reproduce themselves in a new context. To complicate things further, features will get dropped, at least temporarily.
The other popular method of fixing your JS is playing “JavaScript Jenga,” where each developer slowly and carefully takes their best guess at how the out-of-control system can be altered to allow for new features, hoping that this doesn’t bring the whole stack of blocks down. This book provides clear guidance on how best to avoid these pathological approaches to writing JavaScript:
- Recognize you have a problem with your JavaScript quality.
- Forgive the code you have now, and the developers who made it.
- Learn repeatable, memorable, and time-saving refactoring techniques.
- Apply these techniques as you work, fixing things along the way.
- Internalize these techniques, and avoid writing as much problematic code to begin with.
Bad code doesn’t have to stay that way. And making it better doesn’t have to be intimidating or unreasonably expensive.
商品描述(中文翻譯)
你多久會聽到人們這樣說話?「我們的 JavaScript 一團糟,但我們正在考慮使用 [當月框架]。」
不管喜不喜歡,JavaScript 不會消失。無論你使用什麼框架或「編譯成 JS」的語言或庫,如果你的 JavaScript 基本質量差,錯誤和性能問題將始終存在。重寫,包括移植到當月框架,都是非常昂貴且不可預測的。錯誤不會神奇地消失,並且可以在新的上下文中愉快地重現。更複雜的是,某些功能將會被刪除,至少是暫時的。
修復你的 JS 的另一種流行方法是玩「JavaScript Jenga」,每位開發者慢慢而小心地猜測如何改變這個失控的系統以允許新功能,希望這不會使整個積木堆倒塌。本書提供了清晰的指導,幫助你避免這些病態的 JavaScript 寫作方法:
- 認識到你的 JavaScript 質量存在問題。
- 原諒你現在的代碼和編寫它的開發者。
- 學習可重複、易記且節省時間的重構技術。
- 在工作中應用這些技術,隨時修正問題。
- 內化這些技術,避免一開始就寫出過多有問題的代碼。
糟糕的代碼不必一直這樣。而改善它也不必讓人感到畏懼或不合理地昂貴。