API Design for C++, Second Edition provides a comprehensive discussion of Application Programming Interface (API) development, from initial design through implementation, testing, documentation, release, versioning, maintenance, and deprecation. It is the only book that teaches the strategies of C++ API development, including interface design, versioning, scripting, and plug-in extensibility. Drawing from the author's experience on large scale, collaborative software projects, the text offers practical techniques of API design that produce robust code for the long-term. It presents patterns and practices that provide real value to individual developers as well as organizations.The Second Edition includes all new material fully updated for the latest versions of C++, including a new chapter on concurrency and multithreading, as well as a new chapter discussing how Objective C++ and C++ code can co-exist and how a C++ API can be accessed from Swift programs. In addition, it explores often overlooked issues, both technical and non-technical, contributing to successful design decisions that produce high quality, robust, and long-lived APIs. It focuses on various API styles and patterns that will allow you to produce elegant and durable libraries. A discussion on testing strategies concentrates on automated API testing techniques rather than attempting to include end-user application testing techniques such as GUI testing, system testing, or manual testing.
- Teaches the strategies of C++ API development, including design, versioning, documentation, testing, scripting, and extensibility - Includes extensive code examples that illustrate each concept, with fully functional examples and working source code for experimentation available online - Covers various API styles and patterns, with a focus on practical and efficient designs for large-scale, long-term projects - Includes updated URLs and ensures all code examples continue to work with modern compilers and supporting tools
I learned almost nothing from this, maybe the inevitable consequence of spending so much of my life at this game. You just can never tell until you've been through it.
A useful compendium of best practices for any novice though. Succinct, well organised and competently written. But oh how I wish for something of the quality of a Jon Bentley or a Herb Sutter.
This entire review has been hidden because of spoilers.
In practice, this is more a book of good development practices, a bit like Code Complete, but more concise and slightly directed towards public API development.
I didn't learn anything new, but it's a nice compilation and might be worth for beginners.
I haven't read this book cover to cover as I was already familiar with some of the concepts, like the design patterns. But being primarily a developer for C APIs, I found this book immensely useful when given the task to design a C++ API. Accidentally breaking backward compatibility is probably the biggest nightmare of any SDK developer, and this book extensively covers what you need to do to avoid it. I didn't know the ABI compatibility is so fragile in C++, and I'm sure the book has saved me a lot of headaches. After reading it I really understand why some people choose to expose their API in C even though what's underneath is full C++.
This is a really easy read. Nothing complicated, just good advices. Most of them things that I've been implementing, or already knew. But it's always interesting to reinforce our knowledge. I feel it's a book that all software engineers should read. The world would be a better place if they followed the advice herein.
The only thing I would say is arguable is the treatment of copy-on-write (COW). The opinion expressed by this author doesn't consider the arguments given by Sutter in "More Exceptional C++" item 16. The dangers of COW in multi-threaded environments.
Great first few chapters with practical advice on C++ API design; rest of the book devolved into high-level rehash of other works, a lot of it out of date.
A must read for any C++ programmer. It basically ensures that the stuff one's suppose to be aware of and know in-depth are still in the attic of the mind. It's definitely one for the shelf.