Sponsors          SharePoint Saturday  Gold           Programming SharePoint                and Office 365 Silver         ...
Topics•   Sandboxed Solutions•   Client Object Models•   Exchange Office 365 API•   Authentication                        ...
Setup Development Environment• Enable Microsoft SharePoint Foundation  Sandboxed Code Service via CA• Download power tools...
Sandbox Execution     FRONT END                                 BACK END                                         User Code...
Sandboxed Solutions Support     Item Template                    Sandbox                                    Compatible?   ...
API Scope• Subset of Microsoft.SharePoint• Scoped to SPSite/Site Collection and below  –   Site Columns  –   Content Types...
Unsupported Features•   Anything above the site collection•   Access to External Code/Data•   Creation of SPWeb/SPSite out...
Sandbox Deployment                     UploadUpgrade                                Activation          Deletion          ...
Solution Monitoring• Protects Site Collection from resource intensive  solutions• Resource Points measure resource consump...
Monitored Resources                                                                                              Resources...
SharePoint 2010 Approach• Developers build          Developer  custom solutions          • Design, build and test         ...
DEMOSANDBOXED SOLUTION                     SharePoint Saturday                              Brisbane 2012
Sandboxed Solution Summary• Easy Deployment Model – No coffee break• Limited functionality                                ...
Why Client Object Model?• More SharePoint Web services  is a major request• Client Object Model provides more complete API...
Supported Areas•   Site Collections and Sites•   Lists, List Items, Views, and List Schemas•   Files and Folders•   Web, L...
ECMAScriptControlsand LogicBrowser                          JSON Response          ECMAScript OM                          ...
Server          .NET Managed Silverlight          ECMAScript(Microsoft.Shar (Microsoft.Shar (Microsoft.Shar (SP.js)ePoint)...
.Net Client OM• Designed for use outside of SharePoint• Can be used with .Net 4.0 • Microsoft.SharePoint.Client          ...
.Net ExampleClientContext clientContext = new ClientContext("http://server");//Load methodclientContext.Load(clientContext...
ECMAScript Client OM• ECMAScript Client OM is easily added to a  SharePoint ASPX page - reference:  – _layouts/sp.js  – Ad...
Silverlight Client OM• Silverlight Development Enabled by Client  OM• Can use Silverlight in separate ASPX page or  in Web...
Creating Silverlight Web Parts• A Web Part can be a host for Silverlight• SharePoint ships with Silverlight web part• The ...
DEMOJAVASCRIPT CLIENT OBJECT MODEL                          SharePoint Saturday                                   Brisbane...
Client Object Model Summary• 3 different versions• Need to load items to get data• Far easier than web services to get dat...
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*•...
Autodiscover• Don’t hardcode EWS URL in your app!• Use Autodiscover to find most efficient Client  Access Server URL for a...
Autodiscover – Exchange Online               EWS MA client contacts                Autodiscoversevice                EWS M...
Impersonation• Application performs actions using another  user’s  – Identity  – Permissions• Exchange ApplicationImperson...
DEMOOFFICE CLIENT/EXCHANGE DEMO                         SharePoint Saturday                                  Brisbane 2012
Office Client/Exchange Summary• Easy to program against exchange• Hybrid solutions to solve business problems• Call ShareP...
SharePoint Saturday         Brisbane 2012
Authentication• Claims + Federation + Multiple Authentication Providers• FedAuth cookie with HTTP Only Flag = WinInet.dll•...
Topics•   Sandboxed Solutions•   Client Object Models•   Exchange Office 365 API•   Authentication                        ...
QUESTION AND ANSWER@LANEYVB                      SharePoint Saturday                               Brisbane 2012
SharePoint Saturday                                           Sponsors                                             Gold   ...
Upcoming SlideShare
Loading in...5
×

Sps bris - Customising Office 365 on the Client side

1,257

Published on

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

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,257
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Sps bris - Customising Office 365 on the Client side

  1. 1. Sponsors SharePoint Saturday Gold Programming SharePoint and Office 365 Silver on the Client SideBronze Elaine van Bergen OBS
  2. 2. Topics• Sandboxed Solutions• Client Object Models• Exchange Office 365 API• Authentication SharePoint Saturday Brisbane 2012
  3. 3. 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
  4. 4. 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
  5. 5. 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
  6. 6. 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
  7. 7. 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
  8. 8. Sandbox Deployment UploadUpgrade Activation Deletion Deactivation SharePoint Saturday Brisbane 2012
  9. 9. 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
  10. 10. 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
  11. 11. 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
  12. 12. DEMOSANDBOXED SOLUTION SharePoint Saturday Brisbane 2012
  13. 13. Sandboxed Solution Summary• Easy Deployment Model – No coffee break• Limited functionality SharePoint Saturday Brisbane 2012
  14. 14. 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
  15. 15. 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
  16. 16. 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
  17. 17. 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
  18. 18. .Net Client OM• Designed for use outside of SharePoint• Can be used with .Net 4.0 • Microsoft.SharePoint.Client SharePoint Saturday Brisbane 2012
  19. 19. .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);
  20. 20. 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
  21. 21. 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
  22. 22. 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
  23. 23. DEMOJAVASCRIPT CLIENT OBJECT MODEL SharePoint Saturday Brisbane 2012
  24. 24. 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
  25. 25. EXCHANGE INTEGRATION SharePoint Saturday Brisbane 2012
  26. 26. 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
  27. 27. 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
  28. 28. 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
  29. 29. 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
  30. 30. DEMOOFFICE CLIENT/EXCHANGE DEMO SharePoint Saturday Brisbane 2012
  31. 31. Office Client/Exchange Summary• Easy to program against exchange• Hybrid solutions to solve business problems• Call SharePoint from business systems SharePoint Saturday Brisbane 2012
  32. 32. SharePoint Saturday Brisbane 2012
  33. 33. 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
  34. 34. Topics• Sandboxed Solutions• Client Object Models• Exchange Office 365 API• Authentication SharePoint Saturday Brisbane 2012
  35. 35. QUESTION AND ANSWER@LANEYVB SharePoint Saturday Brisbane 2012
  36. 36. 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!
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×