backend development for .net full stack coursera week 2 answers

MVC Advanced - Practice Quiz

1. What is the main difference between ASP.NET MVC and ASP.NET Web Forms?

  • ASP.NET MVC uses a page-based programming model, while ASP.NET Web Forms uses a control-based programming model.
  • ASP.NET MVC separates an application into three main components: model, view, and controller, while ASP.NET Web Forms does not separate an application into distinct components.
  • ASP.NET MVC is designed for building small applications, while ASP.NET Web Forms is designed for building large applications.
  • ASP.NET MVC is based on the Ruby on Rails framework, while ASP.NET Web Forms is based on the Java Spring framework.

2. What is the main advantage of using ASP.NET MVC over ASP.NET Web Forms?

  • ASP.NET MVC provides better performance than ASP.NET Web Forms.
  • ASP.NET MVC is easier to learn and use than ASP.NET Web Forms.
  • ASP.NET MVC provides better control over HTML and URL structure, making it more suitable for search engine optimization (SEO).
  • ASP.NET MVC offers better security features than ASP.NET Web Forms.

3. What is the purpose of the "Views" folder in an ASP.NET MVC application?

  • It contains code for handling HTTP requests and generating HTTP responses.
  • It contains code for generating HTML responses based on the data provided by the model.
  • It contains configuration settings for the ASP.NET MVC application.
  • It contains JavaScript and CSS files used by the ASP.NET MVC application.

4. Which of the following best describes an action method in an ASP.NET MVC application?

  • It is a method that processes a request for a view and returns the appropriate HTML response.
  • It is a method that defines the layout for the application.
  • It is a method that handles the routing of requests to the appropriate controller.
  • It is a method that handles HTTP requests and returns an ActionResult object that specifies the response to be sent back to the client.

Entity - Practice Quiz

5. What is Entity Framework?

  • A front-end framework for building responsive web applications.
  • An ORM framework for .NET applications.
  • A JavaScript library for building user interfaces.
  • A cloud-based platform for building and deploying web applications.

6. What is Code First approach in Entity Framework?

  • A way to generate database tables and columns automatically based on code.
  • A way to generate code automatically based on database schema.
  • A way to create a database schema by hand-coding SQL scripts.
  • A way to map existing database schema to code.

7. What is CRUD in Entity Framework?

  • An abbreviation for “Create, Retrieve, Update, Delete”, which refers to the four basic operations that can be performed on data in a database.
  • An abbreviation for “Code, Run, Update, Deploy”, which refers to the four basic steps in a software development life cycle.
  • An abbreviation for “Customer Relationship Management and User Data”, which refers to the two main types of data stored in a database.
  • An abbreviation for “Connect, Retrieve, Update, Disconnect”, which refers to the four basic steps in a database connection process.

8. What is the purpose of a stored procedure in Entity Framework?

  • To provide a way to retrieve data from a database using LINQ.
  • To provide a way to update data in a database using LINQ.
  • To encapsulate database logic and execute it on the server side.
  • To provide a way to create database schema using code.

9. What is paging in Entity Framework?

  • A technique for limiting the amount of data returned from a database query to improve performance and reduce memory usage.
  • A technique for joining multiple tables in a database query to retrieve related data.
  • A technique for sorting data returned from a database query in ascending or descending order.
  • A technique for filtering data returned from a database query based on certain criteria.

Pipeline & Security Practice Quiz

10. What is the purpose of unit testing in software development?

  • Unit testing is performed to ensure the proper functioning of hardware components.
  • Unit testing is used to verify the integration of different software systems.
  • Unit testing is performed to identify and fix bugs or issues in isolated sections of code.
  • Unit testing is used to validate the user interface and user experience of a software application.

11. What is the ASP.NET MVC pipeline?

  • A series of filters that are executed before an action method is called.
  • The sequence of events that occur during an HTTP request and response in an ASP.NET MVC application.
  • A set of predefined middleware components that handle requests and responses in an ASP.NET MVC application.
  • The set of configuration settings that determine how an ASP.NET MVC application handles HTTP requests and responses.

12. What are ASP.NET MVC filters?

  • Components that handle requests and responses in an ASP.NET MVC application.
  • Attributes that can be applied to controllers and action methods to perform logic before or after the action method is executed.
  • Methods that are called before and after an action method is executed in an ASP.NET MVC application.
  • A set of predefined middleware components that handle requests and responses in an ASP.NET MVC application.

13. What is the purpose of filters configurations in ASP.NET MVC?

  • To specify the routing configuration for an ASP.NET MVC application.
  • To specify the order in which filters are executed and which filters apply to which action methods.
  • To specify the authentication and authorization settings for an ASP.NET MVC application.
  • To specify the connection string and database provider for an ASP.NET MVC application.

14. What is a view model in ASP.NET MVC?

  • A class that defines the structure of a database table.
  • A class that represents a single record from a database table.
  • A class that is used to pass data from a controller to a view.
  • A class that is used to define the routing configuration for an ASP.NET MVC application.

Leave a Reply