Filed Under

The Strategy Pattern in JavaScript

I've been working with Rick and learning a bunch about what makes JavaScript so great. While refactoring some of my work in a code review, I recognized the Strategy pattern emerging.

I wrote my first article for bocoup.com about employing this pattern in JavaScript. You can read it here.

I have to say, though, that writing this article gave me a lot to think about in regards to classical design patterns and their implementations in JavaScript. The language's dynamic nature means that you can achieve similar results without being so "formal" (defining interfaces & etc.). I think this topic warrants a dedicated article, although it might be a little too academic for the Bocoup blog. When I finally figure out what I want to say, you'll certainly find it here!

Comments

Sorry! Comments aren't supported yet.