Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Javascript Unlocked

You're reading from   Javascript Unlocked Improve your code maintainability, performance, and security through practical expert insights and unlock the full potential of JavaScript

Arrow left icon
Product type Paperback
Published in Dec 2015
Publisher
ISBN-13 9781785881572
Length 182 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (10) Chapters Close

Preface 1. Diving into the JavaScript Core FREE CHAPTER 2. Modular Programming with JavaScript 3. DOM Scripting and AJAX 4. HTML5 APIs 5. Asynchronous JavaScript 6. A Large-Scale JavaScript Application Architecture 7. JavaScript Beyond the Browser 8. Debugging and Profiling Index

What this book covers

Chapter 1, Diving into the JavaScript Core, discusses the techniques to improve the expressiveness of the code, to master multi-line strings and templating, and to manipulate arrays and array-like objects. The chapter explains how to take advantage of JavaScript prototype without harming the readability your code. Further, the chapter introduces the "magic methods" of JavaScript and gives a practical example of their use.

Chapter 2, Modular Programming with JavaScript, describes the modularity in JavaScript: what modules are, why they are important, the standard approaches for asynchronously and synchronously loaded modules, and what ES6 modules are. The chapter shows how CommonJS modules are used in server-side JavaScript and how to pre-compile them for in-browser use. It elaborates how asynchronous and synchronous approaches can be combined to achieve a better application performance. It also explains how one can polyfill ES6 modules for production by the means of Babel.js.

Chapter 3, DOM Scripting and AJAX, introduces Document Object Model (DOM), shows the best practices to minimize browser reflow, and enhance application performance while operating with the DOM. The chapter also compares two client-server communication models: XHR and Fetch API.

Chapter 4, HTML5 APIs, considers the persistence APIs of the browser such as Web Storage, IndexDB, and FileSystem. It introduces Web Components and gives a walk-through of the creation of a custom component. The chapter describes server-to-browser communication APIs such as SSE and WebSockets.

Chapter 5, Asynchronous JavaScript, explains the nonblocking nature of JavaScript, elaborates the event loop and the call stack. The chapter considers the popular styles of chaining asynchronous calls and handling errors. It presents the async/await technique of ES7 and also gives examples of running tasks in parallel and in sequence using the Promise API and the Async.js library. It describes throttling and debouncing concepts.

Chapter 6, A Large-Scale JavaScript Application Architecture, focuses on code maintainability and architecture. The chapter introduces the MVC paradigm and its derivatives, MVP and MVVM. It also shows, with examples, how concern separation is implemented in popular frameworks such as Backbone.js, AngularJS, and ReactJS.

Chapter 7, JavaScript Beyond the Browser, explains how to write command-line programs in JavaScript and how to build a web server with Node.js. It also covers the creation of desktop HTML5 applications with NW.js and guides the development of native mobile applications with Phongap.

Chapter 8, Debugging and Profiling, dives into bug detection and isolation. It examines the capacities of DevTools and the lesser-known features of the JavaScript console API.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image