Which actions should you perform?

###BeginCaseStudy###
Case Study: 1
Scenario 1
Application Information
You are developing two Windows Store apps by using JavaScript: a Personal Trainer app and
a Client app. The apps will allow personal fitness trainers to interact with their remote clients.
Business Requirements- Personal Trainer Application
The Personal Trainer app must allow trainers to perform the following tasks:
• Create and store video and audio recordings of workout routines.
• View the profile and workout recordings for only one client at any time.
Business Requirements- Client Application
The Client app must allow clients to perform the following tasks:
• Browse a list of the trainer’s workout recordings.
• Record workouts by using the built-in webcam.
• Play, pause, restart, and stop workout recordings.
• If the capability is supported, allow the client’s webcam to pan as the client moves
around the room.
• Upload workout recordings for trainer review.
• Update their individual profiles to indicate workouts completed, calories burned, and
current weight.
The Client app must validate that the client’s subscription is valid.
Technical Requirements- General
The Client app must allow clients to perform the following tasks:
• Browse a list of the trainer’s workout recordings.
• Record workouts by using the built-in webcam.
• Play, pause, restart, and stop workout recordings.
• If the capability is supported, allow the client’s webcam to pan as the client moves
around the room.
• Upload workout recordings for trainer review.
• Update their individual profiles to indicate workouts completed, calories burned, and
current weight.
The Client app must validate that the client’s subscription is valid.
Technical Requirements- Hardware Requirements
The Personal Trainer and Client apps must support the following hardware requirements:
• Windows 8
• Webcam, microphone, and speakers
• Internet connection
While testing the apps, you identify the following issues:
• When you start the app for the first time, the system displays this warning message:
“This app needs permission to use your camera, which you can change in the app’s settings.”
• When you run the loadClientProfile( ) method in the clientData.js file, you receive an
“Access Denied” exception.
• The findCamera( ) method in the video.js file throws an exception on some devices.
• The recordVideo( ) method in the video.js file throws an exception when the device
does not support tilting.



###EndCaseStudy###

You need to separate the business and complex logic into components.

Which actions should you perform? (Each correct answer presents part of the solution.
Choose all that apply.)

###BeginCaseStudy###
Case Study: 1
Scenario 1
Application Information
You are developing two Windows Store apps by using JavaScript: a Personal Trainer app and
a Client app. The apps will allow personal fitness trainers to interact with their remote clients.
Business Requirements- Personal Trainer Application
The Personal Trainer app must allow trainers to perform the following tasks:
• Create and store video and audio recordings of workout routines.
• View the profile and workout recordings for only one client at any time.
Business Requirements- Client Application
The Client app must allow clients to perform the following tasks:
• Browse a list of the trainer’s workout recordings.
• Record workouts by using the built-in webcam.
• Play, pause, restart, and stop workout recordings.
• If the capability is supported, allow the client’s webcam to pan as the client moves
around the room.
• Upload workout recordings for trainer review.
• Update their individual profiles to indicate workouts completed, calories burned, and
current weight.
The Client app must validate that the client’s subscription is valid.
Technical Requirements- General
The Client app must allow clients to perform the following tasks:
• Browse a list of the trainer’s workout recordings.
• Record workouts by using the built-in webcam.
• Play, pause, restart, and stop workout recordings.
• If the capability is supported, allow the client’s webcam to pan as the client moves
around the room.
• Upload workout recordings for trainer review.
• Update their individual profiles to indicate workouts completed, calories burned, and
current weight.
The Client app must validate that the client’s subscription is valid.
Technical Requirements- Hardware Requirements
The Personal Trainer and Client apps must support the following hardware requirements:
• Windows 8
• Webcam, microphone, and speakers
• Internet connection
While testing the apps, you identify the following issues:
• When you start the app for the first time, the system displays this warning message:
“This app needs permission to use your camera, which you can change in the app’s settings.”
• When you run the loadClientProfile( ) method in the clientData.js file, you receive an
“Access Denied” exception.
• The findCamera( ) method in the video.js file throws an exception on some devices.
• The recordVideo( ) method in the video.js file throws an exception when the device
does not support tilting.



###EndCaseStudy###

You need to separate the business and complex logic into components.

Which actions should you perform? (Each correct answer presents part of the solution.
Choose all that apply.)

A.
In the JavaScript code, register the handler for the extension/mime-type.

B.
In the package.appxmanifest file, create an Extensions section and register the
component .dll file.

C.
In Windows Explorer, drag the component .dll file to the project bin directory.

D.
In Microsoft Visual Studio Solution Explorer, right-click the References folder and then
click Scope to This.

Explanation:

A: In Microsoft Internet Explorer 4.0 and later, MIME type determination occurs in URL
monikers through the FindMimeFromData method. Determining the MIME type allows URL
monikers and other components to find and launch the correct object server or application to
handle the associated conten
B:
* An application that registers a background task needs to declare the feature in the
application manifest as an extension, as well as the events that will trigger the task. If you
forget these steps, the registration will fail. There is no <Extensions> section in the
application manifest of the Microsoft Visual Studio standard template by default, so you need
to insert it as a child of the Application tag.
* You can implement Windows RunTime components for your apps, but you must register
those components with the operating system for them to run correctly. To register a
Windows RunTime component, you must put the registration information in the WinMD files
and in the app manifest. If a project implements a Windows RunTime component, the build
output of the project will contain a WinMD file. Visual Studio extracts the Windows RunTime
registration information from the WinMD file and generates the appropriate Extensions
elements in the app manifest.
The system supports two forms of servers: .dll servers (in-process) and .exe servers (out-ofprocess). These servers require similar but different registration information that must be
copied into the app manifest. Visual Studio supports generating manifest only for .dll servers,
and the DLLServer extension is required to register .dll servers. The following values in the
app manifest are taken from the WinMD files to construct the DLLServer Extension:
DllPath
ActivatableClassId
ThreadingModel
ActivatableClass (ActivatableClassId attribute)
Here’s an example of the output XML:

<extension category=”Microsoft.Windows.ActivatableClass”>
<dllServer>
<dllPath>Fabrikam.dll</dllPath>
<activatableClass activatableClassId="Fabrikam.MyClass" threadingModel="sta" />
</dllServer>
</extension>



Leave a Reply 1

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