Modular Programming with JavaScript
暫譯: 使用 JavaScript 的模組化程式設計

Sasan Seydnejad

  • 出版商: Packt Publishing
  • 出版日期: 2016-07-22
  • 售價: $2,000
  • 貴賓價: 9.5$1,900
  • 語言: 英文
  • 頁數: 274
  • 裝訂: Paperback
  • ISBN: 1785880659
  • ISBN-13: 9781785880650
  • 相關分類: JavaScriptR 語言
  • 海外代購書籍(需單獨結帳)

相關主題

商品描述

Modularize your JavaScript code for better readability, greater maintainability, and enhanced testability

About This Book

  • Design and build fully modular, modern JavaScript applications using modular design concepts
  • Improve code portability, maintainability, and integrity while creating highly scalable and responsive web applications
  • Implement your own loosely coupled code blocks that can power highly maintainable and powerful applications in a flexible and highly responsive modular architecture

Who This Book Is For

If you are an intermediate to advanced JavaScript developer who has experience of writing JavaScript code but probably not in a modular, portable manner, or you are looking to develop enterprise level JavaScript applications, then this book is for you.

A basic understanding of JavaScript concepts such as OOP, prototypal inheritance, and closures is expected.

What You Will Learn

  • Understand the important concepts of OOP in JavaScript, such as scope, objects, inheritance, event delegation, and more
  • Find out how the module design pattern is used in OOP in JavaScript
  • Design and augment modules using both tight augmentation and loose augmentation
  • Extend the capabilities of modules by creating sub-modules using techniques such as cloning and inheritance
  • Move from isolated module pieces to a cohesive, well integrated application modules that can interact and work together without being tightly coupled
  • See how SandBoxing is used to create a medium for all the modules to talk to each other as well as to the core
  • Use the concepts of modular application design to handle dependencies and load modules asynchronously
  • Become familiar with AMD and CommonJS utilities and discover what the future of JavaScript holds for modular programming and architecture

In Detail

Programming in the modular manner is always encouraged for bigger systems-it is easier to achieve scalability with modular programming. Even JavaScript developers are now interested in building programs in a modular pattern. Modules help people who aren't yet familiar with code to find what they are looking for and makes it easier for programmers to keep things that are related close together.

Designing and implementing applications in a modular manner is highly encouraged and desirable in both simple and enterprise level applications.

This book covers some real-life examples of modules and how we can translate that into our world of programming and application design. After getting an overview of JavaScript object-oriented programming (OOP) concepts and their practical usage, you should be able to write your own object definitions using the module pattern. You will then learn to design and augment modules and will explore the concepts of cloning, inheritance, sub-modules, and code extensibility. You will also learn about SandBoxing, application design, and architecture based on modular design concepts. Become familiar with AMD and CommonJS utilities.

By the end of the book, you will be able to build spectacular modular applications in JavaScript.

商品描述(中文翻譯)

**模組化您的 JavaScript 代碼,以提高可讀性、可維護性和可測試性**

## 本書介紹

- 使用模組化設計概念設計和構建完全模組化的現代 JavaScript 應用程式
- 在創建高度可擴展和響應迅速的網頁應用程式時,提高代碼的可攜性、可維護性和完整性
- 實現您自己的鬆耦合代碼塊,這些代碼塊可以在靈活且高度響應的模組化架構中驅動高度可維護和強大的應用程式

## 本書適合誰

如果您是一位中級到高級的 JavaScript 開發者,擁有撰寫 JavaScript 代碼的經驗,但可能不是以模組化、可攜帶的方式進行,或者您希望開發企業級的 JavaScript 應用程式,那麼這本書適合您。

預期您對 JavaScript 概念如物件導向程式設計(OOP)、原型繼承和閉包有基本的理解。

## 您將學到什麼

- 理解 JavaScript 中 OOP 的重要概念,如範圍、物件、繼承、事件委派等
- 了解模組設計模式如何在 JavaScript 的 OOP 中使用
- 使用緊密增強和鬆散增強設計和擴展模組
- 通過使用克隆和繼承等技術創建子模組來擴展模組的功能
- 從孤立的模組片段轉變為一個有凝聚力、良好整合的應用模組,這些模組可以互動並協同工作,而不會緊密耦合
- 了解 SandBoxing 如何用於創建所有模組之間以及與核心之間的交流媒介
- 使用模組化應用設計的概念來處理依賴關係並異步加載模組
- 熟悉 AMD 和 CommonJS 工具,並探索 JavaScript 在模組化程式設計和架構方面的未來

## 詳細內容

以模組化的方式進行編程在大型系統中總是受到鼓勵——模組化編程更容易實現可擴展性。即使是 JavaScript 開發者現在也對以模組化模式構建程式感興趣。模組幫助那些尚未熟悉代碼的人找到他們所尋找的東西,並使程序員更容易將相關的事物緊密放在一起。

在簡單和企業級應用程式中,以模組化的方式設計和實現應用程式是非常鼓勵和期望的。

本書涵蓋了一些模組的實際案例,以及我們如何將其轉化為我們的程式設計和應用設計世界。在了解 JavaScript 物件導向程式設計(OOP)概念及其實際應用後,您應該能夠使用模組模式撰寫自己的物件定義。然後,您將學習設計和擴展模組,並探索克隆、繼承、子模組和代碼可擴展性的概念。您還將了解基於模組化設計概念的 SandBoxing、應用設計和架構。熟悉 AMD 和 CommonJS 工具。

在本書結束時,您將能夠在 JavaScript 中構建出色的模組化應用程式。