Building the SharePoint hot or not app ... or how not sell social to your boss

  • 1,605 views
Uploaded on

Enterprise social networks allow you share best practices within organizations, identify co-workers with particular expertise, exchange knowledge and work more efficiently together on projects , but …

Enterprise social networks allow you share best practices within organizations, identify co-workers with particular expertise, exchange knowledge and work more efficiently together on projects , but they can also be a lot of fun. Microsoft has made some significant investments in social capabilities with SharePoint Server 2013. In this session we will explore the different social capabilities in SharePoint 2013 and show how to build a SharePoint app which leverages social and search features to build your own "Hot or Not" app. Technologies covered in this session include the new Social and Search REST APIs in SharePoint 2013, the SharePoint app framework, Azure , Windows 8 and Windows Phone 8 ... but it is mostly about having some fun to build a social app

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,605
On Slideshare
0
From Embeds
0
Number of Embeds
42

Actions

Shares
Downloads
10
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • Template may not be modifiedTwitter hashtag: #spsbe for all sessions

Transcript

  • 1. Building the hot ornot app… or how not to sell social to yourbossJoris Poelmans@jopxtwits#spsbe
  • 2. Thanks to ourSponsorsPlatinumGoldSilver
  • 3. About me • Joris.Poelmans@gmail.com• Principal consultant at RealDolmen• SharePoint Server MVP since 2005• http://jopx.blogspot.com• Twitter: @jopxtwits• Founding member of BIWUG
  • 4. About thissession• Not really about standard socialfeatures in SharePoint• Focus on building a (voting) app• ... All with REST API
  • 5. Mobile socialvotingMobile social voting appPolar raises $1.2M(Source: Techcrunch –Feb 2013)
  • 6. Demo The hot or not app – what itlooks like
  • 7. DissectingHotOrNot• SharePoint Hosted app (Almost) completely build in Javascript Uses JSRender, JQuery UI, Image-picker Uses REST API to communicate withSharePoint Remote Event Receivers (RER) for mobilenotifications (work in progress) Consumed by Windows Phone 8 application(work in progress)
  • 8. About Apps • Apps are self-contained pieces offunctionality that extend the capabilities ofa SharePoint site which leverage webtechnologies New deployment method Low server footprint Cloud driven Using an app catalog
  • 9. App WebParentWebSharePoint-hosted AppProvision an isolated sub web ona parent web• Reuse web elements(lists, files, out-of-box webparts)• No server code allowed;use client JavaScript forlogic, UXAzure Auto-Provisioned AppWindows Azure + SQL Azureprovisioned invisibly as appsare installedAzureSharePointWebGet remote eventsfrom SharePointUse CSOM/REST +OAuth to workwith SPSCloud-basedAppsDeveloper-Hosted App“Bring your own server hostinginfrastructure”Developers will need to isolatetenantsSharePointWebYour HostedSite
  • 10. Cloud hostedversusSharePointhostedCloud Hosted Apps SharePoint Hosted AppsPreferred hosting model for almostall types of appsGood for smaller apps & resourcestorageFull power of web – choose yourinfrastructure & technologySharePoint-based; no server-sidecodeMay require your own hosting Automatically hosted inSharePointMay require you own handling ofmultitenancy & permissionmanagementInherent multitenancy & isolation
  • 11. Backgroundon REST APIHTTP-based web service architecture that usesnouns and verbs to define operationsNoun: “Items”Verbs: GET, POST, PUT, MERGE, DELETEoData provides metadata, object typing and querysemantics/items(0)Client Object Model service (client.svc) processesqueries, interacts with server OM and returnsJSON/XML/items/GetByTitle(„foo‟)
  • 12. Structure ofREST URLhttp://sp2013/_api/items/GetById(1)?select=Title,IDLocation Service Resource Path Query Options
  • 13. Things towatch out for• oData Spec != SharePoint REST• No request batching• Must specify “odata=verbose” in header• Default response format is ATOM but JSON iseasier with Javascript• Some request may not return default values (dueto processing overhead)• Lots of different REST endpoints available
  • 14. Demo Examing basic list Operationsusing REST API
  • 15. Javascriptand REST API• Async GET/POST operations using AJAX library• Alternative cross-domain library• SP.RequestExecutor• Must specify “odata=verbose” in header• Change default response format is to JSON• Accept: “application/json;odata=verbose”• Lots of different REST endpoints available
  • 16. Form Digest • Updates using REST require Form Digest• Prevent replay attacks• SharePoint pages have a control holding aForm Digest• Updates/Deletes will fail without digest value• Local app pages• Use $(“#__REQUESTDIGEST”).val()• Remote• POST to /_api/contextinfo to obtain formdigest
  • 17. CRUDOperations(Create)• Create List item
  • 18. CRUDOperations(Read)• Read List Item• Use jsRender library which provides templatebased rendering• Use $.template to create a template• Use $.render to generate output from JSONcollection
  • 19. CRUDOperations(Update)• Update list item<= * or eTag
  • 20. CRUDOperations(Delete)• Delete list item
  • 21. Other RESTEndpoints• Sites• /_api/sites/features, /_api/sites/eventreceivers• Search• /_api/search/query?queryText=„value‟, /_api/search/suggest?querytext=„value‟• Social & User Profiles• /_api/social.following, /_api/sp.userprofiles.peoplemanager, /_api/social.feed• Publishing• /_api/publishing• What are we missing
  • 22. Demo Examining search and socialREST API
  • 23. Search RESTAPI• Not a lot of documentation available• See -http://blogs.msdn.com/b/nadeemis/archive/2012/08/24/sharepoint-2013-search-rest-api.aspx• Search REST App -http://sharepointfieldnotes.blogspot.be/2013/01/sharepoint-2013-search-with-rest-app.html• Use Codeplex Search Tool -http://sp2013searchtool.codeplex.com/
  • 24. Must havetool• Use SPFastDeploy to deploy individual itemswithout having to do a full deploy• Download link:http://visualstudiogallery.msdn.microsoft.com/9e03d0f5-f931-4125-a5d1-7c1529554fbd
  • 25. Mobile PushNotifications• Use SharePoint Remote Event Receivers
  • 26. Remote EventReceivers(1/2)• Provides a way to notify external systems• Support synchronous and asynchronous events• Similar to “normal” event receivers but containerspointer to WCF service
  • 27. Remote EventReceivers(2/2)• WCF Service implements IRemoteEventServiceinterface• Support for write back through ProcessEvent
  • 28. Mobile PushNotificationsWalkthrough• See How to: Create a companion mobile app foran app for SharePoint -http://msdn.microsoft.com/en-us/library/jj923094.aspx• Step 1: Create a list-based autohosted app inSharePoint 2013• Step 2: Configure push notifications inautohosted app• Step 3: Create a mobile app and register forpush notifications
  • 29. WindowsPhone 8Client• New SharePoint SDK for WP8 availablehttp://www.microsoft.com/en-us/download/details.aspx?id=36818• 2 new templates (only C#):• WP Empty SharePoint Application template• WP SharePoint List Application template• Specific references for interacting with SharePoint• Microsoft.SharePoint.Client.Phone• Microsoft.SharePoint.Client.Phone.Auth.UI• Microsoft.SharePoint.Client.Phone.Runtime• WP8 List Application template uses a wizard togenerate most of the code files
  • 30. Demo Examining WP8 SharePointList Application template
  • 31. Conclusion • REST != CSOM, CSOM preferred option fordevelopment in most use cases• Probably use REST for• Prototyping• CRUD operations from LAMP /IOS/Androidplatforms• Possible option for WP8 or W8 apps• Mobile companions to SharePoint apps makesense
  • 32. Call to Action • Help improve the Hot Or Not App – contact@jopxtwits• Improvements• Allow to specify a challenge in the app part• Include image when adding to the social feed• Build a Windows 8 app, iOS and/or Androidapp• Add business logic• Provide statistics and graphs
  • 33. References• Manipulating list items in SharePoint Hosted Apps using theREST API -http://blogs.msdn.com/b/uksharepoint/archive/2013/02/22/manipulating-list-items-in-sharepoint-hosted-apps-using-the-rest-api.aspx• How to: Learn to read and write to the social feed by using theREST service in SharePoint 2013 -http://msdn.microsoft.com/en-us/library/jj822974.aspx• Debugging Remote Event Receivers with VS and WindowsAzure Service Bus -http://blogs.msdn.com/b/officeapps/archive/2013/01/03/debugging-remote-event-receivers-with-visual-studio.aspx
  • 34. Big thanks to • @ludwigvangysel for solving bugs andtroubleshooting• @spsteve (Steve Curran) for creatingSPFastDeploy 2.2
  • 35. THANK YOUJoris Poelmansjoris.Poelmans@gmail.comhttp://jopx.blogspot.com@jopxtwits