更新时间:2021-07-14 11:24:46
封面
版权页
Credits
About the Author
About the Reviewer
www.PacktPub.com
eBooks discount offers and more
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Chapter 1. A Refresher of Objects
Object literals
Object constructors
Object prototypes
Using classes
Summary
Chapter 2. Diving into OOP Principles
OOP principles
Is JavaScript Object Oriented?
Abstraction and modeling support
OOP principles support
JavaScript OOP versus classical OOP
Chapter 3. Working with Encapsulation and Information Hiding
Encapsulation and information hiding
Convention-based approach
Privacy levels using closure
A meta-closure approach
Property descriptors
Information hiding in ES6 classes
Chapter 4. Inheriting and Creating Mixins
Why inheritance?
Objects and prototypes
ES6 inheritance
Controlling inheritance
Implementing multiple inheritance
Creating and using mixins
Chapter 5. Defining Contracts with Duck Typing
Managing dynamic typing
Contracts and interfaces
Duck typing
Duck typing and polymorphism
Chapter 6. Advanced Object Creation
Creating objects
Design patterns and object creation
Creating a singleton
An object factory
The builder pattern
Comparing factory and builder patterns
Recycling objects with an object pool
Chapter 7. Presenting Data to the User
Managing user interfaces
Presentation patterns
The Model-View-Controller pattern
The Model-View-Presenter pattern
The Model-View-ViewModel pattern
A MV* pattern comparison
Chapter 8. Data Binding
What is data binding?
Implementing data binding
The publish/subscribe pattern
Using proxies
Chapter 9. Asynchronous Programming and Promises
Is JavaScript asynchronous?
Writing asynchronous code
Introducing Promises
Using Generators
Chapter 10. Organizing Code
The global scope
Creating namespaces
The module pattern
Module loading
ECMAScript 6 modules
Chapter 11. SOLID Principles
Principle of OOP design
The Single Responsibility Principle
The Open/Closed Principle
The Liskov Substitution Principle
The Interface Segregation Principle
The Dependency Inversion Principle
Chapter 12. Modern Application Architectures
From scripts to applications
From old-style to Single Page Applications
The Zakas/Osmani architecture
Cross-cutting features and AOP
Isomorphic applications