In application development, networking is a huge part of the process. More often than not, your application will require loading remote data as either a functional part of your app or as a way to reduce the amount of data you need in your application on the first load.
Ajax and XMLHttpRequest
In more complex applications, especially sever side applications that leverage asynchronous operations, the usage of callbacks does not allow for efficient event handling, and can cause issues with how things are handled within an app (timing problems, overloading, blocking operations).
What is Asynchronous code?
Without over-complicating things, the easiest way to...
Functional Basics — Currying, Arrows and Callbacks
Assuming you have already read the previous tutorial on Object prototypes and constructors, you should already be familiar with how factories, classes and constructors work on a fundamental level. Now we are going to take that knowledge to the next level.
In traditional programming, to help reduce the amoun...
Advanced Functions: IIFEs, Closures, and the Module Pattern
In this tutorial, we are going to wrap up the topic of Scopes. We're pretty sure that you have a solid understanding of how lexical scopes work, and thus you are now prepared to tackle one of the most interesting and sometimes frustrating (not for you; you’ll see) topics: Closures. We could even say that this article has a closure over the first three articles (you’ll get this at the end)! Some developers struggle a lot to understand closures, but only because it’s necessary to master lexical scopes first. We have put a lot of time into mastering the execution context, so it’s very probable that this topic won’t be difficult for you. So, without further ado, let’s start!
IIFEs (Immediately Invoked Function Expressions)
We are going to start with IIFEs (Immediately Invoke...