The Chinese version of RESTful Web APIs

Source: Internet
Author: User
Tags oauth custom name http 2

the RESTful Web APIs Chinese version of

Basic information

Original title: RESTful Web APIs

Former publishing house: O ' Reilly Media

Leonard Richardson Mike Amundsen

Translator: Zhao a Li Zhe

Publishing house: Electronic Industry publishing house

isbn:9787121231155

Last Date: 2014-6-11

Publication date: June 2014

Folio: 16 Open

Page: 382

Edition: 1-1

Category: Computer > Computer network > Web Server > WebServer

more about the "" the Chinese version of RESTful Web APIs

Editor's recommendation

In recent years, the prevalence of rest has led to a huge increase in various "RESTful" APIs, but these APIs have missed many of the benefits of architecture. With this practical guide, you will be able to learn how to design a rest API that is available and evolves over time. By focusing on solutions across multiple domains, this book shows you how to create powerful and secure applications using tools designed for the world's most successful distributed computing system, the Web. You'll explore the concepts behind rest, learn a variety of strategies you can use to create Hypermedia-based APIs, and integrate everything you've learned with step-by-steps guidance to design restful Web APIs.

√ Reviewed API design strategies including aggregate mode and pure hypermedia.

√ Understand how to integrate hypermedia and presentation into a consistent API.

√ Explore how the XMDP and Alps profile formats can help you deal with the "semantic challenges" of Web APIs.

√ Learn nearly 20 + standardized hypermedia data formats.

√ Apply best practices for using HTTP in API implementations.

√ Use the JSON-LD standard and other linked data methods to create the Web API.

√ Understand the COAP protocol that uses rest in embedded systems.

Content Introduction

Books

Computer Books

The Chinese version of RESTful Web APIs is a practical guide to the RESTful API by showcasing a variety of powerful tools for creating highly available applications, explaining the underlying principles of rest, and introducing a strategy based on Hypermedia APIs that allows readers to Design a restful Web API that sells customers a high degree of satisfaction. The Chinese version of RESTful web APIs is highly authoritative and forward-looking, representing both the forefront of the API landscape and the most important practices in the API world.

The Chinese version of RESTful Web APIs is suitable for all readers working on web development and architecture.

Media Review

"It's an amazing book!" RESTful Web APIs covers the most important trends and practices in today's API world. ”

--john Musser Programmableweb Founder

As a translator

Leonard Richardson, author of the book "Ruby Cookbook" (O ' Reilly), has created several open source repositories, including beautiful soup. Mike Amundsen is the author of more than 10 acclaimed technical books, including Building hypermedia APIs with HTML5 and Node (O ' Reilly).

Sam Ruby is the co-chair of the Working Group on HTML and is a senior technician at IBM's emerging technology group.

Directory

The Chinese version of RESTful web APIs

Sequence XIX

Preface XXI

1th. Internet surfing 1

Scenario 1: Billboard 2

Resources and Representations 2

Addressable 3

Scenario 2: Home 3

Short Session 5

Self-describing messages (self-descriptive message) 5

Scenario 3: Link 6

Standard Method 8

Scenario 4: Forms and redirection 9

Application status (application state) 11

Resource status (resource state) 12

Connectivity (connectedness) 13

A different web 14

Web API lags behind Web 15

Semantic Challenge 16

The 2nd Chapter a simple API 17

HTTP GET: Secure bet 18

How to read HTTP responses 19

JSON 20

Collection+json 21

Writing data to the API 23

HTTP POST: How resources are generated 24

Brought liberation by restraint 26

Semantic gap arising from the meaning of semantics 27

Chapter 3rd Resources and representations 29

Everything can be a resource 30

Presentation Description Resource Status 30

Presentation of the Shuttle 31

Resources have multiple representations 32

HTTP protocol semantics (protocol semantics) 33

Get 35

Delete 36

Idempotent (idempotence) 36

Post-to-append 37

Put 38

Patch 39

Link and unlink 40

Head 40

Options 41

Overloaded Post 41

What methods should I use? 42

4th Super Media 45

Use HTML as a hypermedia format 46

Uri Template 49

Uri vs URL 50

Link Header 51

The role of Hypermedia 52

Boot Request 52

Making a commitment to the response 54

Workflow Control 55

Beware of fake hypermedia! 56

Semantic challenge: What should we do? 57

5th. field-specific Design 59

Maze+xml: field-specific design 60

How Maze+xml Works 61

Link Relationship 62

Access links to change application status 64

Maze Collection 65

Is maze+xml an API? 67

Client 1: Game 68

Maze+xml Server 72

Client 2: Map Builder 74

Client 3: Bragging 76

Clients do what they want to do 77

Extend the standard by 77

Map Builder Bug 80

Fixed (and repaired defects) 81

Maze of metaphors 83

Addressing the semantic divide 83

Where is the domain-specific design? 83

The ultimate Reward 84

Hypermedia in the header 84

Plagiarism Application Semantics 84

If you cannot find the relevant field-specific design, do not make your own 86

