SlideShare uma empresa Scribd logo
1 de 40
Dealing with and Learning from the
                          Sandbox
                   Elaine van Bergen
                                OBS
Who Am I ?

• SharePoint 2010 MCM
• SharePoint MVP
• Co-organiser of Melbourne SharePoint User Group
  (MSPUG)
• @laneyvb on Twitter
Types

• SharePoint online dedicated
• On-premise sandbox
• SharePoint online
Online Dedicated

• Unlikely to be used by Australian Customers
• May actually be hosted not dedicated
• Great case study for what Microsoft requires for
  customisation
• Plenty of advice useful for all SharePoint developers
Design Process for Customisation

•   Gather requirements.
•   Create high-level design (HLD) document.
•   Microsoft review of HLD.
•   Develop custom solution.
•   Test, package, and validate with MSOCAF.
Design Guidelines - Examples

• Use native SharePoint functionality when possible
• Evaluate the use of a client-side solution
• Create logical solution versioning
• Move business logic to separate classes
• Develop asynchronous code that connects to an
  Internet address
• Ensure that dependencies to external systems are
  managed correctly
Design Guidelines – Directory Structure

•   Solution Artifacts
•   Release
•   Source code
•   Installation scripts
•   Test documentation



http://www.microsoft.com/download/en/details.aspx?displaylan
g=en&id=18128
MSOCAF

• Guidance Package
• Analyze Code
   – Structure
   – FXCOP
   – Additional Rules
• Submit



https://caf.sharepoint.microsoftonline.com/Default.aspx
MSOCAF – Additional Rules

• SPList.Items
• SPListItemCollectionGetItemByID inside loop
• SPListItem.Update() inside loop
• Log Exceptions in Feature Receiver and Report Back
  to SharePoint
• SharePointMonitorScope Webpart Check


https://caf.sharepoint.microsoftonline.com/Default.aspx
Demo
MSOCAF
SharePoint Online Dedicated




      Great Guidance for ANY SharePoint
                Development
On Premise Sandbox

• How does it work ?
• Why ?
• Development Setup
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




                            Sandbox Worker Proxy Process
                              (SPUCWorkerProcessProxy.exe)
Deployment

•   Solution Gallery at Site Collection
•   Site Collection Admin uploads and activates solution
•   Solutions are validated against policies
•   No artefacts on file system
•   No IIS Reset
Custom Validators
[GuidAttribute("34805697-1FC4-4b66-AF09-AB48AC0F9D97")]
public class PublisherValidator : SPSolutionValidator{

    [Persisted]
    List<string> _allowedPublishers;

    public override void ValidateSolution(
      SPSolutionValidationProperties properties){
    }

    public override void ValidateAssembly(
      SPSolutionValidationProperties properties,
      SPSolutionFile assembly){
    }
}
Supported Artefacts
API Scope

• Sandboxed .Net Code
   – Very limited subset of Microsoft.SharePoint
   – Scoped to current SPSite and below
   – No SPSecurity
   – No web service , external data or other network
     calls

• Client side code
   – Silverlight
   – JavaScript
ECMAScriptControlsand Logic

Browser
                       JSON Response
      ECMAScript OM                                          Server
                        XML Request
                                                              OM
            Proxy

                                       Client.svc
                        XML Request
            Proxy

                       JSON Response                      Content
          Managed OM
                                                         database
Managed Client

  Managed Controls and Logic             SharePoint Server
Server          .NET Managed Silverlight          ECMAScript
(Microsoft.Shar (Microsoft.Shar (Microsoft.Shar (SP.js)
ePoint)         ePoint.Client)  ePoint.Client.Sil
                                verlight)
SPContext       ClientContext   ClientContext   ClientContext

SPSite          Site            Site            Site

SPWeb           Web             Web             Web

SPList          List            List            List

SPListItem      ListItem        ListItem        ListItem

SPField         Field           Field           Field
Full Trust Proxy

• Operations in class that inherits
  Microsoft.SharePoint.Usercode.SPProxyOperation
• Arguments in serializable class that inherits
  Microsoft.SharePoint.Usercode.SPProxyOperationArgs
• Register full trust proxy
• Recycle user code service
• Consume via SPUtility.ExecuteRegisteredProxyOperation
Display Logic




Reusable/Complex Logic
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 cuts of solutions when limit hit
Monitored Metrics
                                                                                         Resources Per Absolute
Metric Name                       Description                     Units
                                                                                         Point         Limit
                                  Process gets abnormally
AbnormalProcessTerminationCount                                   Count                  1            1
                                  terminated

CPUExecutionTime                  CPU exception time              Seconds                3,600        60


