This past weekend at Midwest PHP my friend and author of Undisturbed REST, Mike Stowe, gave me a copy of his book. I was quiet excited to get my hands on it as he had mentioned it to me a number of times previously. I also had the pleasure of attending one MuleSoft’s workshops the week prior to the conference and to learn more about the company he works for along with the software that they provide.
The beginning of the book starts out with a little history of how APIs have become what they are today, including a little back history on SOAP returning XML and how we wound up using JSON as a response, not to mention the future of potentially returning YAML as well. From there Mike moves on to discussing the planning stage of your API. Though he quickly goes over the planning stage in the chapter he leaves you with many questions that will be answered in the coming chapters.
After planning and talking with your stake holders, which can be anything from end users or even internal users of you api, we move into designing your spec. He coins the term Spec Driven Development (SDD) which he uses a number of times through out the book. Though it’s not a new topic, it is very similar to Design Driven Development where you plan out your api before even righting a single piece of code to return data. By going about this route, it provides you a quick feedback cycle while in the beginning stage of your API.
Once we have moved past the planning and designing stage we move into authorization and authentication. Unfortunately this chapter feels a bit bland and boring. Though I don’t feel it’s the authors fault. Security is not really my cup of tea, but do feel it’s a topic which needs to be gone over. He does a really good job of explaining the different types of authentication and why you should use one over the other. That said, within the entire chapter, there are only two to three paragraphs that actually talk about the implantation.
I think my favorite chapter of the book is actually where we get into the nitty gritty of your API, designing your resources. This chapter talks about how to name your endpoints, accepting of content-types, to version or not to version your API along with how, and finally covering caching of your API.
Overall it’s a fantastic book for anyone who is looking to build their first API and wondering where to start. The entire book builds on itself from the planning, design, implantation, to managing your API. The only downside to the book is at times it feels it tries to sell the MuleSoft services too much vs talking about other services available. I understand why it does it and I’m ok with it. But if you are looking for a book which compares and contrasts other services, you should still take a look at the book. There are plenty of concepts and ideas which can transfer to other services out there