SOLID Principles in Action: From Slack to Twilio
It seems like there’s a RESTful API for everything these days. From payments to booking tables, from notifications to spinning up virtual machines, you can do almost anything with a simple HTTP interaction.
If you’re building a service of your own, you’ll often want to be able to use it on multiple platforms at once. Following time-tested OOD (object oriented design) principles makes your code more resilient and more easily extended.
In this post, we examine one particular design approach called SOLID (it’s an acronym). We put it to practical use in writing a service that’s a Slack integration and then extending it for use with Twilio.
The service sends you a random Magic the Gathering card. If you’d like to see it in action right away, you can text the word magic to: 1-929-236-9306 (U.S. and Canada only – you’ll get an ...