CriticalExceptionCount            Critical exception fired        Number                 10           3

                                                                   Percentage Units of
PercentProcessorTime              Note: # of cores not factored in Overall Processor     85           100
                                                                   Consumed

                                  Number of Threads
ProcessThreadCount                                                Threads                10,000       200
                                  in Overall Process

SharePointDatabaseQueryCount      SharePoint DB Queries Invoked Number                   20           100

                                  Amount of time spent waiting
SharePointDatabaseQueryTime                                       Seconds                120          60
                                  for a query to be performed

UnhandledExceptionCount           Unhanded Exceptions                                    50           3
Why ?

• Developers can deploy updates without IIS restarts
• Site Collection Owners can control loading of
  solutions
• Complex code separated from display logic
• Solution performance can be monitored and
  controlled


     Rapid changes possible with low Governance
Development Setup

• 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=sil
  verlight4tools;silverlight4toolkit;riaservicestoolkit
Sandbox modes

• Local Mode:
   – Execute code on WFE
   – Low administration overhead
   – Lower scalability

• Remote Mode:
   – Execute on dedicated SharePoint servers
   – Load balanced distribution of code execution
     requests
Demo
Sandbox Solutions
Common Pain Points

•   Error Handling/Visibility
•   Configuration Storage
•   Limited API set
•   Learning curve required
On Premise Sandbox




  Promotes efficient , well designed code that
     allows for rapid user interface change
SharePoint Online

• Development Process
• Data Access
• Authentication
spo.company.com/test



                                 spo.company.com/prod




                        *.wsp



                         Upload/
                         Activate/
                         Deactivate


local.company.com
Data Access

• SharePoint data – Rest API, webservices, CSOM
• JSON-P calling services
  http://www.wictorwilen.se/Post/SharePoint-Online-and-
  External-Data-using-JSONP.aspx
• BCS + WCF Service + Client Object Model
• Applications put or get data to/from SharePoint
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.aspx
http://www.wictorwilen.se/Post/How-to-do-active-
authentication-to-Office-365-and-SharePoint-Online.aspx
SharePoint Online Sandbox




  Authentication and Data Access need to be
              carefully planned
Summary



Consider sandbox concepts as part of your
solution design


                @laneyvb
Gold Sponsors


                  Silver Sponsors




Bronze Sponsors                     Media Sponsors

Mais conteúdo relacionado

Mais procurados

Ecs19 - Hans Brender - Is OneDrive Really Enterprise Ready
Ecs19 - Hans Brender -  Is OneDrive Really Enterprise ReadyEcs19 - Hans Brender -  Is OneDrive Really Enterprise Ready
Ecs19 - Hans Brender - Is OneDrive Really Enterprise ReadyEuropean Collaboration Summit
 
