What exactly does RESTful Web service do ~
Although REST is not a new term in the domestic technical field, there is little information about REST in Chinese. So far, it seems that there is only a Chinese translation of Dr. Roy Thomas Fielding's thesis. With the launch of the Chinese version of RESTful Web Services, the lack of REST Chinese materials is expected to improve. This book is also the first book published in China with the theme of rest. In view of the fact that the original version of this book was only published in May 2007, and the Chinese version was launched in only one year, people have to sigh the efficiency of domestic publishing houses. In addition, due to the consistent reputation of the publisher O'Reilly, the quality of this book is naturally expected. The book RESTful Web Services answers the following three questions: What is RESTful Service? How to design and implement RESTful service? What is RESTful service? This is the theme of the first three chapters of this book. In this part, the author introduces Web services from the client's point of view, and points out the characteristics of RESTful services. In the first chapter of this book, programmable Web and its classification. The author divides the common Web service architectures into three categories: REST-oriented architecture, resource-oriented architecture and RPC-oriented architecture, and the secret of determining which category Web service belongs to lies in the answers to the following two questions: Does the method information of the service appear in the HTTP method? Does the scope information of the service appear in the URI? Two extreme answers: all yes and all no, corresponding to REST architecture and RPC architecture respectively. In the middle is the REST-RPC hybrid architecture. Readers unfamiliar with the word programmable Web need not care. This is a method to classify network users. As the name implies, programmable Web refers to the Web used by programs, and the corresponding word is Human Web, and its users are human. But strictly speaking, human beings also browse the web through programs (such as browsers), so human web pages are actually a special case of programmable web pages. The other two chapters of this part introduce the writing of Web service client and the characteristics of RESTful service respectively, and illustrate some important concepts of REST with examples: resources, representation and unified interface. How to design and implement RESTful service is the core of this book, and Chapter 4, Resource Oriented Architecture (ROA), is the core of this part. The purpose of putting forward ROA has been clearly stated in the preface: We refine the experience in folklore into the best practice of Web service design by formulating this resource-oriented architecture (ROA). The author describes ROA:ROA is a method to turn practical problems into REST-style Web services: it makes URI, HTTP and XML work like other Web applications and is convenient for programmers to use. In this chapter, the author introduces the functional composition of ROA: the name of resources, the relationship between resources and the functional characteristics of ROA: addressability, stateless connectivity and unified interface. The following chapters of this part talk about the practice of ROA, and introduce the resource-oriented service design, service implementation, best practices of REST and ROA, and technical components of services. As the last part of this book, the application of RESTful service is introduced in chapter 10~ 12 in the form of a theme in each chapter. These topics are: resource-oriented architecture and large-scale Web services, using Ajax as the REST service framework of REST clients. For chapter 10, resource-oriented architecture VS big Web services, you may find it a bit strange: this is just a comparison of architectures. What is a special application? If you read the preface of this book carefully, you should see some clues. This chapter is about the premise of "applying REST": how to recommend REST?