70-517 Exam - Recertification for MCSD: SharePoint Applications

certleader.com

Q1. You need to retrieve data about all the lists in a site by using the REST (Representational State Transfer) API.

Which code segment should you use?

A. Option A

B. Option B

C. Option C

D. Option D

Answer: C

Q2. You develop a SharePoint-hosted app. The app includes the following code segment: (Line numbers are included for reference only.)

The app must display user profile data for the user that is logged in. The user profile data must include the PreferredName, Department, and WorkPhone properties.

You need to ensure that the app displays the required user profile data. Which code segment should you insert at line 12?

A. var a = new SP.UserProfiles.UserProfile();

B. var a = new SP.UserProfiles.SocialFollowingManager(context);

C. var a = SP.UserProfiles.Profileloader.GetProfileLoader(context);

D. var a = new SP.UserProfiles.PeopleManager(context);

Answer: D

Q3. DRAG DROP 

You create a solution to access data contained in SharePoint by using a client-side object model (CSOM).

How should you complete the relevant code? (To answer, drag the appropriate code segments to the correct location or locations in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)

Answer:

Q4. DRAG DROP 

You develop a SharePoint app that uses the client-side object model (CSOM) to retrieve items from the search index.

You need to implement the client-side query code.

Which four code segments should you use in sequence? (To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.)

Answer:

Q5. You are developing an ASP.NET MVC application in Visual Studio 2012. The application supports multiple cultures.

The application contains three resource files in the Resources directory:

✑ My Dictionary.resx

✑ MyDictionary.es.resx

✑ MyDictionary.fr.resx

Each file contains a public resource named Title with localized translation.

The application is configured to set the culture based on the client browser settings.

The application contains a controller with the action defined in the following code segment. (Line numbers are included for reference only.)

You need to set ViewBag.Title to the localized title contained in the resource files. Which code segment should you add to the action at line 03?

A. ViewBag.Title = HttpContext.GetGlobalResourceObuect("MyDictionary", "Title");

B. ViewBag.Title = HttpContext.GetGlobalResourceObject("MyDictionary", "Title", new System.Globalization.CultureInfo("en"));

C. ViewBag.Title = Resources.MyDictionary.Title;

D. ViewBag.Title = HttpContext.GetLocalResourceObject("MyDictionary", "Title");

Answer: C

Q6. DRAG DROP 

You are developing an ASP.NET MVC application that has pages for users who browse the site with Windows Phone 7.

The pages for Windows Phone 7 include the following files:

✑ _Layout.WP7.cshtml

✑ Index.WP7.cshtml

You need to update the application so that it renders the customized files correctly to Windows Phone 7 users.

How should you update the Application_Start method? (To answer, drag the appropriate line of code to the correct location or locations. Each line of code may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)

Answer:

Q7. DRAG DROP 

Adventure Works uses SharePoint for managing project-related documents, information sharing, and tasks management. You develop a SharePoint-hosted app named TasksViewer and deploy it to the Corporate Catalog Site. This app is used only by the Project Management Office (PMO) group. Only users in the PMO group have permission to view and add this app to various project sites. The Adventure Works IT department creates a security group in Active Directory for the PMO.

Currently all of the apps are visible to the Everyone group.

You need to ensure that only users in the PMO group can see the app.

Which five actions should you perform in sequence? (To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.)

Answer:

Q8. You are authoring unit tests.

The unit tests must test code that consumes sealed classes.

You need to create, maintain, and inject dependencies in the unit tests.

Which isolation method should you use?

A. T4 text templates and code generation

B. Stub types

C. Shim types

D. Hard-coded implementation

Answer: C

Explanation: http://msdn.microsoft.com/en-us/library/hh549176.aspx

Shim types are one of two technologies that the Microsoft Fakes Framework uses to let you easily isolate components under test from the environment. Shims divert calls to specific methods to code that you write as part of your test. Many methods return different results dependent on external conditions, but a shim is under the control of your test and can return consistent results at every call. This makes your tests much easier to write.

Q9. DRAG DROP 

You plan to use an app event receiver in conjunction with a remote event receiver. You need to create the remote event receiver by using Visual Studio 2012.

Which three actions should you perform in sequence? (To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.)

Answer:

Q10. HOTSPOT 

You create a SharePoint app that displays a list of documents for a company that sells insurance policies. The documents have been crawled by the Search service.

You create managed properties named Underwriter and Bonded. You must locate the documents that meet the following criteria:

✑ Created by using Microsoft Word 2002

✑ Contains the exact phrase "life policy"

✑ Were underwritten by Woodgrove

You need to design a search query that locates the required documents.

How should you complete the relevant code? (To answer, select the appropriate code segment from each drop-down list in the answer area.)

Answer: