sharepoint 2013 * fun with sharepoint social, csom and windows 8
TRANSCRIPT
SharePoint 2013 – Fun with SharePoint Social, CSOM and Windows 8
SPC207
Mark Rackley – Summit 7 SystemsEric Harlan - Microsoft
AgendaWhat are we going to build!?Lets start at the end
What is Social?News feeds/Replies/Likes/Oh My
Client Side Object Model (CSOM) OverviewCSOM Social Features
Win RT OverviewYay! New quirks to learn
Demo - Lets build this thingTop to bottom with all the roadblocks and common mistakes
Demo – How it worksYes Sir, you in the back
What is Social in 2013(its not all sharing photos and wasting company time)
LikesRatingsFeedsReputation Mentions
Social Social SocialWhat’s it all mean man!?
• Microfeed posts can be “liked” by all. Likes in community sites and conversations are restricted in view
• Community Site rolls up content• @Mentions drop down selection is populated by the users
followed and users in profile database. Think federated.• Company feeds are micro blogging feeds for Noobs!
Social
LikesRatingsFeedsReputation Mentions
FollowsSitesUsersDocumentsRecommends
Social Social SocialWhat’s it all mean man!?
• New Site Definitions specifically for community driven site• Discussion boards gain functionality that mirrors dedicated BB
softwareReputation settings, best answer roll up, report abuse, etc
• Discussion roll ups by popularity, title and most popularLikes vs Star rating (5 being best!)
• Following a site is like favoriting a tweet, or book marking • Track your “Clout” aka Reputation • Achievement Levels/Badges• New Recommended Content web part – you may like….. From
Search Analytics
Social
LikesRatingsFeedsReputation Mentions
FollowsSitesUsersDocumentsRecommends
Social Social SocialWhat’s it all mean man!?
MicroFeedsAppFabric
• Microfeeds• We’re all GUIDs at heart. • Consolidated View web part reads directly from AppFabric Cache• Performance unaffected when viewing up to date AppFabric Cache from
memory• AppFabric• Think of it as State Memory for Social interactions• AppFabric Cache is NOT persistent, once cycled feeds are lost
• What is in the activity gatherer?• Now Following, Tagging, Note board posts, Status updates 10 mins
Social
CSOM
• Allows development that runs outside of the SharePoint Server using Web Services
• Introduced in SharePoint 2010• Greatly expanded upon in SharePoint 2013• Can now utlize REST and oData• New libraries (for stuff like Social!)
CSOM Overview
• CSOM in SharePoint 2010CSOM Overview
• CSOM in SharePoint 2013CSOM Overview
• We still have our old friends• Microsoft.SharePoint.Client• Microsoft.SharePoint.ClientRuntime
• But with social we have a new buddy for social!• *Microsoft.SharePoint.Client.UserProfiles
• And a few more new friends as well• *Microsoft.SharePoint.Client.DocumentManagement• *Microsoft.SharePoint.Client.Publishing• *Microsoft.SharePoint.Client.Taxonomy
*In SharePoint Server
CSOM in SharePoint 2013
• CSOM still works the same way• Create Context• Build request• Execute Query
• But now we can do even more!• SocialFeedManager – Get Feeds• Everyone, Likes, News, Personal, Timeline
• SocialFollowingManager – Get Followed Content• Sites, Users, Documents, Tags
• SocialActor• User, Site, Document, or Tag
• SocialPost• Text, Attachments, LikerInfo
CSOM in SharePoint 2013
CSOM in SharePoint 2013Example query (Get Newsfeed)
//create the client contextClientContext cc = new ClientContext("http://portal.contoso.com");cc.Credentials = CredentialCache.DefaultCredentials;
//prepare your querySocialFeedManager sfm = new SocialFeedManager(cc);SocialFeedOptions feedOptions;feedOptions = new SocialFeedOptions();ClientResult<SocialFeed> feed = sfm.GetFeed(SocialFeedType.News, feedOptions);
//execute querysfm.Context.ExecuteQuery();
WIN RT
• Cross-platform application architecture on the Windows 8 operating system.
• WinRT applications natively support both the x86 and ARM architectures
• C#, VB.NET, and JavaScript (also C++/CX)• Runs inside a sandboxed environment to allow
for greater security and stability
Win RT Overview
WIN RT & JavaScript
• JavaScript can be used in Windows Store Apps• HTML5/CSS3 supported• jQuery works well• New Controls in WinJS • Control List - http://msdn.microsoft.com/en-us/library/windows/apps/hh465453.aspx
• Able to access Windows Runtime Component libraries (C#, VB, or C++)• JavaScript files cannot be referenced externally• Can’t create new windows, can’t resize or move
existing windows• Methods such as alert, prompt, open, moveBy, moveTo, resizeBy, and resizeTo won’t
work
Win RT & JavaScript
• Script “injection” is not allowed• “toStaticHTML” filters HTML injected into the page• Affects the following properties and methods• createContextualFragment• innerHTML and outerHTML• insertAdjacentHTML• pasteHTML• document.write and document.writeln• DOMParser.parseFromString
• Also affects some Elements, Attributes, and CSS properties
Making HTML safer: details for toStaticHTML (Windows Store apps using JavaScript and HTML) (Windows) - http://msdn.microsoft.com/en-us/library/windows/apps/hh465388.aspx
Win RT & JavaScript
Demo – How we do it.Scalpel.. Clamps.. Sutures… and a lot of Duct Tape
Additional Resources
• How to: Read and write to the social feed using the .NET client object model in SharePoint 2013• http://msdn.microsoft.com/en-us/library/jj163977(v=office.15).aspx
• Creating Windows Runtime Components in C# and VB• http://msdn.microsoft.com/en-us/library/windows/apps/br230301.aspx
• Walkthrough: Creating a simple component in C# or VB and calling it from JavaScript• http://msdn.microsoft.com/en-us/library/windows/apps/hh779077.aspx
How do you think WE learn this stuff?
Evaluate this session now on MySPC using your laptop or mobile device: http://myspc.sharepointconference.com
MySPC
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.