Home Page Icon
Home Page
Table of Contents for
Title
Close
Title
by Martin Rinehart
JavaScript Object Programming
Cover
Title
Copyright
Dedication
Contents at a Glance
Contents
About the Author
A Note for the Implementers
Introduction
Chapter 1 : Creating Objects
Reasons for Objects
Objects Do Methods
Event-Driven Programming
Taming Exponential Complexity
Class-Based vs. Prototypal
Simula
Smalltalk
C++ and Java
Self and JavaScript
Objects Up Close
Data Properties
Methods (Code Properties)
Ex Nihilo Object Creation
The Object Constructor
Object Literals
More Ex Nihilo Objects
OOP-Style Object Creation
Constructors
Assigning Initial Property Values
Creating Instance Methods
Creating Class Statics
Getters and Setters
Default Values
Prototypal Object Creation
Object Prototypes
The Prototype Chain
Object Prototype Cloning
Summary
Chapter 2 : Object Programming
JSWindows Sample System
OP Removes Restrictions
OP Defined
Programming with Properties
Dot Notation
Subscript Notation
Object Programming Examples
Object Sum
OP for Inheriting Prototypes
OP in the JSWindows Library
DOM Related
Utility
Summary
Chapter 3 : Inheritance Theory
Classes
Constructors
Instance Methods
Class (Family-Wide) Properties
Class-Based Inheritance
Property Sets
Constructing an Extending Instance
Overriding Properties
Inheritance Chains
Prototypal Inheritance
Inheritance vs. Composition
Composition in Theory
Composition in JSWindows
Summary
Chapter 4 : Inheritance Practice
Cascading init() Methods for Data
A Theoretical Example
A Practical Example
Prototypes for Methods
Prototype Inheritance Alternatives
Prototype Alternatives
JSWindows Inheritance
Summary
Chapter 5 : On OOP Principles
Ranking OOP Principles
Inheritance
Encapsulation
Access Specifiers
Closures
Polymorphism
Subtype Polymorphism
Parametric Polymorphism
Ad Hoc and Other Polymorphism
JavaScript and Polymorphism
Classes, Abstraction, and Interfaces
Classes
Abstraction
Interfaces
Other OOP Principles
Summary
Chapter 6 : More Ex Nihilo Objects
The Ex Nihilo Namespace Object
The Ex Nihilo Class
ReturningEx Nihilo Objects
The Function as an Ex Nihilo Class
Summary
Chapter 7 : Inheritance Alternatives
Multiple Inheritance
Interfaces
Capabilities
The Window[_M[_BS]] Problem
Mixins
Calling Capability Methods
Capabilities as Constructor Properties
Capabilities as Single Properties
Capability Prototype Methods
Examples
Closable
Maskable
Button_sizable
Summary
Chapter 8 : Designing for JavaScript
Use Ex Nihilo Constantly
Array Literals
Styles Objects
Other Objects
Use Composition Liberally
Mature Pos_size
Use Capabilities Liberally
Use Inheritance Conservatively
Summary
Chapter 9 : On Constructors
Constructor Magic
The new Operator
The this Parameter
The constructor.prototype
The “[[prototype]]” Property
The Prototype’s Prototype
“[[prototype]]” Implies
The Dynamic Prototype
A Bit More Magic
The Constructor Returns this
The “Magic” Summarized
Constructors Are Not for Inheritance
Summary
Chapter 10 : Appendices
A Surveyed Pages, OOP Principles
B Selected Books
C++
Java
JavaScript
Python
Visual Basic
C Selected Websites
Wikipedia on Object-Oriented Programming, Class-Based Inheritance and Prototypal Inheritance
The Author’s Web Site on Class-Based Inheritance and JavaScript Programming
Other Web Sites on Class-Based Inheritance and Prototypal Inheritance
D Defined Terms
E Support for Selected Statements
F Simple Closure
G Sealing and Freezing Objects
H Configuring Properties
I Dynamic Properties and Me
Index
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Cover
Next
Next Chapter
Copyright
JavaScript Object Programming
Martin Rinehart
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset