Skip to Content
JavaScript 設計模式
book

JavaScript 設計模式

by Stoyan Stefanov
March 2012
Intermediate to advanced
244 pages
4h 42m
Chinese
GoTop Information, Inc.

Overview

運用編碼和設計模式創建出更完美的應用程式

「這本書是Stoyan為大型網頁應用程式開發者所寫的指引」
-Ryan Grove,Yahoo!資深工程師

開發JavaScript應用程式最好的途徑是什麼?本書以出色而豐富的編碼模式和實踐方式回答了這個問題。如果你是程式開發的老鳥,正以JavaScript開發客戶端程式、伺服器端程式或桌面應用程式,卻苦惱於物件、函式、繼承和更多語言特有的問題—本書的抽象化(Abstractions)和程式碼模板(code templates)將提供給您最佳指引。

作者Stoyan Stefanov是JavaScript專家,本書所介紹的每個模式中都會提供實務上的有效建議,以及一些實際操作的例子。同時也會讓您了解有關反模式(anti-patterns):常見的糟糕實踐方式,讓你看似解決了一些問題,但最終卻得不償失的模式。

‧建立寫出高品質JavaScript程式碼的好習慣,例如避免使用全域變數、使用單一var宣告等
‧了解為什麼實字符號模式(literal notation patterns)是比建構式更簡單的選擇
‧探索JavaScript各式各樣定義函式(function)的方法
‧建立超越基礎模式(使用物件實字和建構式)的物件
‧學習JavaScript的繼承和程式碼重用的方式
‧用JavaScript實現常見的設計模式,例如Singleton(單體模式)、Factory(工廠模式)、Decorator(裝飾者模式)等等
‧檢驗瀏覽器環境中專屬的模式

建議具有程式設計經驗者閱讀

Stoyan Stefanov 現於Facebook任工程師一職,之前曾為Yahoo!資深技術工程師。同時他也是多本歐萊禮著作的作者、貢獻者和技術評論家,以及smuch.it影像優化工具的開發者和YSlow 2.0(Yahoo!的效能優化工具)架構師。他經常在各種會議和自己的部落格www.phpied.com上談論網頁開發主題。

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

JavaScript 之美

JavaScript 之美

Anton Kovalyov
重構 JavaScript

重構 JavaScript

Evan Burchard

Publisher Resources

ISBN: 9789862764190