• Increase font size
  • Default font size
  • Decrease font size

The #1 Rule of API Design

  Friday, November 15th, 2013

API Design Small Book CoverI just wrote this article on API design for Elsevier’s SciTech blog. It talks about the importance of hiding implementation details and covers information hiding techniques for C++, Objective-C, and Python, such as the pimpl idiom and class extensions. The article includes a discount code for 40% off my book, in case you’ve been waiting for the price to come down before buying it!  Check it out at:


APIs: A Strategy Guide

  Wednesday, December 21st, 2011

A new book on developing Web-based APIs is about to be published called “APIs: A Strategy Guide: Creating Channels with Application Programming Interfaces.” The book is written by Dan Jacobson, Greg Brail, and Dan Woods, who between them have an impressive background in developing real-world Web APIs. The book aims to educate executives and business development teams on the value and strategy for building Web APIs.


Books on REST Web APIs

  Sunday, November 6th, 2011

If you want to read something a little longer than a blog article on how to build REST Web APIs then there are a few books out there that may be of interest to you:


API Design as if Unit Testing Mattered

  Wednesday, January 12th, 2011

Michael Feathers, author of the book “Working Effectively with Legacy Code”, gave a presentation at SD West in 2007 about designing an API with consideration for how it will be unit tested. He presents recommendations such as avoiding static methods and avoiding final/non-virtual methods (although I disagree with the latter recommendation in my book, where I argue that being minimally complete is more important). He also presents a golden rule of API Design: “It’s not enough to write tests for an API you develop, you have to write unit tests for code that uses your API.” He also states that you should supply your tests to your users. I could not agree with those statements more!


Java API Design

  Thursday, September 9th, 2010

Jaroslav Tulach wrote the book “Practical API Design: Confessions of a Java Framework Architect.” Jaroslav also maintains a website to support the book. This site includes lots of tips on API design that, while focused on Java, still offer general insights for C++ engineers working on API tasks. His site also provides a Java source code download for many of the examples in his book.

You can also read a review of Tulach’s book here:


Lakos’ Analysis Tools

  Wednesday, September 8th, 2010

John Lakos wrote the book Large-Scale C++ Software Design, in which he describes many issues of developing C++ software for large projects. As part of this book, he also provided a number of utilities to manage dependencies in a C++ project. This include:

  • adep: creates aliases to group files into cohesive components
  • cdep: extracts compile-time dependencies from several files
  • ldep: analyzes link-time dependencies among various components

These utilities were originally written in the mid-1990s, though some engineers have attempted to make these utilities work with modern compilers. Here are some links if you’re interested in looking into these:


Alexandrescu’s Loki Library

  Wednesday, September 8th, 2010

Andrei Alexandrescu published an excellent book called “Modern C++ Design.” In this book, he introduced the notion of policy-based templates as a way to provide highly-configurable solutions to various design patterns. He made the source code for these templates available via his Loki library, available at:


ABOUT THIS SITE

An Application Programming Interface (API) provides a logical interface to a piece of software and hides its internal details. This website is dedicated to a book on designing APIs for C++ and includes articles and links on API development.
 

SOURCE CODE

The book is accompanied by a source code package that contains many of the examples in the text. Download it for free.
 

OTHER BOOKS

Dr. Reddy has also published a computer graphics book called Level of Detail for 3D Graphics. Check it out too!.
 
Copyright (c) 2017 Martin Reddy. All rights reserved. Login