ECS19 - Patrick Curran - Expanding User Profiles with Line of Business Data (...
ECS19 - Patrick Curran - Expanding User Profiles with Line of Business Data (...ECS19 - Patrick Curran - Expanding User Profiles with Line of Business Data (...
ECS19 - Patrick Curran - Expanding User Profiles with Line of Business Data (...European Collaboration Summit
 
ECS19 - Vesa Juvonen - SharePoint Development for Enterprises - What's New an...
ECS19 - Vesa Juvonen - SharePoint Development for Enterprises - What's New an...ECS19 - Vesa Juvonen - SharePoint Development for Enterprises - What's New an...
ECS19 - Vesa Juvonen - SharePoint Development for Enterprises - What's New an...European Collaboration Summit
 
[McDermott] Configuring SharePoint Hybrid Search and Taxonomy
[McDermott] Configuring SharePoint Hybrid Search and Taxonomy[McDermott] Configuring SharePoint Hybrid Search and Taxonomy
[McDermott] Configuring SharePoint Hybrid Search and TaxonomyEuropean Collaboration Summit
 
ECS19 - Patrick Curran, Eric Shupps - SHAREPOINT 24X7X365: ARCHITECTING FOR H...
ECS19 - Patrick Curran, Eric Shupps - SHAREPOINT 24X7X365: ARCHITECTING FOR H...ECS19 - Patrick Curran, Eric Shupps - SHAREPOINT 24X7X365: ARCHITECTING FOR H...
ECS19 - Patrick Curran, Eric Shupps - SHAREPOINT 24X7X365: ARCHITECTING FOR H...European Collaboration Summit
 
O365con14 - migrating your e-mail to the cloud
O365con14 - migrating your e-mail to the cloudO365con14 - migrating your e-mail to the cloud
O365con14 - migrating your e-mail to the cloudNCCOMMS
 
Spca2014 keynote johnson
Spca2014 keynote johnsonSpca2014 keynote johnson
Spca2014 keynote johnsonNCCOMMS
 
ECS19 - Mustafa Toroman, Sasa Kranjac - SOUP TO NUTS: MICROSOFT AZURE POWERCLASS
ECS19 - Mustafa Toroman, Sasa Kranjac - SOUP TO NUTS: MICROSOFT AZURE POWERCLASSECS19 - Mustafa Toroman, Sasa Kranjac - SOUP TO NUTS: MICROSOFT AZURE POWERCLASS
ECS19 - Mustafa Toroman, Sasa Kranjac - SOUP TO NUTS: MICROSOFT AZURE POWERCLASSEuropean Collaboration Summit
 
[Vončina] Configuring SharePoint 2016 for BI Scenarios
[Vončina] Configuring SharePoint 2016 for BI Scenarios[Vončina] Configuring SharePoint 2016 for BI Scenarios
[Vončina] Configuring SharePoint 2016 for BI ScenariosEuropean Collaboration Summit
 
SPCA2013 - Windows Workflow Manager for the IT Pro
SPCA2013 - Windows Workflow Manager for the IT ProSPCA2013 - Windows Workflow Manager for the IT Pro
SPCA2013 - Windows Workflow Manager for the IT ProNCCOMMS
 
SharePoint 2013 Performance Enhancements
SharePoint 2013 Performance EnhancementsSharePoint 2013 Performance Enhancements
SharePoint 2013 Performance EnhancementsEric Shupps
 
ECS19 - Ingo Gegenwarth - Running Exchange in large environment
ECS19 - Ingo Gegenwarth -  Running Exchangein large environmentECS19 - Ingo Gegenwarth -  Running Exchangein large environment
ECS19 - Ingo Gegenwarth - Running Exchange in large environmentEuropean Collaboration Summit
 
ECS19 - Marco Rocca and Fabio Franzini - Need a custom logic in PowerApps? Us...
ECS19 - Marco Rocca and Fabio Franzini - Need a custom logic in PowerApps? Us...ECS19 - Marco Rocca and Fabio Franzini - Need a custom logic in PowerApps? Us...
ECS19 - Marco Rocca and Fabio Franzini - Need a custom logic in PowerApps? Us...European Collaboration Summit
 
ECS19 - Mike Ammerlaan - Integrate with OneDrive and SharePoint Files
ECS19 - Mike Ammerlaan - Integrate with OneDrive and SharePoint FilesECS19 - Mike Ammerlaan - Integrate with OneDrive and SharePoint Files
ECS19 - Mike Ammerlaan - Integrate with OneDrive and SharePoint FilesEuropean Collaboration Summit
 
Windows Azure Workflows Manager - Running Durable Workflows in the Cloud and ...
Windows Azure Workflows Manager - Running Durable Workflows in the Cloud and ...Windows Azure Workflows Manager - Running Durable Workflows in the Cloud and ...
Windows Azure Workflows Manager - Running Durable Workflows in the Cloud and ...BizTalk360
 
ECS19 - Johan Delimon - Keep your Skype for Business Hybrid working like a ch...
ECS19 - Johan Delimon - Keep your Skype for Business Hybrid working like a ch...ECS19 - Johan Delimon - Keep your Skype for Business Hybrid working like a ch...
ECS19 - Johan Delimon - Keep your Skype for Business Hybrid working like a ch...European Collaboration Summit
 
Office 365 and SharePoint 2013 Hybrid Environments
Office 365 and SharePoint 2013 Hybrid EnvironmentsOffice 365 and SharePoint 2013 Hybrid Environments
Office 365 and SharePoint 2013 Hybrid EnvironmentsRene Modery
 
APIs, APIs Everywhere!
APIs, APIs Everywhere!APIs, APIs Everywhere!
APIs, APIs Everywhere!BIWUG
 
[Toroman/Kranjac] Red Team vs. Blue Team in Microsoft Cloud
[Toroman/Kranjac] Red Team vs. Blue Team in Microsoft Cloud[Toroman/Kranjac] Red Team vs. Blue Team in Microsoft Cloud
[Toroman/Kranjac] Red Team vs. Blue Team in Microsoft CloudEuropean Collaboration Summit
 

Mais procurados (20)

Ecs19 - Hans Brender - Is OneDrive Really Enterprise Ready
Ecs19 - Hans Brender -  Is OneDrive Really Enterprise ReadyEcs19 - Hans Brender -  Is OneDrive Really Enterprise Ready
Ecs19 - Hans Brender - Is OneDrive Really Enterprise Ready
 
ECS19 - Patrick Curran - Expanding User Profiles with Line of Business Data (...
ECS19 - Patrick Curran - Expanding User Profiles with Line of Business Data (...ECS19 - Patrick Curran - Expanding User Profiles with Line of Business Data (...
ECS19 - Patrick Curran - Expanding User Profiles with Line of Business Data (...
 
ECS19 - Vesa Juvonen - SharePoint Development for Enterprises - What's New an...
ECS19 - Vesa Juvonen - SharePoint Development for Enterprises - What's New an...ECS19 - Vesa Juvonen - SharePoint Development for Enterprises - What's New an...
ECS19 - Vesa Juvonen - SharePoint Development for Enterprises - What's New an...
 
[McDermott] Configuring SharePoint Hybrid Search and Taxonomy
[McDermott] Configuring SharePoint Hybrid Search and Taxonomy[McDermott] Configuring SharePoint Hybrid Search and Taxonomy
[McDermott] Configuring SharePoint Hybrid Search and Taxonomy
 
ECS19 - Patrick Curran, Eric Shupps - SHAREPOINT 24X7X365: ARCHITECTING FOR H...
ECS19 - Patrick Curran, Eric Shupps - SHAREPOINT 24X7X365: ARCHITECTING FOR H...ECS19 - Patrick Curran, Eric Shupps - SHAREPOINT 24X7X365: ARCHITECTING FOR H...
ECS19 - Patrick Curran, Eric Shupps - SHAREPOINT 24X7X365: ARCHITECTING FOR H...
 
O365con14 - migrating your e-mail to the cloud
O365con14 - migrating your e-mail to the cloudO365con14 - migrating your e-mail to the cloud
O365con14 - migrating your e-mail to the cloud
 
Spca2014 keynote johnson
Spca2014 keynote johnsonSpca2014 keynote johnson
Spca2014 keynote johnson
 
ECS19 - Mustafa Toroman, Sasa Kranjac - SOUP TO NUTS: MICROSOFT AZURE POWERCLASS
ECS19 - Mustafa Toroman, Sasa Kranjac - SOUP TO NUTS: MICROSOFT AZURE POWERCLASSECS19 - Mustafa Toroman, Sasa Kranjac - SOUP TO NUTS: MICROSOFT AZURE POWERCLASS
ECS19 - Mustafa Toroman, Sasa Kranjac - SOUP TO NUTS: MICROSOFT AZURE POWERCLASS
 
[Vončina] Configuring SharePoint 2016 for BI Scenarios
[Vončina] Configuring SharePoint 2016 for BI Scenarios[Vončina] Configuring SharePoint 2016 for BI Scenarios
[Vončina] Configuring SharePoint 2016 for BI Scenarios
 
SPCA2013 - Windows Workflow Manager for the IT Pro
SPCA2013 - Windows Workflow Manager for the IT ProSPCA2013 - Windows Workflow Manager for the IT Pro
SPCA2013 - Windows Workflow Manager for the IT Pro
 
SharePoint 2013 Performance Enhancements
SharePoint 2013 Performance EnhancementsSharePoint 2013 Performance Enhancements
SharePoint 2013 Performance Enhancements
 
ECS19 - Ingo Gegenwarth - Running Exchange in large environment
ECS19 - Ingo Gegenwarth -  Running Exchangein large environmentECS19 - Ingo Gegenwarth -  Running Exchangein large environment
ECS19 - Ingo Gegenwarth - Running Exchange in large environment
 
ECS19 - Marco Rocca and Fabio Franzini - Need a custom logic in PowerApps? Us...
ECS19 - Marco Rocca and Fabio Franzini - Need a custom logic in PowerApps? Us...ECS19 - Marco Rocca and Fabio Franzini - Need a custom logic in PowerApps? Us...
ECS19 - Marco Rocca and Fabio Franzini - Need a custom logic in PowerApps? Us...
 
ECS19 - Mike Ammerlaan - Integrate with OneDrive and SharePoint Files
ECS19 - Mike Ammerlaan - Integrate with OneDrive and SharePoint FilesECS19 - Mike Ammerlaan - Integrate with OneDrive and SharePoint Files
ECS19 - Mike Ammerlaan - Integrate with OneDrive and SharePoint Files
 
Windows Azure Workflows Manager - Running Durable Workflows in the Cloud and ...
Windows Azure Workflows Manager - Running Durable Workflows in the Cloud and ...Windows Azure Workflows Manager - Running Durable Workflows in the Cloud and ...
Windows Azure Workflows Manager - Running Durable Workflows in the Cloud and ...
 
ECS19 - Johan Delimon - Keep your Skype for Business Hybrid working like a ch...
ECS19 - Johan Delimon - Keep your Skype for Business Hybrid working like a ch...ECS19 - Johan Delimon - Keep your Skype for Business Hybrid working like a ch...
ECS19 - Johan Delimon - Keep your Skype for Business Hybrid working like a ch...
 
Office 365 and SharePoint 2013 Hybrid Environments
Office 365 and SharePoint 2013 Hybrid EnvironmentsOffice 365 and SharePoint 2013 Hybrid Environments
Office 365 and SharePoint 2013 Hybrid Environments
 
APIs, APIs Everywhere!
APIs, APIs Everywhere!APIs, APIs Everywhere!
APIs, APIs Everywhere!
 
[Noel] Azure AD Connect Technical Deep Dive
[Noel] Azure AD Connect Technical Deep Dive[Noel] Azure AD Connect Technical Deep Dive
[Noel] Azure AD Connect Technical Deep Dive
 
[Toroman/Kranjac] Red Team vs. Blue Team in Microsoft Cloud
[Toroman/Kranjac] Red Team vs. Blue Team in Microsoft Cloud[Toroman/Kranjac] Red Team vs. Blue Team in Microsoft Cloud
[Toroman/Kranjac] Red Team vs. Blue Team in Microsoft Cloud
 

Semelhante a Great Guidance for ANY SharePoint Development

SharePoint Sandboxed Solutions and InfoPath - TechEd Middle East
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle EastSharePoint Sandboxed Solutions and InfoPath - TechEd Middle East
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle EastAyman El-Hattab
 
Getting started with Office 365 SharePoint 2010 online development
Getting started with Office 365 SharePoint 2010 online developmentGetting started with Office 365 SharePoint 2010 online development
Getting started with Office 365 SharePoint 2010 online developmentJeremy Thake
 
SharePoint 2010 Online for Developer
SharePoint 2010 Online for DeveloperSharePoint 2010 Online for Developer
SharePoint 2010 Online for DeveloperK.Mohamed Faizal
 
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...Amazon Web Services
 
SharePoint 2010 - Tips and Tricks of the Trade - Avoiding Administrative Blun...
SharePoint 2010 - Tips and Tricks of the Trade - Avoiding Administrative Blun...SharePoint 2010 - Tips and Tricks of the Trade - Avoiding Administrative Blun...
SharePoint 2010 - Tips and Tricks of the Trade - Avoiding Administrative Blun...Dan Usher
 
SharePoint 2010 - Tips and Tricks of the Trade - Avoiding Administrative Blun...
SharePoint 2010 - Tips and Tricks of the Trade - Avoiding Administrative Blun...SharePoint 2010 - Tips and Tricks of the Trade - Avoiding Administrative Blun...
SharePoint 2010 - Tips and Tricks of the Trade - Avoiding Administrative Blun...Dan Usher
 
Workflow All the Things with Azure Logic Apps
Workflow All the Things with Azure Logic AppsWorkflow All the Things with Azure Logic Apps
Workflow All the Things with Azure Logic AppsJosh Lane
 
Deploying and Managing PowerPivot for SharePoint
Deploying and Managing PowerPivot for SharePointDeploying and Managing PowerPivot for SharePoint
Deploying and Managing PowerPivot for SharePointDenny Lee
 
NoSQL em Windows Azure Table Storage - Vitor Tomaz
NoSQL em Windows Azure Table Storage - Vitor TomazNoSQL em Windows Azure Table Storage - Vitor Tomaz
NoSQL em Windows Azure Table Storage - Vitor TomazComunidade NetPonto
 
SharePoint Saturday The Conference DC - How the client object model saved the...
SharePoint Saturday The Conference DC - How the client object model saved the...SharePoint Saturday The Conference DC - How the client object model saved the...
SharePoint Saturday The Conference DC - How the client object model saved the...Liam Cleary [MVP]
 
Building dynamic applications with the share point client object model
Building dynamic applications with the share point client object modelBuilding dynamic applications with the share point client object model
Building dynamic applications with the share point client object modelEric Shupps
 
[NetPonto] NoSQL em Windows Azure Table Storage
[NetPonto] NoSQL em Windows Azure Table Storage[NetPonto] NoSQL em Windows Azure Table Storage
[NetPonto] NoSQL em Windows Azure Table StorageVitor Tomaz
 
SharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSPC Adriatics
 
Performance Oriented Design
Performance Oriented DesignPerformance Oriented Design
Performance Oriented DesignRodrigo Campos
 
What's New in .Net 4.5
What's New in .Net 4.5What's New in .Net 4.5
What's New in .Net 4.5Malam Team
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and ActivatorKevin Webber
 
SPSNYC SharePoint Worst Practices
SPSNYC SharePoint Worst PracticesSPSNYC SharePoint Worst Practices
SPSNYC SharePoint Worst PracticesScott Hoag
 

Semelhante a Great Guidance for ANY SharePoint Development (20)

SharePoint Sandboxed Solutions and InfoPath - TechEd Middle East
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle EastSharePoint Sandboxed Solutions and InfoPath - TechEd Middle East
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle East
 
Getting started with Office 365 SharePoint 2010 online development
Getting started with Office 365 SharePoint 2010 online developmentGetting started with Office 365 SharePoint 2010 online development
Getting started with Office 365 SharePoint 2010 online development
 
SharePoint 2010 Online for Developer
SharePoint 2010 Online for DeveloperSharePoint 2010 Online for Developer
SharePoint 2010 Online for Developer
 
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
 
SharePoint 2010 - Tips and Tricks of the Trade - Avoiding Administrative Blun...
SharePoint 2010 - Tips and Tricks of the Trade - Avoiding Administrative Blun...SharePoint 2010 - Tips and Tricks of the Trade - Avoiding Administrative Blun...
SharePoint 2010 - Tips and Tricks of the Trade - Avoiding Administrative Blun...
 
Azure cosmosdb
Azure cosmosdbAzure cosmosdb
Azure cosmosdb
 
App fabric introduction
App fabric introductionApp fabric introduction
App fabric introduction
 
SharePoint 2010 - Tips and Tricks of the Trade - Avoiding Administrative Blun...
SharePoint 2010 - Tips and Tricks of the Trade - Avoiding Administrative Blun...SharePoint 2010 - Tips and Tricks of the Trade - Avoiding Administrative Blun...
SharePoint 2010 - Tips and Tricks of the Trade - Avoiding Administrative Blun...
 
Workflow All the Things with Azure Logic Apps
Workflow All the Things with Azure Logic AppsWorkflow All the Things with Azure Logic Apps
Workflow All the Things with Azure Logic Apps
 
Deploying and Managing PowerPivot for SharePoint
Deploying and Managing PowerPivot for SharePointDeploying and Managing PowerPivot for SharePoint
Deploying and Managing PowerPivot for SharePoint
 
NoSQL em Windows Azure Table Storage - Vitor Tomaz
NoSQL em Windows Azure Table Storage - Vitor TomazNoSQL em Windows Azure Table Storage - Vitor Tomaz
NoSQL em Windows Azure Table Storage - Vitor Tomaz
 
SharePoint Saturday The Conference DC - How the client object model saved the...
SharePoint Saturday The Conference DC - How the client object model saved the...SharePoint Saturday The Conference DC - How the client object model saved the...
SharePoint Saturday The Conference DC - How the client object model saved the...
 
Building dynamic applications with the share point client object model
Building dynamic applications with the share point client object modelBuilding dynamic applications with the share point client object model
Building dynamic applications with the share point client object model
 
[NetPonto] NoSQL em Windows Azure Table Storage
[NetPonto] NoSQL em Windows Azure Table Storage[NetPonto] NoSQL em Windows Azure Table Storage
[NetPonto] NoSQL em Windows Azure Table Storage
 
SharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi Vončina
 
Performance Oriented Design
Performance Oriented DesignPerformance Oriented Design
Performance Oriented Design
 
What's New in .Net 4.5
What's New in .Net 4.5What's New in .Net 4.5
What's New in .Net 4.5
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and Activator
 
SPSNYC SharePoint Worst Practices
SPSNYC SharePoint Worst PracticesSPSNYC SharePoint Worst Practices
SPSNYC SharePoint Worst Practices
 
Serverless SQL
Serverless SQLServerless SQL
Serverless SQL
 

Mais de Elaine Van Bergen

What's New in Office 365 - SPSSyd
What's New in Office 365 - SPSSydWhat's New in Office 365 - SPSSyd
What's New in Office 365 - SPSSydElaine Van Bergen
 
SharePoint Saturday - Sandbox development
SharePoint Saturday - Sandbox developmentSharePoint Saturday - Sandbox development
SharePoint Saturday - Sandbox developmentElaine Van Bergen
 
Design and Development performance considerations
Design and Development performance considerationsDesign and Development performance considerations
Design and Development performance considerationsElaine Van Bergen
 
SharePoint Saturday Workflow in Action
SharePoint Saturday Workflow in ActionSharePoint Saturday Workflow in Action
SharePoint Saturday Workflow in ActionElaine Van Bergen
 
Building Workflows for SharePoint 2010 with SharePoint Designer and Visio
Building Workflows for SharePoint 2010 with SharePoint Designer and VisioBuilding Workflows for SharePoint 2010 with SharePoint Designer and Visio
Building Workflows for SharePoint 2010 with SharePoint Designer and VisioElaine Van Bergen
 
Maximise the benefits of a SharePoint platform using metric based governance
Maximise the benefits of a SharePoint platform using metric based governanceMaximise the benefits of a SharePoint platform using metric based governance
Maximise the benefits of a SharePoint platform using metric based governanceElaine Van Bergen
 
Getting Started With Share Point 2010
Getting Started With Share Point 2010Getting Started With Share Point 2010
Getting Started With Share Point 2010Elaine Van Bergen
 
Governance Configure Customise Code
Governance Configure Customise CodeGovernance Configure Customise Code
Governance Configure Customise CodeElaine Van Bergen
 

Mais de Elaine Van Bergen (9)

What's New in Office 365 - SPSSyd
What's New in Office 365 - SPSSydWhat's New in Office 365 - SPSSyd
What's New in Office 365 - SPSSyd
 
SharePoint Saturday - Sandbox development
SharePoint Saturday - Sandbox developmentSharePoint Saturday - Sandbox development
SharePoint Saturday - Sandbox development
 
Design and Development performance considerations
Design and Development performance considerationsDesign and Development performance considerations
Design and Development performance considerations
 
SharePoint Saturday Workflow in Action
SharePoint Saturday Workflow in ActionSharePoint Saturday Workflow in Action
SharePoint Saturday Workflow in Action
 
Building Workflows for SharePoint 2010 with SharePoint Designer and Visio
Building Workflows for SharePoint 2010 with SharePoint Designer and VisioBuilding Workflows for SharePoint 2010 with SharePoint Designer and Visio
Building Workflows for SharePoint 2010 with SharePoint Designer and Visio
 
Maximise the benefits of a SharePoint platform using metric based governance
Maximise the benefits of a SharePoint platform using metric based governanceMaximise the benefits of a SharePoint platform using metric based governance
Maximise the benefits of a SharePoint platform using metric based governance
 
SharePoint 2010 Development
SharePoint 2010 DevelopmentSharePoint 2010 Development
SharePoint 2010 Development
 
Getting Started With Share Point 2010
Getting Started With Share Point 2010Getting Started With Share Point 2010
Getting Started With Share Point 2010
 
Governance Configure Customise Code
Governance Configure Customise CodeGovernance Configure Customise Code
Governance Configure Customise Code
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Último (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Great Guidance for ANY SharePoint Development

  • 1. Dealing with and Learning from the Sandbox Elaine van Bergen OBS
  • 2. Who Am I ? • SharePoint 2010 MCM • SharePoint MVP • Co-organiser of Melbourne SharePoint User Group (MSPUG) • @laneyvb on Twitter
  • 3.
  • 4.
  • 5. Types • SharePoint online dedicated • On-premise sandbox • SharePoint online
  • 6. Online Dedicated • Unlikely to be used by Australian Customers • May actually be hosted not dedicated • Great case study for what Microsoft requires for customisation • Plenty of advice useful for all SharePoint developers
  • 7. Design Process for Customisation • Gather requirements. • Create high-level design (HLD) document. • Microsoft review of HLD. • Develop custom solution. • Test, package, and validate with MSOCAF.
  • 8. Design Guidelines - Examples • Use native SharePoint functionality when possible • Evaluate the use of a client-side solution • Create logical solution versioning • Move business logic to separate classes • Develop asynchronous code that connects to an Internet address • Ensure that dependencies to external systems are managed correctly
  • 9. Design Guidelines – Directory Structure • Solution Artifacts • Release • Source code • Installation scripts • Test documentation http://www.microsoft.com/download/en/details.aspx?displaylan g=en&id=18128
  • 10. MSOCAF • Guidance Package • Analyze Code – Structure – FXCOP – Additional Rules • Submit https://caf.sharepoint.microsoftonline.com/Default.aspx
  • 11. MSOCAF – Additional Rules • SPList.Items • SPListItemCollectionGetItemByID inside loop • SPListItem.Update() inside loop • Log Exceptions in Feature Receiver and Report Back to SharePoint • SharePointMonitorScope Webpart Check https://caf.sharepoint.microsoftonline.com/Default.aspx
  • 13. SharePoint Online Dedicated Great Guidance for ANY SharePoint Development
  • 14. On Premise Sandbox • How does it work ? • Why ? • Development Setup
  • 15. 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 Sandbox Worker Proxy Process (SPUCWorkerProcessProxy.exe)
  • 16. Deployment • Solution Gallery at Site Collection • Site Collection Admin uploads and activates solution • Solutions are validated against policies • No artefacts on file system • No IIS Reset
  • 17. Custom Validators [GuidAttribute("34805697-1FC4-4b66-AF09-AB48AC0F9D97")] public class PublisherValidator : SPSolutionValidator{ [Persisted] List<string> _allowedPublishers; public override void ValidateSolution( SPSolutionValidationProperties properties){ } public override void ValidateAssembly( SPSolutionValidationProperties properties, SPSolutionFile assembly){ } }
  • 19. API Scope • Sandboxed .Net Code – Very limited subset of Microsoft.SharePoint – Scoped to current SPSite and below – No SPSecurity – No web service , external data or other network calls • Client side code – Silverlight – JavaScript
  • 20. ECMAScriptControlsand Logic Browser JSON Response ECMAScript OM Server XML Request OM Proxy Client.svc XML Request Proxy JSON Response Content Managed OM database Managed Client Managed Controls and Logic SharePoint Server
  • 21. Server .NET Managed Silverlight ECMAScript (Microsoft.Shar (Microsoft.Shar (Microsoft.Shar (SP.js) ePoint) ePoint.Client) ePoint.Client.Sil verlight) SPContext ClientContext ClientContext ClientContext SPSite Site Site Site SPWeb Web Web Web SPList List List List SPListItem ListItem ListItem ListItem SPField Field Field Field
  • 22. Full Trust Proxy • Operations in class that inherits Microsoft.SharePoint.Usercode.SPProxyOperation • Arguments in serializable class that inherits Microsoft.SharePoint.Usercode.SPProxyOperationArgs • Register full trust proxy • Recycle user code service • Consume via SPUtility.ExecuteRegisteredProxyOperation
  • 24. 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 cuts of solutions when limit hit
  • 25. Monitored Metrics Resources Per Absolute Metric Name Description Units Point Limit Process gets abnormally AbnormalProcessTerminationCount Count 1 1 terminated CPUExecutionTime CPU exception time Seconds 3,600 60 CriticalExceptionCount Critical exception fired Number 10 3 Percentage Units of PercentProcessorTime Note: # of cores not factored in Overall Processor 85 100 Consumed Number of Threads ProcessThreadCount Threads 10,000 200 in Overall Process SharePointDatabaseQueryCount SharePoint DB Queries Invoked Number 20 100 Amount of time spent waiting SharePointDatabaseQueryTime Seconds 120 60 for a query to be performed UnhandledExceptionCount Unhanded Exceptions 50 3
  • 26. Why ? • Developers can deploy updates without IIS restarts • Site Collection Owners can control loading of solutions • Complex code separated from display logic • Solution performance can be monitored and controlled Rapid changes possible with low Governance
  • 27. Development Setup • 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=sil verlight4tools;silverlight4toolkit;riaservicestoolkit
  • 28. Sandbox modes • Local Mode: – Execute code on WFE – Low administration overhead – Lower scalability • Remote Mode: – Execute on dedicated SharePoint servers – Load balanced distribution of code execution requests
  • 30. Common Pain Points • Error Handling/Visibility • Configuration Storage • Limited API set • Learning curve required
  • 31. On Premise Sandbox Promotes efficient , well designed code that allows for rapid user interface change
  • 32. SharePoint Online • Development Process • Data Access • Authentication
  • 33. spo.company.com/test spo.company.com/prod *.wsp Upload/ Activate/ Deactivate local.company.com
  • 34.
  • 35. Data Access • SharePoint data – Rest API, webservices, CSOM • JSON-P calling services http://www.wictorwilen.se/Post/SharePoint-Online-and- External-Data-using-JSONP.aspx • BCS + WCF Service + Client Object Model • Applications put or get data to/from SharePoint
  • 36.
  • 37. 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.aspx http://www.wictorwilen.se/Post/How-to-do-active- authentication-to-Office-365-and-SharePoint-Online.aspx
  • 38. SharePoint Online Sandbox Authentication and Data Access need to be carefully planned
  • 39. Summary Consider sandbox concepts as part of your solution design @laneyvb
  • 40. Gold Sponsors Silver Sponsors Bronze Sponsors Media Sponsors

Notas do Editor

  1. This must be the opening slide
  2. Comprehensive list of best practises
  3. SPMonitoredScope should be enabled for all custom methods of Web Parts except OnInit, Render, and OnPreRender.