21 Sep 2016
Day 3 - MailChimp
I finished yesterday’s post saying that I knew the MailChimp would take a lot of work. This prediction had nothing to do with MailChimp’s API, it was because the MailChimp integration is very different to all the rest I’ve built so far.
All other BugMuncher integrations allow the feedback sent through BugMuncher to be delivered to another service. However with MailChimp I actually built a whole new feature, that allows users to opt in to receiving more details from a website when they are submitting feedback.
A slightly later start today, as I had to deal with some support emails before I could get cracking. At least with MailChimp I knew they had a REST API and OAuth, but I’d still never actually used it, so my first step was reading their frankly brilliant developer documentation.
Once I’d familiarised myself with the API structure, I registered an OAuth consumer app in MailChimp, and started to think about how I was actually going to build this.
I’m a little ashamed to admit it, but at this point I considered giving up. I thought to myself “This is gonna take too long, I should just build a different integration today and leave MailChimp for another time.”
I very quickly derailed that train of thought, as I really don’t like to bail on a challenge, and building this whole new set of features as well as a MailChimp integration in one day was definitely going to be a challenge.
I decided to keep the BugMuncher API end of this one simple, by saving the MailChimp settings in the Website model, rather than creating a separate MailChimp model like I have for all the other integrations. This meant I was able to get the authentication, fetching of mailing lists, and adding people to a mailing lists before lunch (12:30)
My belly was full and the back end was built, it was time to tackle the front end. This is where it all started to fall apart. My decision to do keep the back end super simple, instead of implementing my standard driver interface came back to bite me on the ass, as it made the front end development a hell of a lot more challenging.
I had been toying with making the front end work for 40 minutes before I decided to cut my losses, and rebuild the back end to work with the standard driver structure. I figured it shouldn’t take too long, as I could keep a lot of the code and tests I’d already written. It only took me another 40 minutes to get the back end rebuilt and passing all the unit and integration tests.
Back to the front end, but now I was able to work within my usual integration structure, and could built it reasonably quickly. Being that this was a whole new feature, there was a lot more work to do on the front end than the previous integrations. I also had to make some changes to the feedback interface as well.
With the front end, back end, and feedback interface all updated, I deployed to the staging server and ran a full end to end test. It all worked perfectly, so it was time to write the documentation and make it live.
My next job was to submit to MailChimp’s integration listing, but before I had a chance to do that, I realised that the changes I’d made in the app interface had broken the introduction tour. I spent nearly an hour fixing that, and then submitted my fancy new integration to MailChimp.
Total time taken: 8 hours
Today was tough one, but I knew it would be. More importantly I wasn’t defeated, 3 down, 2 to go. Next up is GitLab.
Never miss a post
Experience all the excitement and crippling self-doubt, as I document my journey with Saber from Side Project to Profitable Startup
Enter your email address below to be notified when ever I write a new post, you'll receive one email every month or so, and no spam 😀
comments powered by Disqus