Skip to Content
Get Programming with JavaScript Next
book

Get Programming with JavaScript Next

by JD Isaacks
May 2018
Intermediate to advanced content levelIntermediate to advanced
376 pages
9h 22m
English
Manning Publications
Content preview from Get Programming with JavaScript Next

Unit 6. Classes

JavaScript is an object-oriented language. Except for a few primitives, most values in JavaScript, even functions, are objects. Most of the JavaScript code that gets written is for creating custom objects. Many times you’re probably building your own objects from scratch, but sometimes you’ll be starting from a base object provided from a framework or library and adding custom functionality to it. Unfortunately, there hasn’t been a clear way for library authors to provide a base object prototype that can be extended by application developers. This has left many library authors needing to reinvent the wheel.

But nobody reinvents the wheel the same way. Here’s how Backbone.js provides a way to extend base objects:

Backbone.Model.extend({ ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Get Programming with JavaScript

Get Programming with JavaScript

John Larsen
Rediscovering JavaScript

Rediscovering JavaScript

Venkat Subramaniam

Publisher Resources

ISBN: 9781617294204Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link