• Save
Building a Windows Store App for SharePoint 2013
Upcoming SlideShare
Loading in...5
×
 

Building a Windows Store App for SharePoint 2013

on

  • 1,489 views

Combine the fast, fluid and immersive experience of Windows Store apps with SharePoint 2013 to discover, organize and manage content. This session will walk through planning and building an app to ...

Combine the fast, fluid and immersive experience of Windows Store apps with SharePoint 2013 to discover, organize and manage content. This session will walk through planning and building an app to interact with SharePoint content by utilizing the new APIs available with SharePoint 2013.

Statistics

Views

Total Views
1,489
Views on SlideShare
1,471
Embed Views
18

Actions

Likes
0
Downloads
0
Comments
0

2 Embeds 18

http://engage.aspenware.com 10
http://authoring.aspenware.com 8

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Building a Windows Store App for SharePoint 2013 Building a Windows Store App for SharePoint 2013 Presentation Transcript

  • 6000 Greenwood Plaza BlvdSuite 110Greenwood Village, CO 80111303.798.5458www.aspenware.comWindows Store Appfor SharePoint 2013
  • WaughnHughesWaughn has over 14 years of consulting experience, and has worked extensively with SharePoint for the pastseven years as a developer and solutions architect.Waughn Hughes, Solutions Architect | w.hughes@aspenware.com
  • Agenda• Start• Plan• Design• Build• DemoBuilding Windows Store apps for SharePoint 2013 3
  • Get Started
  • What’s a Windows Store app?• No Chrome• Touch and Pen Input• Contracts• New Controls• TilesBuilding Windows Store apps for SharePoint 2013 5
  • Design Guidance• Principles• Navigation• Commanding• Touch Interaction• BrandingBuilding Windows Store apps for SharePoint 2013 6
  • Plan
  • Great at…...presenting personalized, pertinent information fromnumerous SharePoint environments.Building Windows Store apps for SharePoint 2013 8
  • Activities to support…• Find content in numerous SharePoint environments• Bookmark content for easy access• Provide notification when content is updatedBuilding Windows Store apps for SharePoint 2013 9
  • Features to include…• Search and discover content (e.g. sites, lists and documents)• Add and remove content from favorite list• View dashboard of content• Preview content before launching another application• Create shortcut to a particular site• Share content with other people and applicationsBuilding Windows Store apps for SharePoint 2013 10
  • Design
  • …with PowerPoint!Building Windows Store apps for SharePoint 2013 12
  • WireframesBuilding Windows Store apps for SharePoint 2013 13
  • Build
  • Environment and Tools• Window 8– and –• Visual Studio Express 2012 for Windows 8• Visual Studio 2012– and –• Office 365 (Developer Site)• SharePoint (Foundation or Server) 2013 FarmBuilding Windows Store apps for SharePoint 2013 16
  • Windows Store app: Languages• VB/C#/C++ and XAML• JavaScript and HTML• C++ and DirectXBuilding Windows Store apps for SharePoint 2013 17
  • SharePoint 2013 APIsBuilding Windows Store apps for SharePoint 2013 18http://msdn.microsoft.com/en-us/library/jj164060Custom Client ApplicationSharePointserver object model_apiODATARESTExecuteQueryJavaScriptobject modelSilverlight & Mobileclient object model.NETclient object modelServerClient
  • What’s New?• Search• User Profile• Taxonomy• Feeds• Publishing• SharingBuilding Windows Store apps for SharePoint 2013 19• Workflow• E-Discovery• IRM• Analytics• Business Data
  • Web: CSOM Example// create the client contextusing (ClientContext context = new ClientContext("http://sharepoint.demo.com")){// set credentials for authenticationcontext.Credentials = CredentialCache.DefaultCredentials;// the sharepoint web at the urlWeb web = context.Web;// retrieve the web propertiescontext.Load(web);// retrieve the specified web properties// context.Load(web, w => w.Title, w => w.Description);// execute querycontext.ExecuteQuery();// access propertiesstring title = web.Title;string description = web.Description;}Building Windows Store apps for SharePoint 2013 20
  • Web: REST Example// create handler to handle authentication for the httpclientHttpClientHandler handler = new HttpClientHandler();handler.UseDefaultCredentials = true;using (HttpClient client = new HttpClient(handler)){// specify format of results (atom/xml or json)client.DefaultRequestHeaders.Add("Accept", "application/atom+xml");client.DefaultRequestHeaders.Add("ContentType", "application/atom+xml;type=entry");// create the rest urlstring restUrl = "http://sharepoint.demo.com/_api/web";// string restUrl = "http://sharepoint.demo.com/_api/web?$select=Title,Description";// send asynchronous get requestHttpResponseMessage response = await client.GetAsync(restUrl);// verify that the request was successfulresponse.EnsureSuccessStatusCode();// write the http content to stringstring responseBodyAsText = await response.Content.ReadAsStringAsync();// read the xml into xdocument to use LINQ to XMLStringReader reader = new StringReader(responseBodyAsText);XDocument responseXml = XDocument.Load(reader, LoadOptions.None);// namespaces required to query xml documentXNamespace atom = "http://www.w3.org/2005/Atom";XNamespace d = "http://schemas.microsoft.com/ado/2007/08/dataservices";XNamespace m = "http://schemas.microsoft.com/ado/2007/08/dataservices/metadata";// access propertiesstring title = responseXml.Element(atom + "content").Element(m + "properties").Element(d + "Title").Value;string description = responseXml.Element(atom + "content").Element(m + "properties").Element(d + "Description").Value;}Building Windows Store apps for SharePoint 2013 21
  • Search: CSOM Example// create the client contextusing (ClientContext context = new ClientContext("http://sharepoint.demo.com")){// set credentials for authenticationcontext.Credentials = CredentialCache.DefaultCredentials;// describe the queryvar keywordQuery = new KeywordQuery(context);keywordQuery.QueryText = "search term";// used to execute queries against search engineSearchExecutor searchExecutor = new SearchExecutor(context);// execute the search queryClientResult<ResultTableCollection> results = searchExecutor.ExecuteQuery(keywordQuery);// execute querycontext.ExecuteQuery();// access search properties and resultsint totalCount = results.Value[0].TotalRows;IEnumerable<IDictionary<string, object>> rows = results.Value[0].ResultRows;}Building Windows Store apps for SharePoint 2013 22
  • Search: REST Example// create handler to handle authentication for the httpclientHttpClientHandler handler = new HttpClientHandler();handler.UseDefaultCredentials = true;using (HttpClient client = new HttpClient(handler)){// specify format of results (atom/xml or json)client.DefaultRequestHeaders.Add("Accept", "application/atom+xml");client.DefaultRequestHeaders.Add("ContentType", "application/atom+xml;type=entry");// create the rest url for searchstring searchRestUrl = "http://sharepoint.demo.com/_api/search/query?querytext=searchterm";// send asynchronous get requestHttpResponseMessage response = await client.GetAsync(restUrl);// verify that the request was successfulresponse.EnsureSuccessStatusCode();// write the http content to stringstring responseBodyAsText = await response.Content.ReadAsStringAsync();// read the xml into xdocument to use LINQ to XMLStringReader reader = new StringReader(responseBodyAsText);XDocument responseXml = XDocument.Load(reader, LoadOptions.None);// namespaces required to query xml documentXNamespace atom = "http://www.w3.org/2005/Atom";XNamespace d = "http://schemas.microsoft.com/ado/2007/08/dataservices";XNamespace m = "http://schemas.microsoft.com/ado/2007/08/dataservices/metadata";// retrieve search resultsXElement relavantResults = responseXml.Descendants(d + "query").Elements(d + "PrimaryQueryResult").Elements(d + "RelevantResults").FirstOrDefault();List<XElement> items = responseXml.Descendants(d + "query").Elements(d + "PrimaryQueryResult").Elements(d + "RelevantResults").Elements(d + "Table").Elements(d + "Rows").Elements(d + "element").ToList();}Building Windows Store apps for SharePoint 2013 23
  • Demo
  • References
  • References: Windows Store appsLearn to build Windows Store appshttp://msdn.microsoft.com/en-us/library/windows/apps/br229519Concepts and architecturehttp://msdn.microsoft.com/en-us/library/windows/apps/br211361Developing Windows Store appshttp://msdn.microsoft.com/en-us/library/windows/apps/xaml/br229566Windows 8 app sampleshttp://code.msdn.microsoft.com/windowsapps/Windows-8-Modern-Style-App-SamplesCreating Windows Runtime Components in C# and Visual Basichttp://msdn.microsoft.com/en-us/library/windows/apps/br230301Building Windows Store apps for SharePoint 2013 26
  • References: SharePoint 2013 APIsWhat’s new for developers in SharePoint 2013http://msdn.microsoft.com/en-us/library/jj163091Choose the right API set in SharePoint 2013http://msdn.microsoft.com/en-us/library/jj164060Reference for SharePoint 2013http://msdn.microsoft.com/en-us/library/jj193038How to: Complete basic operations using SharePoint 2013 client library codehttp://msdn.microsoft.com/en-us/library/fp179912Programming using the SharePoint 2013 REST servicehttp://msdn.microsoft.com/en-us/library/fp142385Building Windows Store apps for SharePoint 2013 27
  • Questions
  • Thank You!
  • 6000 Greenwood Plaza BlvdSuite 110Greenwood Village, CO 80111303.798.5458www.aspenware.comAspenware