Extending the Activity Feed - Bram de Jager`s SharePoint blog

Download Report

Transcript Extending the Activity Feed - Bram de Jager`s SharePoint blog

Extending the My Site activity feed with external blog posts

Bram de Jager Audience: Development Level: 300

About Bram

• • • Lead SharePoint developer / architect for Information Worker Solutions center of Macaw Microsoft Certified Master for SharePoint Server 2010 Contact – http://bramdejager.wordpress.com

– @bramdejager – [email protected]

Poll

• • • • • Who had a coffee?

Who are developers?

Who developed on social solutions?

Who played around with the Activity Feed API?

Who extended the Activity Feed for customer based solutions?

Agenda

• • • • User Profiles and My Site Activity Feeds Extending the Activity Feed Demo

Extending the My Site activity feed with external blog posts

USER PROFILES AND MY SITE

User Profiles and My Site

• • User Profiles – User Profile Service Application – Tight relation with MMS, BCS and Search – My Site Host (mandatory) provides My Profile and My Newsfeed pages My Site – Personal Site Collection (personal storage) – “Content” tab on My Profile page

Improvements SharePoint 2010

My Network • My Colleagues, My Interests, and Newsfeed Settings • Shows Activity Feeds from user’s network • Configuration and social network settings & interests My Profile • User profile data, including position within organization, memberships • Public notes, ratings and tags My Content (MOSS 2007 feature) • Personal and shared document libraries • Shared pictures, discussion boards, surveys • Lists, and sub-workspaces

Logical Architecture Components

My Network My Profile My Site Host My Content My Site

Pages / Navigation Site Collections

UPA My Web Application MMS

Web Application

Search

Service Applications

Extending the My Site activity feed with external blog posts

ACTIVITY FEEDS

Activity Feeds

• • • • Aggregates colleague activity as feed Natively displays user profile changes, tagging and notes activity Security trimmed, you can only see what you are allowed to see Can be extended via Activity Feed API

Data aggregation

• • Two types of activities – User profile changes such as job title, colleague changes, shared interest and anniversary reminders – Social feedback events such as tags, notes, ratings and personal blog posts Gathering by timer job and broadcasted to colleagues

Timer Jobs

• • Activity Feed job (Hourly) • Pre-computes activities to be shown in users' activity feeds.

• Aggregates user profile changes and social feedback Activity Feed Cleanup (Daily) – Cleans up pre-computed activities used in activity feeds which are older than 14 days. This job does not affect the User Profile Change Log.

Before and after SP1

• • Enable Activity Feed job – RTM: disabled by default – SP1: enabled by default Additional setting in “Setup My Sites”

Activity Feed types

• • Consolidated feed – Activities from everything I track http:///_layouts/activityfeed.aspx?consolidated=true Published feed – My activities http:///_layouts/activityfeed.aspx

– Activities by publisher http:///_layouts/activityfeed.aspx?publisher=

Consolidated feed

• Activities from everything I track

Activities I am following…

• • Activity feed depends on interests defined in Edit Profile page Custom activity applications will be soon here as well

Published feed

• Account related activities / my activities

Extending the My Site activity feed with external blog posts

EXTENDING THE ACTIVITY FEED

Extending activity feed

• • Why extend the activity feed?

– ECM activities within SharePoint environment – xRM/CRM activities – External data (WordPress, Facebook, Twitter) Activity Feed API for extending the activity feed – Microsoft.Office.Server.ActivityFeed

namespace – Microsoft.Office.Server.UserProfiles.dll

Activity feed architecture

Activity Timer Job Activity Feed Profile DB Custom Timer Job Social database Change log Profile DB

Activity Feed classes

Activity Application Blog Activity Application Activity Type Blog Post Added Comment Added Activity Template Type Display Single Value Template Multi Value Template Activity Event Type Value

Extending the My Site activity feed with external blog posts

DEMO OVERVIEW

Blog Activity Application

Activity Timer Job Activity Feed Profile DB Social database Change log Profile DB

Main classes

• • • ActivityFeed namespace – BlogActivityApplication – BlogPostGatherer – BlogPostTimerJob Entities namespace – Blog – Post BlogActivityApplicationGlobals

Solution Package (WSP)

• • Features – Activity Feed Blog application (Farm) – Configure Diagnostic Areas and Categories (Farm) – Activity Feed Blog Post Setup (WebApp) Resources – ActivityFeedBlog.resx

Activity Templates

• Type Display – ActivityFeed_Blog_BlogPostAdded_Type_Display – “Posted a new blog post”

Activity Templates

• Single Value Template – ActivityFeed_Blog_BlogPostAdded_SV_Template – “{Publisher} has written a new post {Link} on blog {Link2}.”

Activity Templates

• Multi Value Template – ActivityFeed_Blog_BlogPostAdded_MV_Template – “{Publisher} has written {Size} new posts on blog {Link}.
{List}”

Extending the My Site activity feed with external blog posts

DEMO TIME!!

Recap: Key Points

• • Activity Feed types – Consolidated feed – Published feed Extending the activity feed – Don’t just add everything, like Twitter (overload database) – Because you can, doesn’t mean you must!

What We Covered

• • • User Profiles and My Site Activity Feeds Extending the Activity Feed

Resources

• • • MSDN – User Profiles and Social Data Code Samples http://msdn.microsoft.com/en-us/library/ff512773.aspx

– Microsoft.Office.Server.ActivityFeed

namespace Wes Hackett’s blog – http://weshackett.com

SharePoint Guidance – SharePoint Logger – http://spg.codeplex.com

Thank You!

• • Blog: http://bramdejager.wordpress.com

Twitter: @bramdejager • Thanks to Wes Hackett – http://weshackett.com