Автор: Martin Reddy
Издательство: Morgan Kaufmann/Elsevier
Год: 2024
Страниц: 650
Язык: английский
Формат: pdf (true)
Размер: 51.3 MB
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.
Writing large applications in C++ is a complex and tricky business. However, designing reusable C++ interfaces that are robust, stable, easy to use, and durable is even more difficult. The best way to succeed in this endeavor is to adhere to the tenets of good API design. An API presents a logical interface to a software component and hides the internal details required to implement that component. It offers a high-level abstraction for a module and promotes code reuse by allowing multiple applications to share the same functionality. Modern software development has become highly dependent upon APIs, from low-level application frameworks to data format APIs and graphical user interface (GUI) frameworks. In fact, common software engineering terms such as modular development, code reuse, componentization, dynamic link library, software frameworks, distributed computing, and service-oriented architecture all imply the need for strong API design skills.
Some popular C and C++ APIs that you may already recognize include the C++ Standard Library, Boost, the Microsoft Windows API (Win32), Microsoft Foundation Classes, libtiff, libpng, zlib, libxml++, OpenGL, MySQL++, Qt, wxWidgets, GTK+, KDE, SkypeKit, Intel’s Threading Building Blocks, the Netscape Plugin API, and the Apache module API. In addition, many of Google’s open-source projects are C++, as is a lot of the code on the GitHub website. APIs such as these are used in all facets of software development, from desktop applications to mobile computing, and from embedded systems to Web development. For example, the Mozilla Firefox Web browser is built on top of more than 80 dynamic libraries, each of which provides the implementation for one or more APIs. Elegant and robust API design is therefore a critical aspect of contemporary software development.
Key Features:
• 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
Скачать API Design for C++, 2nd Edition