exam questions

Exam 70-486 All Questions

View all questions & answers for the 70-486 exam

Exam 70-486 topic 1 question 118 discussion

Actual exam question from Microsoft's 70-486
Question #: 118
Topic #: 1
[All 70-486 Questions]

You develop an ASP.NET MVC application. The application has several Razor views.
The application must execute different server-side code for desktop and mobile devices.
You need to choose an approach to support mobile devices.
Which two approaches can you use? Each correct answer presents a complete solution.

  • A. Use different controllers and view for both desktop and mobile browsers, but render the views using Bootstrap framework.
  • B. Create separate areas for desktop and mobile browsers, implementing independent controllers and views for each.
  • C. Use the same controllers for both desktop and mobile browsers, but render different views depending on the device type.
  • D. Use different controllers and views for both desktop and mobile browsers, but render the views with the same Razor layout depending on the device type.
Show Suggested Answer Hide Answer
Suggested Answer: BD 🗳️
How ASP.NET MVC applications can present mobile-specific pages
Since the Model-View-Controller pattern decouples application logic (in controllers) from presentation logic (in views), you can choose from any of the following approaches to handling mobile support in server-side code:
1. Create separate areas for desktop and mobile browsers, implementing independent controllers and views for each. This option works best if you're displaying very different screens, containing different information and leading the user through different workflows optimized for their device type. It may mean some repetition of code, but you can minimize that by factoring out common logic into an underlying layer or service.
2. Use the same controllers for both desktop and mobile browsers, but render different views depending on the device type. This option works best if you're displaying roughly the same data and providing the same workflows for end users, but want to render very different HTML markup to suit the device being used.
3. Use the same controllers and views for both desktop and mobile browsers, but render the views with different Razor layouts depending on the device type.
This option works best if you're displaying identical data on all devices, but simply want to supply different CSS stylesheets or change a few top-level HTML elements for mobiles.
References:
https://docs.microsoft.com/en-us/aspnet/whitepapers/add-mobile-pages-to-your-aspnet-web-forms-mvc-application

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Aghie
Highly Voted 5 years, 8 months ago
I think BD are right as the question states "The application must execute different server-side code for desktop and mobile devices."
upvoted 24 times
advenios
5 years, 5 months ago
I agree. "Differend server side code" is a key point here.
upvoted 13 times
...
...
as13465
Highly Voted 5 years, 9 months ago
should be BC, D said different controllers and view but explanation which is different to the explanation
upvoted 5 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago