API Design for C++

Pratical techniques of API design that produce robust code for the long term

Specificaties
Paperback, 441 blz. | Engels
Morgan Kaufmann Publishers | 1e druk, 2011
ISBN13: 9780123850034
Rubricering
Hoofdrubriek : Computer en informatica
Morgan Kaufmann Publishers 1e druk, 2011 9780123850034
Verwachte levertijd ongeveer 9 werkdagen

Samenvatting

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.

Key Features:
- 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.
Related Links and Downloads

This book is for software engineers developing C++ code to be used by other developers, whether via APIs, libraries, device drivers, or other reusable components.

Specificaties

ISBN13:9780123850034
Taal:Engels
Bindwijze:paperback
Aantal pagina's:441
Druk:1

Inhoudsopgave

Foreword
Preface

1. Introduction
-What Are Application Programming Interfaces?
-What's Different about API Design?
-Why Should You Use APIs?
-When Should You Avoid APIs?
-API Examples
-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
-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. Performance
-Pass Input Arguments by Const Reference
-Minimize #include Dependencies
-Declaring Constants
-Initialization Lists
-Memory Optimization
-Don't Inline Until You Need To
-Copy on Write
-Iterating Over Elements
-Performance Analysis

8. Versioning
-Version Numbers
-Software Branching Strategies
-Life Cycle of an API
-Levels of Compatibility
-How to Maintain Backward Compatibility
-API Reviews

9. Documentation
-Reasons to Write Documentation
-Types of Documentation
-Documentation Usability
-Using Doxygen

10. Testing
-Reasons to Write Tests
-Types of API Testing
-Writing Good Tests
-Writing Testable Code
-Automated Testing Tools

11. Scripting
-Adding Script Bindings
-Script-Binding Technologies
-Adding Python Bindings with Boost Python
-Adding Ruby Bindings with SWIG

12. Extensibility
-Extending via Plugins
-Extending via Inheritance
-Extending via Templates

Appendix A: Libraries
-Static versus Dynamic Libraries
-Libraries on Windows
-Libraries on Linux
-Libraries on Mac OS X
-Bibliography

Index

Net verschenen

Rubrieken

Populaire producten

    Personen

      Trefwoorden

        API Design for C++