06.07.2017 Views

Mastering JavaScript

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Server-Side <strong>JavaScript</strong><br />

Summary<br />

In this chapter, we looked at a different avatar of <strong>JavaScript</strong>—that of a server-side<br />

framework in the form of Node.js.<br />

Node offers an asynchronous evented-model to program scalable and highperformance<br />

server applications in <strong>JavaScript</strong>. We dived deep into some core<br />

concepts on Node, such as an event loop, callbacks, modules, and timers.<br />

Understanding them is critical to write good Node code. We also discussed several<br />

techniques to structure Node code and callbacks in a better way.<br />

With this, we reach the conclusion of our exploration of a brilliant programming<br />

language. <strong>JavaScript</strong> has been instrumental in the evolution of the World Wide Web<br />

because of its sheer versatility. The language continues to expand its horizons and<br />

improves with each new iteration.<br />

We started our journey with understanding the building blocks of the grammar<br />

and syntax of the language. We grasped the fundamental ideas of closures and<br />

the functional behavior of <strong>JavaScript</strong>. These concepts are so essential that most of<br />

the <strong>JavaScript</strong> patterns are based on them. We looked at how we can utilize these<br />

patterns to write better code with <strong>JavaScript</strong>. We studied how <strong>JavaScript</strong> can operate<br />

on a DOM and how to use jQuery to manipulate the DOM effectively. Finally, we<br />

looked at the server-side avatar of <strong>JavaScript</strong> in Node.js.<br />

This book should have enabled you to think differently when you start programming<br />

in <strong>JavaScript</strong>. Not only will you think about common patterns when you code, but<br />

also appreciate and use newer language features by ES6.<br />

[ 222 ]<br />

www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!