Upload
joris-poelmans
View
1.115
Download
0
Tags:
Embed Size (px)
Citation preview
SharePoint 2013 – Fun with SharePoint Social, CSOM and Windows 8Joris PoelmansSharePoint ArchitectRealDolmen
About meWork at RealDolmen
Technical lead and product manager
SharePoint Server MVP since 2005
Active in Belux Information Worker User Group –
www.biwug.be
Blog: http://jopx.blogspot.com
Twitter: @jopxtwits
3
Session Objectives• View what’s new with Social in SharePoint 2013
• Show how to develop a social app ...
• ... But mainly have some fun with Javascript, CSOM and the SharePoint 2013 social API
Session Objectives and Takeaways
5
• What are we going to build?
• What is Social?
• Client Side Object Model (CSOM) Overview
• Win RT Overview
• Roadblocks and common mistakes
Agenda
DemoWhat are we going to build?
What is Social in 2013?… it’s not about wasting company time
It’s all about socialShare
MicrofeedsLikesRatingsFeedsReputationMentions
9
• Microfeed is open in nature – but possible to restrict view in community sites
• @Mentions is powered by users in profile database
• My Site should be present
I share therefore I am
It’s all about socialShare
LikesRatingsFeedsReputationMentions
Stay up to date
FollowsSitesUsersDocumentsRecommendsCommunity site
11
• Newsfeed shows you updates on social activities for items and people you are following
• People posts, profile changes, changes on followed documents, items tagged with followed tags, mentions, likes, company feed
• Recommended Content web part driven by Search Analytics provides follow suggestions
• Community site• Discussion boards gain functionality with
reputation settings, best answer roll-up, report abuse, etc …
Stay up to date
It’s all about socialShare
LikesRatingsFeedsReputationMentions
How it works
MicrofeedAppfabricUser Profiles
Stay up to date
FollowsSitesUsersDocumentsRecommendsCommunity site
13
• Microfeed list• It’s about the GUIDs• Consolidated View web part reads from AppFabric Cache
• AppFabric• Used by Distributed Cache service (Velocity)• Drives social and token caching• Fast State memory – not everything is persisted (e.g.
document activities)
How it all works
CSOM … or the long version – the Client Side Object Model
15
Allows development that runs outside of the SharePoint Server
First introduced in SharePoint 2010
Main investments in 20131. Client.svc is extended with REST capabilities and
implemented in accordance with oData protocol2. New APIs for SharePoint Server functionality – User
Profiles,Search, Taxonomy, Feeds, …
CSOM
16
CSOM in SharePoint 2010
17
CSOM in SharePoint 2013
18
We still have our old friends• Microsoft.SharePoint.Client
• Microsoft.SharePoint.ClientRuntime
… but with some new buddies• Microsoft.SharePoint.Client.DocumentManagement
• Microsoft.SharePoint.Client.UserProfiles
• Microsoft.SharePoint.Client.Publishing
• Microsoft.SharePoint.Client.Search
• Microsft.SharePoint.Client.Taxonomy
CSOM in SharePoint 2013
19
Still works the same way• Create Context
• Build Request
• Execute Query
… but with extra classes• SocialFeedManager – Get Feeds
• SocialFollowingManager – Get Followed Content
• SocialActor – User,site,document or tag
• SocialPost – Text, attachment, likerInfo
CSOM in SharePoint 2013
20
CSOM in SP2013 – code sample//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();
Something about Win RT
22
New application architecture for Windows 8 OS
Native support for x86 and ARM architectures
C#; VB.NET and Javascript (also C++/CX)
New app model with focus on security and stability
Win RT Overview
23
Learn Javascript & JQuery
HTML5/CSS3 supported
New controls in WinJS - http://msdn.microsoft.com/en-us/library/windows/apps/hh465453.aspx
Able to reference Windows Runtime Component libraries (C#,VB, or C++)
Some things work differently – no alert, prompt, moveBy, moveTo, Resize, …
Win RT & Javascript
24
Script “injection” is not allowed“toStaticHTML” filters HTML injected into the pageAffects the following properties and methods
createContextualFragmentinnerHTML and outerHTMLinsertAdjacentHTMLpasteHTMLdocument.write and document.writelnDOMParser.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
DemoLet’s build it from scratch ... (but not completely off course )
26
ReferencesCode samples and walkthrough will be posted on http://jopx.blogspot.com
How to: Read and write to the social feed using the .NET client object model in SharePoint 2013http://msdn.microsoft.com/en-us/library/jj163977(v=office.15).aspx
Creating Windows Runtime Components in C# and VBhttp://msdn.microsoft.com/en-us/library/windows/apps/br230301.aspx
Walkthrough: Creating a simple component in C# or VB and calling it from JavaScripthttp://msdn.microsoft.com/en-us/library/windows/apps/hh779077.aspx
Thank You
Q & A