The XMLHttpRequest object has been around, in one form or another, since 1999. XHR has been a key ingredient in most web applications for well over a decade now. During that time various libraries have wrapped the API to make XHR more palatable and easier ... more
The wwwroot folder in ASP.NET isn't the only place for static files. Briefly, in haiku form: Serve files from anywhere Configure static file middleware Each provider thaws the frozen bits of winter Recently, I wanted to serve files from both wwwroot ... more
Now available on Amazon, What Every JavaScript Developer Should Know About ECMAScript 2015 is the book I'd like to read about the new features in the JavaScript language. The book isn't a reference manual or an exhaustive list of everything in the ES2015 ... more
I fired off an abstract titled The Evolution of JavaScript without giving a thought as to what it means for a language to evolve. After all, a language is not a living organism where Mother Nature applies the dispassionate sieve of natural selection ... more
JavaScript has never offered a variety of data structures out of the box. If you needed any structure fancier than an array, you'd have to roll your own or borrow some code. The 2015 specification brings a number of keyed collections to the language, ... more
You can think of an ASP.NET 5 application as a DNX application, where DNX stands for .NET execution environment. And the projects we create with a project.json file? These are DNX projects. The DNX is not just a runtime environment, but also an SDK. ... more
Until 2015, the JavaScript language has officially only offered only two types of variable scope – global scope and function scope. Avoiding global scope has been a primary architectural goal of nearly every library and framework authored over the last ... more
Errors in asynchronous code typically require a messy number of if else checks and a careful inspection of parameter values. Promises allow asynchronous code to apply structured error handling. When using promises, you can pass an error handler to the ... more
Yesterday's post looked at chaining promises. Now, let's take a closer look at the API available for promises. A Promise in JavaScript offers a few static methods you can use as convenience methods. For example, when you need to return a promise to a ... more