Intro and Node Basics

Hello! Welcome to Node Patterns: From Callbacks to Observers. So the first pattern I would like to start, it's called one true JavaScript exception handler... of course this is a joke! You don't want to open and then search for your error message in a stack overflow automatically. In this case in fact it's not gonna work properly with asynchronous code so I came up with this one true Node exception handler pattern. So we're listening for the uncaught exception and then using opn module which will open this URL in the browser. well I did install that module first. Of course this is a joke, but why you should turn off your instant messaging and care about Node.js patterns. First of all, you want to write and organize your code better. That's obvious. Maybe you want to become a go-to Node.js person in your team or in your company. That's absolutely wonderful idea. Or maybe you just person who likes to understand how things work on the low level, under the hood so to say, to want to understand node a little bit deeper, so this is your presentation this is your course. Bear with me and you can get the slides and the source code on the GitHub by following this URL.

A little bit about myself. My name is Azat Mardan. I write about node.js at Webapplog.com. I work at the Technology Fellow at Capital One. I also teach Nodejs and React courses at NodeProgram.com. Before I worked at Storify and DocuSign and the US federal agencies, and now I'm also writing books. I've published and wrote twelve books not counting Chinese, Korean and Russian translations. My latest book react quickly, it's coming 2016. Okay, so nodejs basics. JavaScript it's... Node.js is JavaScript but it's not absolutely equal to the browser JavaScript. So there are some differences. We need to know them and Node.js and JavaScript they have this asynchronous style because we're using an event loop. The main reason why people are using Nodejs it's because of its non-blocking I/O which allows us to perform very to create a faster applications but sometimes javascript could be hard and it's good to understand how asynchronous code is working under the hood and it's good to use the proper code patterns to organize your code pattern, so other team members or maybe if it's an open source projects other contributors can understand this and your application can scale in the development sense meaning you can add more team members and you can add more modules and features.