Integrating React With Backbone

There are so many JS frameworks! It can get tiring to keep up to date with them all.

But like any developer who writes JavaScript, I try to keep abreast of the trends. I like to tinker with new things, and rebuild TodoMVC as often as possible.

Joking aside, when it comes to choosing frameworks for a project, emerging frameworks just haven't been battle-tested enough for me to recommend to clients in most cases.

But like much of the community, I feel pretty confident in the future of React. It's well documented, makes reasoning about data easy, and it's performant.

Read More

Mastering `this` in JavaScript

JavaScript developers—new and experienced—constantly rate the variable this as a major pain of the language. The this variable, which represents a function’s context, plays an important role in everyday JavaScript programming, so understanding how it works is critical. This blog post gives an overview of this and its many quirks and forms. We will lay out the four ways to set a function’s this value, as well as discuss some common use cases and pitfalls.

Read More

Classes in JavaScript

Classes are among the murkier programming concepts in JavaScript, but they're as useful here as they are in other languages like Ruby. It's true that JS lacks a native class implementation, but there are easy ways to mimic the functionality of a solid class hierarchy system.

But first off, what the heck is a class? Put simply, classes describe the ingredients of your application. If you're writing a program for a library, you might have a book class, a customer class, and an event class.

Read More