API Design for Web and Mobile
MTA
Building scalable, secure, and developer-friendly APIs that power modern apps
2nd Edition
Modern API design is a multidisciplinary craft that balances architectural paradigms—REST, GraphQL, and gRPC—with product-centric thinking to deliver scalable and developer-friendly interfaces. The book emphasizes that there is no universal "best" style; instead, high-performing systems often employ hybrid strategies, such as using GraphQL at the edge for client flexibility and gRPC internally for high-throughput, low-latency microservice communication. Success begins with robust resource modeling and Domain-Driven Design (DDD), ensuring the API reflects a "ubiquitous language" shared by developers and business stakeholders alike.
Beyond initial design, the book provides a deep dive into the technical patterns essential for operational excellence. It covers the mechanics of stable API contracts through versioning strategies and the implementation of ergonomics like pagination, filtering, and sorting. Reliability is treated as a first-class requirement, managed through defensive patterns such as exponential backoff retries, timeouts, and circuit breakers. These are reinforced by Service Level Objectives (SLOs) and a comprehensive observability stack—logging, metrics, and tracing—to ensure performance remains predictable even during the "long tail" of latency.
Security and compliance are integrated throughout the development lifecycle rather than being treated as afterthoughts. The text outlines industry-standard authentication via OAuth 2.0 and OIDC, alongside granular authorization and strict input validation to mitigate injection and IDOR attacks. It also addresses the logistical challenges of data privacy (GDPR/CCPA) and data residency in multi-region deployments. To maintain this security posture at scale, the book advocates for a "security-by-design" approach, including the use of dedicated secrets management and API gateways to centralize policy enforcement.
Finally, the book addresses the practicalities of the developer experience (DX) and modern delivery. It highlights the importance of comprehensive documentation, idiomatic SDKs, and sandboxes in fostering a thriving ecosystem. It concludes with an operational roadmap for CI/CD, detailing how to achieve zero-downtime deployments through rolling, blue/green, or canary releases. By focusing on mobile-specific constraints like offline sync and network variability, the text provides a holistic guide for building resilient APIs that can evolve gracefully from initial launch to global scale.
This book is designed for software engineers, API architects, and technical leads responsible for designing, building, and operating APIs that power web and mobile applications. It will be particularly valuable for teams making critical decisions about API styles (REST, GraphQL, gRPC) and those needing to implement scalable, secure, and developer-friendly interfaces. Mobile backend developers and full-stack engineers working on client-server applications will find the mobile-specific patterns and performance optimization techniques especially relevant. Whether you're building public APIs for third-party developers or internal service-to-service communication, this guide provides the patterns and practices needed to succeed.
January 30, 2026
52,888 words
3 hours 42 minutes
Click to order this hardcover:
Buy NowPrint copy is made to order and ships worldwide. Includes the ebook free, ready to read instantly.
$5 account credit for all new MixCache.com accounts!