Which code segment should you use to configure the route?

Case Study: 2
Scenario 2
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 useserver
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 fordesktop 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


********************************************************************
An advertising campaign was recently launched. Someof the ads contain a link to products that no longer exist
or have IDs that have changed. You need to ensure that all product links display a product. Which code
segment should you use to configure the route?

Case Study: 2
Scenario 2
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 useserver
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 fordesktop 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


********************************************************************
An advertising campaign was recently launched. Someof the ads contain a link to products that no longer exist
or have IDs that have changed. You need to ensure that all product links display a product. Which code
segment should you use to configure the route?

A.
Option A

B.
Option B

C.
Option C

D.
Option D



Leave a Reply 3

Your email address will not be published. Required fields are marked *


Pablo

Pablo

Answer A seems to be okay, but one thing is missing. The controller name is not specified… defaults should look like:
…defaults: new { controller = “Product”, action = “Show”, productName = defaultProduct}…

P

P

Answer A seems to be okay, but one thing is missing. The controller name is not specified… defaults should look like:
…defaults: new { controller = “Product”, action = “Show”, productName = defaultProduct}….

Jomjom

Jomjom

A is the right answer, and the reason why the controller parameter is not specified, is because it is already set to Product as default, you can notice that the substitute value on the default param is those that is enclose with {}