API Design for C++, Second Edition
معرفی کتاب «API Design for C++, Second Edition» نوشتهٔ Martin Reddy، منتشرشده توسط نشر Elsevier Science & Technology Books در سال 2024. این کتاب در فرمت epub، زبان انگلیسی ارائه شده است. «API Design for C++, Second Edition» در دستهٔ بدون دستهبندی قرار دارد.
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. Cover image Title page Table of Contents Copyright Author biography Foreword Preface Acknowledgments 1. Introduction What are APIs? What's different about API design? Why should you use APIs? When should you avoid APIs? API examples Libraries, frameworks, and software development kits File formats and network protocols About this book 2. Qualities Model the problem domain Hide implementation details Minimally complete Easy to use Loosely coupled Stable, documented, and tested 3. Patterns Pimpl idiom Singleton Factory Methods API wrapping patterns Observer pattern 4. Design A case for good design Gathering functional requirements Creating use cases Elements of API design Architecture design Class design Function design 5. Styles Flat C APIs Object-oriented C++ APIs Template-based APIs Functional APIs Data-driven APIs 6. C++ usage Namespaces Constructors and assignment Const correctness Templates Operator overloading Function parameters Avoid #define for constants Avoid using friends Exporting symbols Coding conventions 7. C++ revisions Which C++ revision to use C++11 API features C++14 API features C++17 API features C++20 API features C++23 API features 8. Performance Pass input arguments by const reference Minimize #include dependencies Declaring constants Initialization lists Memory optimization Don't inline functions until you need to Copy on write Iterating over elements Performance analysis 9. Concurrency Multithreading with C++ Terminology Accessing shared data Concurrent API design 10. Versioning Version numbers Software branching strategies Life cycle of an API Levels of compatibility How to maintain backward compatibility API reviews 11. Documentation Reasons to write documentation Types of documentation Documentation usability Using Doxygen 12. Testing Reasons to write tests Types of API testing Writing good tests Writing testable code Automated testing tools 13. Objective-C and Swift Interface design in C++ and Objective-C Data hiding in Objective-C Objective-C behind a C++ API C++ behind an Objective-C API C++ behind a Swift API 14. Scripting Adding script bindings Script binding technologies Adding Python bindings with Boost Python Adding Ruby bindings with SWIG 15. Extensibility Extending via plugins Extending via inheritance Extending via templates Appendix A: Libraries References Index
دانلود کتاب API Design for C++, Second Edition