Effective Java - Item 14 In public classes, use accessor methods, not public fields

Chapeter 4 Classes and Interfaces Item 14: In public classes, use accessor methods, not public fields Degenerate classes: serve no purpose other than to group instance fields it does not offer the benefits of encapsulation should always be replaced by...

ES6 Chapter 5 Collections

ES6 Chapter 5 Collections As of ES6, some of the most useful data structure abstractions have been added as native components of the language. 1.Typed Arrays (1) what’s it: access to binary date create a typed arrays based on a...

Effective Java - Item 13 Minimize the accessibility of classes and members

Chapeter 4 Classes and Interfaces Item 13 Minimize the accessibility of classes and members 1.A fundamental software design tenet: information hiding or encapsulation it decouples the modules that comprise a system; (1) allow modules to be [1]developed, [2]tested, [3]optimized, [4]used,...

ES6 Chapter 4 Async Flow Control

ES6 Chapter 4 Async Flow Control The primary mechanism for managing asynchrony has been the function callback. However, ES6 adds a new feature, Promises. In addition, we will see a pattern, Generators + Promises 1.Promises (1) What is it? Promises...

ES6 Chapter 3 Organization 2

ES6 Chapter 3 Organization 2 A imports B. B imports A. How does this actually work? 4.Classes (1) mechanism class Foo implies creating a (special) function of the name Foo constructor(..) identifies the signature of that Foo(..) function use the...