Vous voulez voir cette page en français ? Cliquez ici.


or
Sign in to turn on 1-Click ordering.
More Buying Choices
Have one to sell? Sell yours here
API Design for C++
 
 

API Design for C++ [Paperback]

Martin Reddy

List Price: CDN$ 64.95
Price: CDN$ 53.32 & this item ships for FREE with Super Saver Shipping. Details
You Save: CDN$ 11.63 (18%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.ca. Gift-wrap available.
Only 4 left in stock--order soon (more on the way).
Want it delivered Friday, May 25? Choose One-Day Shipping at checkout.

Customers Who Bought This Item Also Bought


Product Details


Product Description

Review

Martin Reddy draws from his experience on large scale, collaborative software projects to present patterns and practices that provide real value to individual developers as well as organizations. API Design for C++ explores often overlooked issues, both technical and non- technical, contributing to successful design decisions that produce high quality, robust, and long-lived APIs. - Eric Gregory, Software Architect, Pixar Animation Studios

"Intended for programmers with intermediate to advanced skills in the C++ programming language, this guide to the building of useful and robust application programming interfaces (APIs) provides practical instruction for software engineers developing systems on which downstream software engineers depend. The work provides a methodical approach to API design covering solution based API design, performance, versioning, documentation, testing, scripting, extensibility and libraries. The work includes numerous illustrations and code examples and access to additional online resources is provided. Reddy is a software development consultant."--Book News, Reference & Research

Book Description

The design of application programming interfaces can affect the behavior, capabilities, stability, and ease of use of end-user applications. With this book, you will learn how to design a good API for large-scale long-term projects. With extensive C++ code to illustrate each concept, API Design for C++ covers all of the strategies of world-class API development. Martin Reddy draws on over fifteen years of experience in the software industry to offer in-depth discussions of interface design, documentation, testing, and the advanced topics of scripting and plug-in extensibility. Throughout, he focuses on various API styles and patterns that will allow you to produce elegant and durable libraries.

  • The only book that teaches the strategies of C++ API development, including design, versioning, documentation, testing, scripting, and extensibility.
  • Extensive code examples 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.


Inside This Book (Learn More)
Browse Sample Pages
Front Cover | Copyright | Table of Contents | Excerpt | Index
Search inside this book:

Tag this product

 (What's this?)
Think of a tag as a keyword or label you consider is strongly related to this product.
Tags will help all customers organize and find favorite items.
Your tags: Add your first tag
 

Customer Reviews

There are no customer reviews yet on Amazon.ca
5 star:    (0)
4 star:    (0)
3 star:    (0)
2 star:    (0)
1 star:    (0)
 
 
 
Share your experience with this product with others
Create your own review
Most Helpful Customer Reviews on Amazon.com (beta)
Amazon.com: 4.8 out of 5 stars (26 customer reviews)

28 of 30 people found the following review helpful
5.0 out of 5 stars A good overview of how to write good C++ code, Mar 7 2011
By M. Wilson "rochesterguy" - Published on Amazon.com
Amazon Verified Purchase(What's this?)
This review is from: API Design for C++ (Paperback)
A good book, but I don't think an experienced C++ programmer would find anything too surprising in it. It IS a very good tutorial for newer programmers, or someone coming from Java API design. The author does a nice job of explaining a lot of what has been discussed in Meyers' and Sutter's book; none of the lengthy set up and quizzing, he just explains it and shows the reader why it is important. He concisely explains things like Liskov, Open-Closed, etc., the PIMPL idiom, and creation patterns, and gives some good advice on how to version your API, and control development in a source control system. It's basically a pretty complete look at the whole process of writing an API.

23 of 26 people found the following review helpful
5.0 out of 5 stars A must-have for serious C++ software developers, Aug 3 2011
By D. Smith - Published on Amazon.com
Amazon Verified Purchase(What's this?)
This review is from: API Design for C++ (Paperback)
First, the summary: This is an outstanding book which covers a very large range of topics very effectively. Don't be fooled by the title - even though APIs are covered very thoroughly, the book contains a great deal of wisdom beyond the API (at least by my definition of "API") - it discusses the design and implementation of well-encapsulated software components, performance, design patterns, effective use of the C++ programming language, and much more. Important topics that are often overlooked by other books, such as documentation, testing, versioning and scripting, are also covered. The book is extremely well written, and the typesetting and layout of the book is very well done. The book never loses sight of the motivation for a solid API - the winners are your clients and your business.

Usually when I think of an API, I think of the interface to a library / component. You know, function prototypes, class documentation, maybe some man pages or background documentation. All of that material is covered in great depth, but what the book is really about is *everything* that goes into designing and implementing software components / libraries properly. When writing a library, only the API is exposed to the user, and this is where a lot of the hard work is. Deciding what needs to be exposed, and how it should be exposed, is often not easy. As the author states, you can always change the underlying implementation, but you really need to think through the API before unleashing your API on the world. That's why it's so important to "get it right the first time" - changes afterwards can be tremendously costly. This book will help you get it right the first time.

In my work, I spend a lot of my time re-factoring software components & their interfaces to make them less fragile, more re-usable, more testable, and easier to use correctly. This book taught me a couple new tricks that will help me do that better. And no doubt, in the rare case where I actually get to create a library/API from scratch, I'll also do a better job going forward. (If enough people buy this book, I might have to start looking a lot harder for clients!)

You can browse the Table of Contents yourself to see the range of topics covered - it's broad. There isn't a weak chapter in the book. I don't think I found a single technical mistake or inaccuracy in the book. The code examples are small, concise, illustrative and clean. The writing is stellar. Rather than just dictate a bunch of rules, the author provides the rationale for the suggestions. The author also cites references and sources for further reading throughout the book.

Another nice aspect of the book is how the author's real-world experience on very large & complex development projects shines through when discussing certain topics. The information in the book has been obtained by lots of hard work, and seeing what works and what doesn't.

I liked the book's treatment of C++-specific features that can contribute to writing a good API. Language features such as templates, namespaces, inheritance and const correctness are discussed very effectively. Even features in the upcoming C++0x (or whatever it's called these days) standard, at least those that can help improve your API, are covered too.

The book reads very well. Anyone who's opened Stroustrup's "The C++ Programming Language" knows that poor typesetting can have a large negative impact of the book's readability. This book is just the opposite. The fonts are clean, code is well-formatted, tips are called out in highlight boxes, and diagrams are clear and uncluttered. Boldface, bullet items and numbered lists are used effectively to guide the reader's eyes throughout the reading. To me, this is very important - I've come across several books that appeared to be nothing more than Word documents printed out & bound. The content is well-organized and the topics flow well. It never feels like something was just "shoehorned" into a chapter because there was no better place to put it.

The bottom line: if you're writing C++ (or even C) code for other people to use, you need this book.

7 of 7 people found the following review helpful
5.0 out of 5 stars Great Book on Writing Maintainable C++, Dec 20 2011
By Glenn R. Howes - Published on Amazon.com
This review is from: API Design for C++ (Paperback)
Pre-release customer review from the Amazon Vine™ Program
My job is maintaining and expanding a large cross-platform desktop application which was originally written in 1986 by highly intelligent but inexperienced developers, and whose code is also used for browser plugins. If only I could have sent back in time this book! My life would be easy. I wouldn't have spent years of my life getting the basics of maintainability in place, simple things like using accessor methods, but also more subtle concepts like the importance of decoupling objects and techniques to decouple. This book is nominally about putting together APIs, but along the way it encourages and demands the programmer choose the most maintainable, robust and professionally rigorous techniques in order to reach the goal of an easy to use, hard to screw up, predictable and stable external API.

I want to emphasize the importance of such software traits as modularity, implementation hiding, and decoupling in any large project, in my own case I see years of what the book calls "software debt" accumulating and coming due with a vengeance. If robust techniques are not mandated and enforced every day of the release cycle eventually the codebase will become daunting to modify or fix. Such techniques given in the book as factory methods, the observer/broadcaster pattern, and such off the shelf technologies like Boost to ease implementation of these techniques are just what you have to use in order to keep sane and keep your cash cow alive.

Not that I don't have quibbles with certain techniques. I'm no fan of the PIMPL pattern and prefer to solve the same problem of implementation hiding with virtual base class interfaces and class factory methods. But then again, I don't write libraries, I write applications and plugins, so I will defer to Mr. Reddy's judgement for when it comes to libraries.

There is a very clear chapter on various topics in using the C++ language such as best practices for using templates. Now, I avoid templates (other than using STL and boost) like the plague; I don't like the syntax, and I don't come across many interesting cases where I need to share methods amongst different data types, so yes, I'm not a generic style programmer, but I will admit that the template techniques as the author puts them forward seem clear and useful enough, including the Curiously Recurring Template Pattern which he tucks into the last pages of the last chapter.

The book has interesting chapters on such topics as adding scripting interfaces in either Python or Ruby. Once it's all lain out, it almost seems simple to create one, especially if you are using pre-existing frameworks like Boost or Swig to do the heavy lifting. There is an Appendix devoted to library packaging technologies which would have been useful to know back in the day.

So my recommendation is that if you are a C++ programmer and you want to improve yourself, to learn from a master, and be able to call yourself a professional coder, then you need to read this book. It is the best technical book I've read in years and I've recommended it to everyone on my team.
 Go to Amazon.com to see all 26 reviews  4.8 out of 5 stars 

Listmania!

Create a Listmania! list

Look for similar items by category


Look for similar items by subject


Feedback


Amazon.ca Privacy Statement Amazon.ca Shipping Information Amazon.ca Returns & Exchanges