Modular Programming with JavaScript

Sasan Seydnejad

  • 出版商: Packt Publishing
  • 出版日期: 2016-07-22
  • 售價: $1,970
  • 貴賓價: 9.5$1,872
  • 語言: 英文
  • 頁數: 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應用程序。
- 在創建高度可擴展和響應式的Web應用程序時,提高代碼的可移植性、可維護性和完整性。
- 實現自己的鬆散耦合代碼塊,以在靈活且高度響應的模塊化架構中提供可維護且功能強大的應用程序。

本書適合對JavaScript有一定經驗但可能沒有以模塊化、可移植方式編寫JavaScript代碼的中高級JavaScript開發人員,或者正在開發企業級JavaScript應用程序的讀者。

預期讀者對JavaScript概念(如OOP、原型繼承和閉包)有基本的理解。

您將學到:
- 瞭解JavaScript中OOP的重要概念,如作用域、對象、繼承、事件委派等。
- 了解模塊設計模式在JavaScript中的應用。
- 使用緊耦合和鬆散耦合的方法設計和擴展模塊。
- 通過克隆和繼承等技術創建子模塊,擴展模塊的功能。
- 從孤立的模塊片段轉變為一個有凝聚力且良好集成的應用程序模塊,這些模塊可以互相交互和協同工作,而不需要緊密耦合。
- 瞭解沙盒技術如何用於模塊之間以及與核心之間的通信。
- 使用模塊化應用程序設計概念處理依賴關係並異步加載模塊。
- 熟悉AMD和CommonJS工具,並了解JavaScript模塊化編程和架構的未來。

詳細內容:
以模塊化方式編程始終是大型系統所鼓勵的,這樣可以更容易實現可擴展性。即使是JavaScript開發人員現在也對以模塊化模式構建程序感興趣。模塊可以幫助那些尚不熟悉代碼的人找到他們正在尋找的內容,並使程序員更容易將相關內容放在一起。

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

本書涵蓋了一些實際模塊的例子,以及如何將其轉化為我們的編程和應用程序設計世界。在獲得JavaScript面向對象編程(OOP)概念及其實際用法概述後,您應該能夠使用模塊模式編寫自己的對象定義。然後,您將學習設計和擴展模塊,並探索克隆、繼承、子模塊和代碼可擴展性的概念。您還將學習有關沙盒技術、基於模塊化設計概念的應用程序設計和架構的知識。熟悉AMD和CommonJS工具。

通過閱讀本書,您將能夠在JavaScript中構建出色的模塊化應用程序。