API Design for C++ (英语) 平装
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
Dr. Martin Reddy is the founder and CEO of the software consultancy firm Code Reddy Inc. He holds a Ph.D. in Computer Science and has over 15 years of experience in the software industry. During this time, he has written 3 software patents and has published over 40 professional articles and a book on 3D computer graphics. Dr. Reddy worked for 6 years at Pixar Animation Studios where he was lead engineer for the studio's in-house animation system. This work involved the design and implementation of various APIs to support several Academy Award-winning and nominated films, such as "Finding Nemo", "The Incredibles", "Cars", "Ratatouille", and "Wall-E." Dr. Reddy currently works for Linden Lab on the Second Life Viewer, an online 3D virtual world that has been used by over 16 million users around the world. His work is currently focused on a radical redesign of the Second Life Viewer, putting in place a suite of robust APIs to enable extensibility and scriptability.
|5 星 (0%)|
|4 星 (0%)|
|3 星 (0%)|
|2 星 (0%)|
|1 星 (0%)|
This book is also chock-full of little gems of knowledge that typically require scouring the web and then sorting the wheat from the chaff. For example, pages 195-197 contain a concise list of the C++ operator syntax, showing the operator name, the typical syntax, and the recommended operator declaration to use (both free-function and member forms) if you want to overload that operator while maintaining compatibility with the standard C/C++ usage of that operator. This is the table that should have been included in Stroustrup's 'The C++ Programming Language' but wasn't.
Last but not least, the breadth of topics discussed is outstanding. Everything from how to begin the design of an interface (API), through the most commonly-used implementation design patterns, coding conventions, version numbering, performance, documentation, testing, script binding and plugin architectures, to creating library packages on all three major architectures (Linux, Mac and Windows). All three major platforms are discussed in equal depth when appropriate, eg.,the different debugging tools available on each platform, but this book isn't platform-specific. Most of my coding is for embedded systems on Linux, and I didn't feel slighted in the least by the content in this book.
This is not a beginner's book for learning C++. It's also not going to replace the need for the GoF Design Patterns book or teach you template meta-programming. It's for experienced C++ programmers with a project or two under their belt, and for those folks it's probably not going to teach them something they didn't already know. What this book does is remind you--that experienced C++ programmer--of all those things you've forgotten, those good practices you knew you should have used on that last project but didn't, or show you why the way you've been doing it really isn't the best approach. This book reminds you to be a better programmer.
This is not a book strictly about design patterns. While there are a few chapters dedicated to choice design patterns, most of the book is about how to integrate these patterns into an API and more importantly when to used which pattern. The first few chapters are dedicated to the ideas of software design. It is in these chapters that a few specific design patterns are introduced, but these are mainly high-level concepts about what an API ought to be.
Despite the books title of API Design for C++, the book does dedicate a chapter to a straight-C design approach. This is followed by it's C++ counterpart. In it's quest for completeness, chapters on performance considerations, versioning and documenting your API and how to completely test it's implementation follow. The book concludes with a pair of equally brilliant chapters on extending your API through scripting and plugins, including a couple of specific examples using Ruby and Python.
Often, programming books suffer from the same flaw when it comes to the supplied source code. The code is buggy, poorly structured and nearly useless. Fortunately, the code for API Design for C++ is of much higher quality. Code samples compile and work without spending a great deal of time debugging. The code should be easy to follow when accompanied by the book. Overall, it seems like as much effort was put into the code as the text itself instead of the code being a last minute rush job to meet a deadline.