By Brian Mearns

Promises is a pattern for asynchronously executing code, and following up on the results of that execution. In this post, we’ll explore promises at an introductory level, based on the Promises/A+ specification, a widely adopted standard for promises.

A note on implementation: The promises pattern can be applied in a variety of different programming languages, but requires an implementation to support it. There’s nothing magical about the implementation, and promises libraries are available for a variety of languages. This post focuses more on the promises concept than on implementation, but you can learn more about implementation through open source projects such as those listed on the Promises/A+ website.


A promise is exactly what it sounds like: a promise to do something. You aren’t necessarily promising to do it right now; you’re just promising to do it at some point. In this way, it’s a lot like a future object in Java and other languages. It’s generally meant to encapsulate asynchronous work that needs to be done. Read on…

Categories Software EngineeringTags , ,
By Brian Mearns

Before coming to CommerceHub, I spent nine years—my entire career, starting as an intern—as a firmware engineer in a hardware-centric world. Since joining the Hub, I’ve learned an incredible amount about the world of software engineering. As I come up on my one-year anniversary at CommerceHub, it seems like a good time to reflect on and share some of what I’ve learned during my time here.

Read on…

Categories Software Engineering