###BeginCaseStudy###
Case Study: 2
Web Application
Background
You are developing an online shopping web application.
Business Requirements
A user is not required to provide an email address. If a user enters an email address,
it must be verified to be a valid email address.
Information about the first product on the product page must fade out over time to
encourage the user to continue browsing the catalog.
Administrators must be able to edit information about existing customers.
Administrators also must be able to specify a default product on the product page.
Technical Requirements
General:
The web store application is in a load-balanced web farm. The load balancer is not
configured to use server affinity.
The web store application is an ASP.NET MVC application written in Visual Studio
2012.
Products:
The value of the productId property must always be greater than 0.
The Products page for mobile devices must display to mobile users. The Products
page for desktop devices must display to desktop users.
Storage:
The data must be stored in a serialized XML data format.
Serialized objects must be schema-independent.
Exception handling:
Exceptions originating from IIS must display a page with support contact
information.
Some page links expire, and users who access these links encounter 404 errors.
Exceptions must be logged by using the WriteLog method of the Utility class.
Browser and device support:
The application must support image format conversions from .bmp to .jpeg for
mobile devices.
The application must support image format conversions from .bmp to .png for
desktop devices.
Application Structure
You need to implement the business requirements for managing customer data.
What should you do? (Each correct answer presents part of the solution. Choose all that apply.)
A.
Add a class named Customer‐Controller to the Controllers folder. Then add a method named Edit
to the class.
B.
Create a new controller named Administration in the Controllers folder. Add an action named
EditCustomer to the controller.
C.
Add a folder named Customer to the Views folder. Then create a view inside this folder named
Edit.aspx.
D.
Create a new folder named EditCustomer to the Views folder. In the new folder, create a new file
named Administration.aspx.
A e C são as corretas… não faz sentido se não criar a pagina.
The answer should be A and C. Implementing a requirement for MVC application requires Model (defined in case study), View and Controller to be created.
A and C are the answers and the name of the controller must to be CustomerController
Yeah, that’s true. The answer is option A and C, and the name of the controller should be CustomerController.
I think it should be like this
add a class named Customer : Controller to the Controllers folder. Then add a public actionresult method named Edit to the class.
Then A and C will be right!
A & C
We need view edit as a part of solution
Agree with the other comments: A and C is the correct MVC approach by separation of concern (ofc with correct controller name in A, without ‘-‘ char)