Book description
Learn everything you need to know about object-oriented JavaScript with this comprehensive guide. Enter the world of cutting-edge development!
About This Book
- This book has been updated to cover all the new object-oriented features introduced in ECMAScript 6
- It makes object-oriented programming accessible and understandable to web developers
- Write better and more maintainable JavaScript code while exploring interactive examples that can be used in your own scripts
Who This Book Is For
This book is ideal for new to intermediate JavaScript developers who want to prepare themselves for web development problems solved by object-oriented JavaScript!
What You Will Learn
- Apply the basics of object-oriented programming in the JavaScript environment
- Use a JavaScript Console with complete mastery
- Make your programs cleaner, faster, and compatible with other programs and libraries
- Get familiar with Iterators and Generators, the new features added in ES6
- Find out about ECMAScript 6's Arrow functions, and make them your own
- Understand objects in Google Chrome developer tools and how to use them
- Use a mix of prototypal inheritance and copying properties in your workflow
- Apply reactive programming techniques while coding in JavaScript
In Detail
JavaScript is an object-oriented programming language that is used for website development. Web pages developed today currently follow a paradigm that has three clearly distinguishable parts: content (HTML), presentation (CSS), and behavior (JavaScript). JavaScript is one important pillar in this paradigm, and is responsible for the running of the web pages.
This book will take your JavaScript skills to a new level of sophistication and get you prepared for your journey through professional web development. Updated for ES6, this book covers everything you will need to unleash the power of object-oriented programming in JavaScript while building professional web applications. The book begins with the basics of object-oriented programming in JavaScript and then gradually progresses to cover functions, objects, and prototypes, and how these concepts can be used to make your programs cleaner, more maintainable, faster, and compatible with other programs/libraries.
By the end of the book, you will have learned how to incorporate object-oriented programming in your web development workflow to build professional JavaScript applications.
Style and approach
Filled with practical instructions, the book shows you how to implement object-oriented features of JavaScript in the real world. The to-the-point nature of the book will benefit developers who are looking for a fast-paced guide to learn object-oriented JavaScript.
Table of contents
-
Object-Oriented JavaScript - Third Edition
- Object-Oriented JavaScript - Third Edition
- Credits
- About the Authors
- About the Reviewer
- www.PacktPub.com
- Customer Feedback
- Preface
- 1. Object-Oriented JavaScript
- 2. Primitive Data Types, Arrays, Loops, and Conditions
- 3. Functions
-
4. Objects
-
From arrays to objects
- Elements, properties, methods, and members
- Hashes and associative arrays
- Accessing an object's properties
- Calling an object's methods
- Altering properties/methods
- Using the this value
- Constructor functions
- The global object
- The constructor property
- The instanceof operator
- Functions that return objects
- Passing objects
- Comparing objects
- Objects in the WebKit console
- ES6 object literals
- Object properties and attributes
- ES6 object methods
- Destructuring
- Built-in objects
- ES6 array methods
- Lexical this in arrow functions
- Exercises
- Summary
-
From arrays to objects
- 5. ES6 Iterators and Generators
- 6. Prototype
-
7. Inheritance
- Prototype chaining
- Inheriting the prototype only
- Uber - access to the parent from a child object
- Isolating the inheritance part into a function
- Copying properties
- Heads-up when copying by reference
- Objects inherit from objects
- Deep copy
- Using object() method
- Using a mix of prototypal inheritance and copying properties
- Multiple inheritance
- Parasitic inheritance
- Borrowing a constructor
- Case study - drawing shapes
- Exercises
- Summary
- 8. Classes and Modules
- 9. Promises and Proxies
-
10. The Browser Environment
- Including JavaScript in an HTML page
- BOM and DOM - an overview
-
BOM
- The window object revisited
- Using window.navigator property
- Your console is a cheat sheet
- Using window.location property
- Using window.history property
- using window.frames property
- Using window.screen property
- window.open()/close() method
- window.moveTo() and window.resizeTo() methods
- window.alert(), window.prompt(), and window.confirm() methods
- Using window.setTimeout() and window.setInterval() methods
- window.document property
- DOM
- Events
- XMLHttpRequest
- Exercises
- Summary
- 11. Coding and Design Patterns
- 12. Testing and Debugging
- 13. Reactive Programming and React
- A. Reserved Words
- B. Built-in Functions
- C. Built-in Objects
- D. Regular Expressions
- E. Answers to Exercise Questions
Product information
- Title: Object-Oriented JavaScript - Third Edition
- Author(s):
- Release date: January 2017
- Publisher(s): Packt Publishing
- ISBN: 9781785880568
You might also like
book
Object-Oriented JavaScript - Second Edition
If you’ve limited or no experience with JavaScript, this book will put you on the road …
book
The Principles of Object-Oriented JavaScript
The Principles of Object-Oriented JavaScript helps experienced programmers understand JavaScript's unique approach to object-oriented programming so …
book
Mastering JavaScript Object-Oriented Programming
Unleash the true power of JavaScript by mastering Object-Oriented programming principles and patterns About This Book …
book
Rediscovering JavaScript
JavaScript is no longer to be feared or loathed - the world's most popular and ubiquitous …