
Designing Evolvable Web APIs with ASP.NET
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
More details
Other editions
Additional editions

Content
- Intro
- Copyright
- Table of Contents
- Foreword
- Preface
- Why Should You Read This Book?
- What Do You Need to Know to Follow Along?
- The Hitchhiker's Guide to Navigating This Book
- Part I, Fundamentals
- Part II, Real-World API Development
- Part III, Web API Nuts and Bolts
- Conventions Used in This Book
- Using Code Examples
- Safari® Books Online
- How to Contact Us
- Acknowledgments
- Chapter 1. The Internet, the World Wide Web, and HTTP
- Web Architecture
- Resource
- URI
- Cool URIs
- Representation
- Media Type
- HTTP
- Moving Beyond HTTP 1.1
- HTTP Message Exchange
- Intermediaries
- Types of Intermediaries
- HTTP Methods
- Headers
- HTTP Status Codes
- Content Negotiation
- Caching
- Authentication
- Authentication Schemes
- Additional Authentication Schemes
- Conclusion
- Chapter 2. Web APIs
- What Is a Web API?
- What About SOAP Web Services?
- Origins of Web APIs
- The Web API Revolution Begins
- Paying Attention to the Web
- Guidelines for Web APIs
- Domain-Specific Media Types
- Media Type Profiles
- Multiple Representations
- API Styles
- The Richardson Maturity Model
- RPC (RMM Level 0)
- Resources (RMM Level 1)
- HTTP VERBS (RMM Level 2)
- Crossing the Chasm Toward Resource-Centric APIs
- Hypermedia (RMM Level 3)
- REST
- REST Constraints
- Conclusion
- Chapter 3. ASP.NET Web API 101
- Core Scenarios
- First-Class HTTP Programming
- Symmetric Client and Server Programming Experience
- Flexible Support for Different Formats
- No More "Coding with Angle Brackets"
- Unit Testability
- Multiple Hosting Options
- Getting Started with ASP.NET Web API
- Exploring a New Web API Project
- WebApiConfig
- ValuesController
- "Hello Web API!"
- Creating the Service
- The Client
- The Host
- Conclusion
- Chapter 4. Processing Architecture
- The Hosting Layer
- Message Handler Pipeline
- Route Dispatching
- Controller Handling
- The ApiController Base Class
- Conclusion
- Chapter 5. The Application
- Why Evolvable?
- Barriers to Evolution
- What Is the Cost?
- Why Not Just Version?
- Walking the Walk
- Application Objectives
- Goals
- Opportunity
- Information Model
- Subdomains
- Related Resources
- Attribute Groups
- Collections of Attribute Groups
- Information Model Versus Media Type
- Collections of Issues
- Resource Models
- Root Resource
- Search Resources
- Collection Resources
- Item Resources
- Conclusion
- Chapter 6. Media Type Selection and Design
- Self-Description
- Types of Contracts
- Media Types
- Primitive Formats
- Popular Formats
- New Formats
- Hypermedia Types
- Media Type Explosion
- Generic Media Types and Profiles
- Other Hypermedia Types
- Link Relation Types
- Semantics
- Replacing Embedded Resources
- Indirection Layer
- Reference Data
- Workflow
- Syntax
- A Perfect Combination
- Designing a New Media Type Contract
- Selecting a Format
- Enabling Hypermedia
- Optional, Mandatory, Omitted, Applicable
- Embedded Versus External Metadata
- Extensibility
- Registering the Media Type
- Designing New Link Relations
- Standard Link Relations
- Extension Link Relations
- Embedded Link Relations
- Registering the Link Relation
- Media Types in the Issue Tracking Domain
- List Resources
- Item Resources
- Discovery Resource
- Search Resource
- Conclusion
- Chapter 7. Building the API
- The Design
- Getting the Source
- Building the Implementation Using BDD
- Navigating the Solution
- Packages and Libraries
- Self-Host
- Models and Services
- Issue and Issue Store
- IssueState
- IssuesState
- Link
- IssueStateFactory
- LinkFactory
- IssueLinkFactory
- Acceptance Criteria
- Feature: Retrieving Issues
- Retrieving an Issue
- Retrieving Open and Closed Issues
- Retrieving an Issue That Does Not Exist
- Retrieving All Issues
- Retrieving All Issues as Collection+Json
- Searching Issues
- Feature: Creating Issues
- Feature: Updating Issues
- Updating an Issue
- Updating an Issue That Does Not Exist
- Feature: Deleting Issues
- Deleting an Issue
- Deleting an Issue That Does Not Exist
- Feature: Processing Issues
- The Tests
- The Implementation
- Conclusion
- Chapter 8. Improving the API
- Acceptance Criteria for the New Features
- Implementing the Output Caching Support
- Adding the Tests for Output Caching
- Implementing Cache Revalidation
- Implementing Conditional GETs for Cache Revalidation
- Conflict Detection
- Implementing Conflict Detection
- Change Auditing
- Implementing Change Auditing with Hawk Authentication
- Tracing
- Implementing Tracing
- Conclusion
- Chapter 9. Building the Client
- Client Libraries
- Wrapper Libraries
- Links as Functions
- Application Workflow
- Need to Know
- Clients with Missions
- Client State
- Conclusion
- Chapter 10. The HTTP Programming Model
- Messages
- Headers
- Message Content
- Consuming Message Content
- Creating Message Content
- Conclusion
- Chapter 11. Hosting
- Web Hosting
- The ASP.NET Infrastructure
- ASP.NET Routing
- Web API Routing
- Global Configuration
- The Web API ASP.NET Handler
- Self-Hosting
- WCF Architecture
- The HttpSelfHostServer Class
- The HttpSelfHostConfiguration Class
- URL Reservation and Access Control
- Hosting Web API with OWIN and Katana
- OWIN
- The Katana Project
- Web API Configuration
- Web API Middleware
- The OWIN Ecosystem
- In-Memory Hosting
- Azure Service Bus Host
- Conclusion
- Chapter 12. Controllers and Routing
- HTTP Message Flow Overview
- The Message Handler Pipeline
- Dispatcher
- HttpControllerDispatcher
- Controller Selection
- Controller Activation
- The Controller Pipeline
- ApiController
- ApiController Processing Model
- Conclusion
- Chapter 13. Formatters and Model Binding
- The Importance of Models in ASP.NET Web API
- How Model Binding Works
- Built-In Model Binders
- The ModelBindingParameterBinder Implementation
- Value Providers
- Model Binders
- Model Binding Against URIs Only
- The FormatterParameterBinder Implementation
- Default HttpParameterBinding Selection
- Model Validation
- Applying Data Annotation Attributes to a Model
- Querying the Validation Results
- Conclusion
- Chapter 14. HttpClient
- HttpClient Class
- Lifecycle
- Wrapper
- Multiple Instances
- Thread Safety
- Helper Methods
- Peeling Off the Layers
- Completed Requests Don't Throw
- Content Is Everything
- Cancelling the Request
- SendAsync
- Client Message Handlers
- Proxying Handlers
- Fake Response Handlers
- Creating Resuable Response Handlers
- Conclusion
- Chapter 15. Security
- Transport Security
- Using TLS in ASP.NET Web API
- Using TLS with IIS Hosting
- Using TLS with Self-Hosting
- Authentication
- The Claims Model
- Retrieving and Assigning the Current Principal
- Transport-Based Authentication
- Server Authentication
- Client Authentication
- The HTTP Authentication Framework
- Implementing HTTP-Based Authentication
- Katana Authentication Middleware
- Active and Passive Authentication Middleware
- Web API Authentication Filters
- Token-Based Authentication
- The Hawk Authentication Scheme
- Authorization
- Authorization Enforcement
- Cross-Origin Resource Sharing
- CORS Support on ASP.NET Web API
- Conclusion
- Chapter 16. The OAuth 2.0 Authorization Framework
- Client Applications
- Accessing Protected Resources
- Obtaining Access Tokens
- Authorization Code Grant
- Scope
- Front Channel Versus Back Channel
- Refresh Tokens
- Resource Server and Authorization Server
- Processing Access Tokens in ASP.NET Web API
- OAuth 2.0 and Authentication
- Scope-Based Authorization
- Conclusion
- Chapter 17. Testability
- Unit Tests
- Unit Testing Frameworks
- Getting Started with Unit Testing in Visual Studio
- xUnit.NET
- The Role of Unit Testing in Test-Driven Development
- Unit Testing an ASP.NET Web API Implementation
- Unit Testing an ApiController
- Unit Testing a MediaTypeFormatter
- Unit Testing an HttpMessageHandler
- Unit Testing an ActionFilterAttribute
- Unit Testing Routes
- Integration Tests in ASP.NET Web API
- Conclusion
- Appendix A. Media Types
- Appendix B. HTTP Headers
- Appendix C. Content Negotiation
- Proactive Negotiation
- Reactive Negotiation
- Appendix D. Caching in Action
- Appendix E. Authentication Workflows
- Appendix F. Media Type Specification for application/issue+json
- Notational Conventions
- Issue Documents
- Security Considerations
- Interoperability Considerations
- IANA Considerations
- Appendix G. Public-Key Cryptography and Certificates
- Revocation
- Creating Test Keys and Certificates
- Index
- About the Authors
System requirements
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.