Câu hỏi phỏng vấn API Design
Câu hỏi

Mention some key characteristics of REST?

Câu trả lời

REST (Representational State Transfer) is an architectural style for designing networked applications. Here are some key characteristics of REST:

  1. Statelessness: Each request from a client to a server must contain all the information needed to understand and process the request. The server does not store any session information about the client between requests, which simplifies scalability and reduces coupling between client and server[1][2][6].

  2. Client-Server Architecture: RESTful systems are designed with a clear separation between the client and the server. This separation allows each to evolve independently, enhancing the portability and scalability of user interfaces across multiple platforms[1][2][6].

  3. Uniform Interface: REST APIs have a standardized way of interacting with resources. This includes using HTTP methods (GET, POST, PUT, DELETE) for specific actions on resources, consistent naming conventions, and using hyperlinks to navigate between resources. This uniformity simplifies and decouples the architecture, allowing each part to evolve independently[1][2][6][14].

  4. Cacheability: Responses from the server must be explicitly marked as cacheable or non-cacheable. This allows clients to cache responses to improve performance and reduce the load on the server[1][2][6][14].

  5. Layered System: REST APIs are designed to operate through multiple layers, such as security, application, and business logic layers. This layered architecture helps enhance an application’s security by limiting components in each layer to interact only with the next immediate layer[1][2][6][14].

  6. Code on Demand (Optional): Servers can extend or customize client functionality by transferring executable code, such as JavaScript. This is the only optional constraint in REST architecture[1][2][6][14].

  7. Resource-Based: REST APIs are resource-based, meaning each piece of data or functionality is represented as a resource. Each resource is identified by a unique URI (Uniform Resource Identifier), and clients can interact with these resources using standard HTT...

junior

junior

Gợi ý câu hỏi phỏng vấn

middle

What are the best practices to create a standard URI for a web service?

middle

What's the difference between REST & RESTful?

junior

What are different types of Web Services?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào