A couple of weeks ago, I had the honor, privilege, and other emotions you may or may not associate with JavaScript, to present at Conf42 JavaScript my “Refactoring APIs to Patterns” talk.
The presentation, is, well, what is says on the box. I’m taking some Node code, An API that does a couple of things, and refactor it. There are patterns from Domain-Driven Design, like repository and anti-corruption layer, along with some old-school factories and adapters.
The language and frameworks we write in, impact our code and design. For example, if we’re using an object-relational mapper, we may not need a Repository abstraction. But, if we want to maintain code that is easily testable, and separated correctly, we’d want to consider a one. As I go, I explain the reason behind the principles.
Check it out. And if you have some major refactoring to do, check out my Clean Code workshop, it will do you good.
0 Comments