Types of API Clients 86

Human-driven Client 86

Automation client 87

6th Chapter Set Pattern (collection pattern) 91

What is a collection? 93

A collection of links to children 93

Collection+json 94

The representation of a subkey 95

Write Template 98

Search for Templates 99

How a (Common) collection Works 100

Get 101

Post-to-append 101

Put and Patch 101

Delete 102

Page 102

Search Form 103

Atom Release Protocol (ATOMPUB) 103

AtomPub plug-in standard 105

Why not everyone chooses to use atompub? 106

Semantic challenge: What should we do? 107

7th Pure-Hypermedia Design 111

Why is HTML? 111

The ability to HTML 112

Hyper Media Control 112

should be semantic plug-in 113

Micro Format 115

Hmaze Micro Format 116

Micro Data 118

Change Resource Status 119

Add app semantics to a form 121

Relative to Hypermedia Media 125

Limitations of HTML 126

The Savior HTML5? 127

Hypertext Application Language 128

Siren 131

Semantic challenge: What are we going to do now? 133

Chapter 8th Profile 135

How do clients find documents? 136

What is profile? 137

Linking to Profile 137

Profile Link Relationship 137

Profile Media type parameter 138

Special-Purpose Hypermedia controls 139

Profile description of the protocol semantics 139

Description of the corresponding semantic of the profile 140

Link Relationship 141

Unsafe Link Relationship 142

Semantics Descriptor 142

XMDP: First machine-readable profile format 143

Alps 146

Alps ' Advantage 150

Alps is not a balm 152

JSON-LD 153

Embedded Document 156

Summary 158

9th. API Design Flow 161

Two-Step design process 161

Seven-step design process 162

1th Step: List the semantic descriptor 163

2nd step: Draw status Diagram 164

3rd Step: Adjust naming 168

4th step: Select a media type 172

5th Step: Writing Profile 173

6th step: Achieve 174

7th Step: Release 174

Example: You type it, we post it 177

List the Semantics descriptor 177

Drawing status Diagram 178

Adjust name 179

Select a media type 180

Writing profile 181

Design Recommendations 182

Resources are the internal details of the implementation 182

Do not fall into collection traps 183

Don't start with the presentation format 184

URL design is not important 184

Standard name is better than custom name 186

Design Media Type 187

When your API changes 189

Add Hypermedia 194 to an existing API

Improving the XML-based API 195

Is it worth the value? 196

Alice's second expedition 196

Scenario 1: Meaningless representations 196

Scene 2:profile 198

Alice understands. 200

10th-Hypermedia Zoo 203

Domain-specific formats 204

Maze+xml 204

OpenSearch 205

Issue Details Document 205

SVG 206

VoiceXML 208

Format of the collection pattern 210

Collection+json 211

Atom Release Protocol 211

OData 212

Pure hypermedia Format 219

HTML 219

Hal 220

Link Header 222

Location and Content-location Header 222

URL List 223

JSON main document (home documents) 223

Link-template Header 224

WADL 225

XLink 226

XForms 227

Geojson: A confusing type 228

Geojson no universal hypermedia controls 230

Geojson No Media type 232

Lessons learned from Geojson 233

Semantic Zoo 234

IANA registry for link relationships 234

Micro-format Wiki 235

Link relationship from a micro-format wiki 236

11th HTTP 241 in the API

New http/1.1 Specification 242

Response Code 242

Header 243

Presentation Options 243

Content Negotiation (negotiation) 243

Hyper Media Menu 244

Standard URL (canonical URL) 245

HTTP Performance 246

Cache (Caching) 246

Conditional GET request (conditional get) 247

Look-before-you-leap Request 249

Compression 250

Partial GET request (partial get) 250

Pipelining 251

Avoid update loss issues 252

Certifications 254

Www-authenticate Header and Authorization header 255

Basic Certification 255

OAuth 1.0 256

The disadvantage of OAuth 1.0 259

OAuth 2.0 260

When not to use OAuth 261

HTTP Extensions 261

Patch Method 262

Link and unlink Method 262

WebDAV 263

HTTP 2.0 264

12th. Resource description and linked data 267

RDF 268

RDF treats URLs as URIs 270

When to use the description policy 271

Resource Type 273

RDF Schema 274

Linked Data Movement 277

JSON-LD 278

Use JSON-LD as a presentation format 279

Hydra 280

XRD Family 285

XRD and JRD 285

Web host metadata Document 286

Webfinger 287

Main body Zoo (ontology) 289

schema.org RDF 289

FOAF 290

Vocab.org 290

Summary: Describe the strategy alive! 290

13th Coap: Rest 293 of embedded systems

Coap Request 294

Coap Response 294

Message Type 295

Delayed response (delayed response) 296

Multicast messages (Multicast message) 296

Core link Format 297

Conclusion: Rest 298 for non-HTTP protocol

Appendix A, Status Code 301

Appendix B HTTP Header Code 325

Appendix C fielding paper for API designers 349

Glossary 365

the source of this book information: Interactive Publishing Network

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.