Sps bris - Customising Office 365 on the Client side
Upcoming SlideShare
Loading in...5
×
 

Sps bris - Customising Office 365 on the Client side

on

  • 1,504 views

Presentation delivered at SharePoint saturday brisbane on sandboxed solutions, CSOM, exchange API and authentication with 365

Presentation delivered at SharePoint saturday brisbane on sandboxed solutions, CSOM, exchange API and authentication with 365

Statistics

Views

Total Views
1,504
Views on SlideShare
1,502
Embed Views
2

Actions

Likes
0
Downloads
1
Comments
0

2 Embeds 2

https://si0.twimg.com 1
https://twitter.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

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

Sps bris - Customising Office 365 on the Client side Sps bris - Customising Office 365 on the Client side Presentation Transcript

  • Sponsors SharePoint Saturday Gold Programming SharePoint and Office 365 Silver on the Client SideBronze Elaine van Bergen OBS
  • Topics• Sandboxed Solutions• Client Object Models• Exchange Office 365 API• Authentication SharePoint Saturday Brisbane 2012
  • Setup Development Environment• Enable Microsoft SharePoint Foundation Sandboxed Code Service via CA• Download power tools http://visualstudiogallery.msdn.microsoft.com/8e602a8c-6714- 4549-9e95-f3700344b0d9• Download Silverlight toolkit http://www.microsoft.com/web/gallery/install.aspx?appid=s ilverlight4tools;silverlight4toolkit;riaservicestoolkit SharePoint Saturday Brisbane 2012
  • Sandbox Execution FRONT END BACK END User Code Service (SPUCHostService.exe)Execution Manager(Inside Application Pool) Sandbox Worker Process (SPUCWorkerProcess.exe) IIS (WPW3.EXE) Web.config / CAS Policies Subset-Model Request Sandbox Worker Proxy Process Access (SPUCWorkerProcessProxy.exe) restricted by CAS policy
  • Sandboxed Solutions Support Item Template Sandbox Compatible? Visual Web Part No Visual Web Part (Sandboxed) Yes Web Part Yes Sequential Workflow No State Machine Workflow No Business Data Connectivity No Model Application Page No Event Receiver Yes Module Yes Content Type Yes List Definition From Content Yes Type List Definition Yes List Instance Yes Empty Element Yes User Control No SharePoint Saturday Brisbane 2012
  • API Scope• Subset of Microsoft.SharePoint• Scoped to SPSite/Site Collection and below – Site Columns – Content Types – List Definitions – List Instances – Web Parts – Workflows – Custom Actions – SharePoint Designer workflow activities – Event Receivers – Modules/Files SharePoint Saturday Brisbane 2012
  • Unsupported Features• Anything above the site collection• Access to External Code/Data• Creation of SPWeb/SPSite outside of context• SPSecurity• BCS (WCF service supported) SharePoint Saturday Brisbane 2012
  • Sandbox Deployment UploadUpgrade Activation Deletion Deactivation SharePoint Saturday Brisbane 2012
  • Solution Monitoring• Protects Site Collection from resource intensive solutions• Resource Points measure resource consumption• Site Collection Quota limits resource consumption per day• Absolute Limit limits resources consumed by a solution SharePoint Saturday Brisbane 2012
  • Monitored Resources Resources AbsoluteLiMetric Name Description Units Per Point mitAbnormalProcessTerminationCount Process gets abnormally terminated Count 1 1CPUExecutionTime CPU exception time Seconds 3,600 60CriticalExceptionCount Critical exception fired Number 10 3 Number of times solutionInvocationCount Count N/A N/A has been invoked Percentage Units ofPercentProcessorTime Note: # of cores not factored in Overall Processor 85 100 ConsumedProcessCPUCycles CPU Cycles 1E+11 1E+11ProcessHandleCount Windows Handles 10,000 1,000 (Hard Limit Only) Bytes writtenProcessIOBytes Bytes 0 1E+08 to IO Number of ThreadsProcessThreadCount Threads 10,000 200 in Overall Process (Hard Limit Only)ProcessVirtualBytes Bytes 0 1E+09 Memory consumedSharePointDatabaseQueryCount SharePoint DB Queries Invoked Number 20 100 Amount of time spent waitingSharePointDatabaseQueryTime Seconds 120 60 for a query to be performedUnhandledExceptionCount Unhanded Exceptions 50 3 We have to kill the process becauseUnresponsiveprocessCount Number 2 1 it has become unresponsive
  • SharePoint 2010 Approach• Developers build Developer custom solutions • Design, build and test customizations• Administrators leverage resource monitors to Administrator check site collection • Monitor customizations usage• Site collection owners deploy, activate and Site Collection Owner implement the • Activate and use customizations customizations • Install customizations SharePoint Saturday Brisbane 2012
  • DEMOSANDBOXED SOLUTION SharePoint Saturday Brisbane 2012
  • Sandboxed Solution Summary• Easy Deployment Model – No coffee break• Limited functionality SharePoint Saturday Brisbane 2012
  • Why Client Object Model?• More SharePoint Web services is a major request• Client Object Model provides more complete API instead of more services• Provides an abstraction layer to return results as recognizable SharePoint objects• Consistent developer experience across platforms (.NET, ECMAScript, Silverlight) SharePoint Saturday Brisbane 2012
  • Supported Areas• Site Collections and Sites• Lists, List Items, Views, and List Schemas• Files and Folders• Web, List, and List Item Property Bags• Web Parts• Security• Content Types• Site Templates and Site Collection Operations SharePoint Saturday Brisbane 2012
  • ECMAScriptControlsand LogicBrowser JSON Response ECMAScript OM Server XML Request OM Proxy Client.svc XML Request Proxy JSON Response Content Managed OM databaseManaged Client Managed Controls and Logic SharePoint Server SharePoint Saturday Brisbane 2012
  • Server .NET Managed Silverlight ECMAScript(Microsoft.Shar (Microsoft.Shar (Microsoft.Shar (SP.js)ePoint) ePoint.Client) ePoint.Client.Sil verlight)SPContext ClientContext ClientContext ClientContextSPSite Site Site SiteSPWeb Web Web WebSPList List List ListSPListItem ListItem ListItem ListItemSPField Field Field Field SharePoint Saturday Brisbane 2012
  • .Net Client OM• Designed for use outside of SharePoint• Can be used with .Net 4.0 • Microsoft.SharePoint.Client SharePoint Saturday Brisbane 2012
  • .Net ExampleClientContext clientContext = new ClientContext("http://server");//Load methodclientContext.Load(clientContext.Web);clientContext.Load(clientContext.Web.Lists);//LoadQuery methodvar q1 = from list in context.Web.Lists where list.Title != null select list;var r1 = context.LoadQuery(q1);
  • ECMAScript Client OM• ECMAScript Client OM is easily added to a SharePoint ASPX page - reference: – _layouts/sp.js – Add this using <SharePoint:ScriptLink>• All libraries crunched for performance – Use un-crunched *.debug.js by adding <SharePoint:ScriptLink … ScriptMode=“Debug” />• Method signatures can be different• Different data value types SharePoint Saturday Brisbane 2012
  • Silverlight Client OM• Silverlight Development Enabled by Client OM• Can use Silverlight in separate ASPX page or in Web Part• Can utilize Client OM in Silverlight to create SharePoint apps SharePoint Saturday Brisbane 2012
  • Creating Silverlight Web Parts• A Web Part can be a host for Silverlight• SharePoint ships with Silverlight web part• The web part can contain custom properties that are sent to Silverlight via the InitParameters property• The XAP file can be deployed to LAYOUTS and loaded at run time• The Silverlight application can then make use of the Client OM. SharePoint Saturday Brisbane 2012
  • DEMOJAVASCRIPT CLIENT OBJECT MODEL SharePoint Saturday Brisbane 2012
  • Client Object Model Summary• 3 different versions• Need to load items to get data• Far easier than web services to get data SharePoint Saturday Brisbane 2012
  • EXCHANGE INTEGRATION SharePoint Saturday Brisbane 2012
  • EWS MA 1.1 Overview• Managed API for developing applications that use Exchange Web Services• Functional parity with EWS*• Makes EWS calls under the covers• Backwards compatible – Request versioning new ExchangeService( ExchangeVersion.Exchange2010_SP1);• Cloud compatible out of the box SharePoint Saturday Brisbane 2012
  • Autodiscover• Don’t hardcode EWS URL in your app!• Use Autodiscover to find most efficient Client Access Server URL for a given mailbox – On-Premise • Global & distributed deployments – Cloud based • Office 365 • Outlook Live • Live@EDU SharePoint Saturday Brisbane 2012
  • Autodiscover – Exchange Online EWS MA client contacts Autodiscoversevice EWS MA client executes callback to Validate URL Redirection EWS MA Autodiscover service returns URL for EWS EXO OfficeApplication bindings 365 EWS MA client connects to Exchange Web Services Firewall SharePoint Saturday Brisbane 2012
  • Impersonation• Application performs actions using another user’s – Identity – Permissions• Exchange ApplicationImpersonation role needs to be granted to a user• Service account is typically allowed to impersonate other accounts SharePoint Saturday Brisbane 2012
  • DEMOOFFICE CLIENT/EXCHANGE DEMO SharePoint Saturday Brisbane 2012
  • Office Client/Exchange Summary• Easy to program against exchange• Hybrid solutions to solve business problems• Call SharePoint from business systems SharePoint Saturday Brisbane 2012
  • SharePoint Saturday Brisbane 2012
  • Authentication• Claims + Federation + Multiple Authentication Providers• FedAuth cookie with HTTP Only Flag = WinInet.dll• Active vs. Passive COMPLICATED !http://msdn.microsoft.com/en-us/library/hh147177.aspxhttp://www.wictorwilen.se/Post/How-to-do-active-authentication-to-Office-365-and-SharePoint-Online.aspx SharePoint Saturday Brisbane 2012
  • Topics• Sandboxed Solutions• Client Object Models• Exchange Office 365 API• Authentication SharePoint Saturday Brisbane 2012
  • QUESTION AND ANSWER@LANEYVB SharePoint Saturday Brisbane 2012
  • SharePoint Saturday Sponsors Gold Thanks for listening! Remember to submit your feedback so Silver you can go into the raffle draw at the end of the day! And don’t forget that Bronzeyou have to be at the draw to claim your prizes!