Refactoring JavaScript: Turning Bad Code Into Good Code

Refactoring JavaScript: Turning Bad Code Into Good Code

作者: Evan Burchard
出版社: O'Reilly
出版在: 2017-04-03
ISBN-13: 9781491964927
ISBN-10: 1491964928
裝訂格式: Paperback
總頁數: 442 頁





內容描述


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.




相關書籍

PHP、MySQL 與 JavaScript 學習手冊, 5/e (Learning PHP , MySQL & JavaScript : With jQuery, CSS & HTML5, 5/e)

作者 Robin Nixon 賴屹民

2017-04-03

達人迷:JavaScript趣味編程15例 ( JavaScript for Kids )

作者 克裡斯·明尼克 (Chris Minnick) 伊娃·霍蘭 (Eva Holland)

2017-04-03

Flutter入門與實踐

作者 Biessek Alessandro 李強 譯

2017-04-03