backend development for .net full stack coursera week 3 answers
WebAPI Practice Quiz
1. What does REST stand for?
- Remote Enterprise Service Technology.
- Relational Enterprise Service Technology.
- Representational State Transfer.
- Remote Environment Service Technology.
2. What is the purpose of exception handling in software development?
- Exception handling is used to handle runtime errors and prevent program crashes.
- Exception handling is a technique for optimizing code performance and memory usage.
- Exception handling is a design pattern used to enforce modularity and code reusability.
- Exception handling is a method for securing sensitive data and preventing unauthorized access.
3. What is the difference between WCF and Web API?
- WCF is used for building RESTful web services, while Web API is used for building SOAP-based web services.
- WCF uses HTTP as the underlying protocol, while Web API uses TCP.
- WCF provides more features for building enterprise-level services, while Web API is a lightweight framework for building RESTful services.
- There is no difference between WCF and Web API. They are interchangeable.
4. What is Postman?
- A code editor for writing JavaScript.
- A database management tool for MySQL.
- A tool for testing and debugging web APIs.
- A front-end framework for building responsive web applications.
CRUD Operations Practice Quiz
5. What is routing in ASP.NET?
- A way to manage server-side data validation.
- A way to map URLs to application resources.
- A way to manage client-side data validation.
- A way to manage application configuration settings.
6. What are route constraints in ASP.NET?
- Rules that limit the types of HTTP methods that can be used with a particular route.
- Rules that limit the types of data that can be passed as parameters in a particular route.
- Rules that limit the number of parameters that can be passed in a particular route.
- Rules that limit the types of responses that can be returned by a particular route.
7. What is an action result in ASP.NET?
- A type of validation used to ensure that user input is valid before it is processed.
- A type of HTTP response returned by a controller action.
- A type of attribute that can be applied to controller actions.
- A type of routing rule used to map URLs to controller actions.
8. What is content negotiation in ASP.NET?
- The process of determining whether a request is coming from a human user or a bot.
- The process of determining the appropriate HTTP status code to return for a particular response.
- The process of selecting the most appropriate representation of a resource based on the client’s preferences.
- The process of caching HTTP responses to improve application performance.
9. What are media type formatters in ASP.NET?
- Components that handle the routing of incoming requests to the appropriate controller action.
- Components that convert HTTP responses into different media types, such as XML, JSON, or binary.
- Components that handle content negotiation to select the appropriate media type for a response
- Components that handle data validation and return error responses when validation fails.
Advance WebAPI Practice Quiz
10. What is ASP.NET Web API?
- A front-end framework for building responsive web applications.
- An ORM framework for .NET applications.
- A framework for building HTTP services that can be consumed by a wide range of clients.
- A cloud-based platform for building and deploying web applications.
11. What is the purpose of the [HttpGet] attribute in ASP.NET Web API?
- To specify the HTTP verb for an action method that responds to GET requests.
- To specify the HTTP verb for an action method that responds to POST requests.
- To specify the HTTP verb for an action method that responds to DELETE requests.
- To specify the HTTP verb for an action method that responds to PUT requests.
12. What is the purpose of the IHttpActionResult interface in ASP.NET Web API?
- To define a base class for Web API controllers.
- To provide a way to return a standard HTTP response from an action method.
- To handle content negotiation to select the appropriate media type for a response.
- To provide a way to specify routing for Web API controllers.
13. What is the purpose of the [FromBody] attribute in ASP.NET Web API?
- To specify that the parameter for an action method should be bound using the request body.
- To specify that the parameter for an action method should be bound using the query string.
- To specify that the parameter for an action method should be bound using the request headers.
- To specify that the parameter for an action method should be bound using the route data.
14. What is the purpose of the HTTP GET method in ASP.NET Web API?
- To create a new resource.
- To read an existing resource.
- To update an existing resource.
- To delete an existing resource.