javascript
43 views | +0 today
Follow
Your new post is loading...
Your new post is loading...
Rescooped by Anthony Munene from JavaScript for Line of Business Applications
Scoop.it!

Now shipping: Principles of Object-Oriented JavaScript

Now shipping: Principles of Object-Oriented JavaScript | javascript | Scoop.it

First and foremost, this book is the print edition of my self-published ebook, but with actual copy editing, tech editing, and professional graphics. The topics covered are the same and are mostly covered in the same way (the No Starch version has additional clarifications in some places). As a bonus, there is a No Starch ebook version.

The book itself is about understanding objects in JavaScript. Topics include:

The differences between primitive and reference valuesWhat makes JavaScript functions so uniqueThe various ways of creating an objectThe difference between data properties and accessor properties using ECMAScript 5How to define your own constructorsHow to work with and understand prototypesVarious inheritance patterns for types and objectsHow to create private and privileged object membersHow to prevent modification of objects using ECMAScript 5 functionality

One of the things I wanted to do with this book was treat ECMAScript 5 as the current version of JavaScript. There are still a lot of books that end up saying things like, “if your browser supports ECMAScript 5, do it this way.” I wanted to look towards a future where ECMAScript 5 is the minimum version everyone uses, and so I chose to do away with those qualifying statements and use ECMAScript 5 terminology exclusively throughout.


Via Jan Hesse
more...
No comment yet.
Rescooped by Anthony Munene from JavaScript for Line of Business Applications
Scoop.it!

Rewriting A WebApp With ECMAScript 6

Rewriting A WebApp With ECMAScript 6 | javascript | Scoop.it

Today it’s possible for us to author in ES6 and transpile our sources down to ES5 at build-time, regardless of whether we’re using Grunt, Gulp or Broccoli. With projects like Ember and Angular looking to ES6 as part of their roadmaps too (Ember App Kit already supports ES6 modules!), now is a great time to learn how ES6 can be used in practice.

In this guide, we’ll re-write the well known TodoMVC application (implemented withBackbone.js) using ECMAScript 6 language semantics. The implementation is made possible using Google’s Traceur compiler and ES6-Module-Loader.

If you haven’t come across these tools before, Traceur is a JavaScript.next-to-JavaScript-of-today compiler that allows you to use features from the future today and the ES6 Module Loader dynamically loads ES6 modules in Node.js and current browsers. If you’re wondering whether Traceur is ready for production-level apps, Erik Arvidsson recently answered this on their mailing list.


Via Jan Hesse
more...
No comment yet.
Rescooped by Anthony Munene from JavaScript for Line of Business Applications
Scoop.it!

Prototypal Inheritance With Stamps

A stamp is a factory function which has public properties that specify a delegate prototype, default instance state, and a function that sets up encapsulation for object instances. Stamps utilize three different types of inheritance to create the new object:

Delegate prototype – Delegation / Differential Inheritance

Instance state – Cloning / Concatenative Inheritance / Mixins

Encapsulation – Functional Inheritance

Stampit is a library written to demonstrate how we might use sugar to simplify prototypal OO. It exports a single function.

It demonstrates prototypal inheritance with factories.


Via Jan Hesse
more...
No comment yet.