Hands-On RESTful API Design Patterns and Best Practices
Design, develop, and deploy highly adaptable, scalable, and secure RESTful web APIs
Harihara Subramanian, Pethuru Raj
- 378 pagine
- English
- ePUB (disponibile sull'app)
- Disponibile su iOS e Android
Hands-On RESTful API Design Patterns and Best Practices
Design, develop, and deploy highly adaptable, scalable, and secure RESTful web APIs
Harihara Subramanian, Pethuru Raj
Informazioni sul libro
Build effective RESTful APIs for enterprise with design patterns and REST framework's out-of-the-box capabilities
Key Features
- Understand advanced topics such as API gateways, API securities, and cloud
- Implement patterns programmatically with easy-to-follow examples
- Modernize legacy codebase using API connectors, layers, and microservices
Book Description
This book deals with the Representational State Transfer (REST) paradigm, which is an architectural style that allows networked devices to communicate with each other over the internet. With the help of this book, you'll explore the concepts of service-oriented architecture (SOA), event-driven architecture (EDA), and resource-oriented architecture (ROA). This book covers why there is an insistence for high-quality APIs toward enterprise integration.
It also covers how to optimize and explore endpoints for microservices with API gateways and touches upon integrated platforms and Hubs for RESTful APIs. You'll also understand how application delivery and deployments can be simplified and streamlined in the REST world. The book will help you dig deeper into the distinct contributions of RESTful services for IoT analytics and applications.
Besides detailing the API design and development aspects, this book will assist you in designing and developing production-ready, testable, sustainable, and enterprise-grade APIs. By the end of the book, you'll be empowered with all that you need to create highly flexible APIs for next-generation RESTful services and applications.
What you will learn
- Explore RESTful concepts, including URI, HATEOAS, and Code on Demand
- Study core patterns like Statelessness, Pagination, and Discoverability
- Optimize endpoints for linked microservices with API gateways
- Delve into API authentication, authorization, and API security implementations
- Work with Service Orchestration to craft composite and process-aware services
- Expose RESTful protocol-based APIs for cloud computing
Who this book is for
This book is primarily for web, mobile, and cloud services developers, architects, and consultants who want to build well-designed APIs for creating and sustaining enterprise-class applications. You'll also benefit from this book if you want to understand the finer details of RESTful APIs and their design techniques along with some tricks and tips.
Domande frequenti
Informazioni
RESTful Services API Testing and Security
- Types of API tests
- Challenges in API testing
- Security in API testing
- In addition, we will give you a glimpse of various API testing tools, API security tools, and frameworks
An overview of software testing
- Assert and ensure that there are no differences between the realities and the expectations of the requirements
- Assert and ensure software product continuity and availability, regardless of the amount of end users
- Foresee and uncover concealed problems
- Assert and ensure that offerings function seamlessly with anticipated end user platforms, browsers, and so on
RESTful APIs and testing
Basics of API testing
Understanding API testing approaches
- Clear definition of the scope and a good understanding of the functionality of the API
- Common testing methodologies such as boundary analysis and equivalence classes are part of API test cases
- Plan, define, and be ready with input parameters, zero, and sample data for the API
- Determine and compare expected and actual results, and ensure that there are no differences
API testing types
Unit tests
@Test public void fetchAllInvestors() throws Exception{ RequestBuilder requestBuilder = MockMvcRequestBuilders.get( "/investors").accept( MediaType.APPLICATION_JSON); MvcResult result = mockMvc.perform(requestBuilder).andReturn(); MockHttpServletResponse response = result.getResponse(); }
API validation tests
- A product-specific question, such as, is it the necessary function that is asked for?
- A behavioral question, such as, is the developed function doing what is intended?
- An efficiency-related question, such as, is the intended function using the necessary code, in an independent and optimized manner?