SlideShare una empresa de Scribd logo
1 de 24
Developing Custom SharePoint 2010 Solutions without server access Phil Wicklund SharePoint FREEWARE www.PhilWicklund.com  SharePoint CONSULTING www.RBAconsulting.com
About Me… Working with SP since 2004 Started as a trainer for Mindsharp Now consulting through RBA in MN Blog: philwicklund.com Writing a 2010 book:
Agenda The Problem: how to develop custom  solutions that won’t impair the farm SharePoint Designer 2010 Sandboxed Solutions Client Object Model Questions SharePoint FREEWARE www.PhilWicklund.com  SharePoint CONSULTING www.RBAconsulting.com
SharePoint Designer 2010 Used for: Browser alternative (administrate pages, content types, web parts, etc) Branding XsltListViewWebPart Workflow External Data SharePoint FREEWARE www.PhilWicklund.com  SharePoint CONSULTING www.RBAconsulting.com
Demo 1: Workflow with SPD Model Workflow in Office Visio Import Workflow into SharePoint Designer Publish to SharePoint, and test SharePoint FREEWARE www.PhilWicklund.com  SharePoint CONSULTING www.RBAConsulting.com
Sandboxed Solutions Solutions are cab based file with wspextenion can contain web parts, features, workflows, etc. Scoped to a Site Collection Site Collection Administrators Install, Manage and Monitor the solutions SharePoint FREEWARE www.PhilWicklund.com  SharePoint CONSULTING www.RBAconsulting.com
Sandboxed Solutions Solution Gallery: SharePoint FREEWARE www.PhilWicklund.com  SharePoint CONSULTING www.RBAconsulting.com
Sandboxed Solutions Debugging Sandboxed Solutions Farm Solutions run in the w3wp.exe process Sandboxed Solutions run in the SPUCWorkerProcess.exe process Hitting F5 automatically attaches to SPUCWorkerProcess.exe, then simply drop web part on a page, for example SharePoint FREEWARE www.PhilWicklund.com  SharePoint CONSULTING www.RBAconsulting.com
Sandboxed Solutions Caveats Full API swapped out at runtime with sandboxed subset. SPSecurity.RunWithElevatedPrivledges, for example, won’t work. IntelliSense is also truncated to help prevent runtime errors since compiler compiles against full API Try to avoid cut and paste All classes below SPSite are available Partial trust prevents access to anything outside the scope of the Site Collection (Internet, Web service, file system, etc) SharePoint FREEWARE www.PhilWicklund.com  SharePoint CONSULTING www.RBAconsulting.com
Sandboxed Solutions Monitoring “Point” quotas set in Central Administration. Default is 300 points. Shows usage reports, for today and a 14 day average Points – next slide Validators Fire on upload of solution into Gallery Can enfore, only web parts, singed cod with a particular token,  log/catalog solutions, etc. SharePoint FREEWARE www.PhilWicklund.com  SharePoint CONSULTING www.RBAconsulting.com
Sandboxed Solutions Courtesy John W Powell - MSDN
Demo 2: Sandboxed Web Part New Visual Studio Project Create a Web Part Deploy as Sandboxed Solution SharePoint FREEWARE www.PhilWicklund.com  SharePoint CONSULTING www.RBAConsulting.com
Client Side Object Model Not enough web services in SP 2007 Rather than create more services, COM provides the complete API COM provides a consistent development experience: Windows Applications ASP.NET web sites Silverlight Applications JavaScript, www client side scripting SharePoint FREEWARE www.PhilWicklund.com  SharePoint CONSULTING www.RBAconsulting.com
COM Architecture SharePoint FREEWARE www.PhilWicklund.com  SharePoint CONSULTING www.RBAconsulting.com
Assembly References SharePoint, Server Side Microsoft.SharePoint (ISAPI) .NET clients Microsoft.SharePoint.Client (ISAPI) Silverlight clients Microsoft.SharePoint.Client.Silverlight (Layouts/clientbin) Javascript clients SP.js & SP.Core.js (Layouts) SharePoint FREEWARE www.PhilWicklund.com  SharePoint CONSULTING www.RBAconsulting.com
Comparable Objects SharePoint FREEWARE www.PhilWicklund.com  SharePoint CONSULTING www.RBAconsulting.com
Starter Code Using Microsoft.SharePoint.Client; ... using (ClientContext context = new ClientContext("http://intranet")) { 	Web web = context.Web; context.Load(web); context.ExecuteQuery();	 	string title = web.Title; 	// ListCollection lists = web.Lists;	 } SharePoint FREEWARE www.PhilWicklund.com  SharePoint CONSULTING www.RBAconsulting.com
Iterating through Lists in a Web using (ClientContext context = new ClientContext("http://intranet")) { 	Web web = context.Web; context.Load(web); context.Load(web.Lists); context.ExecuteQuery();	 foreach(List list in web.Lists) 	{ 		//do something 	} } SharePoint FREEWARE www.PhilWicklund.com  SharePoint CONSULTING www.RBAconsulting.com
Efficiencies… Don’t be Lazy! Web web = context.Web; context.Load(web, wprop => wprop.Title)); ListCollection lists = web.Lists; IEnumerable<List> filtered = context. LoadQuery(lists.Include(l=>l.Title)); context.ExecuteQuery();	 foreach(List list in filtered) {	} SharePoint FREEWARE www.PhilWicklund.com  SharePoint CONSULTING www.RBAconsulting.com
Working with List Items Web web = context.Web; List list = context.Web.Lists. GetByTitle(“List Title"); CamlQuery query = CamlQuery.CreateAllItemsQuery(); ListItemCollection items = lst.GetItems(query); context.Load(items); context.ExecuteQuery(); foreach (ListItem item in items) { 	string title = item["Title"]; } SharePoint FREEWARE www.PhilWicklund.com  SharePoint CONSULTING www.RBAconsulting.com
Efficencies with List Items CamlQuery query = new CamlQuery(); query.ViewXml = "<View><Query><Where><Eq> 	<FieldRef Name='Title'/><Value Type='Text'>Phil</Value> 	</Eq></Where></Query></View>"; ListItemCollection items = list.GetItems(query); context.Load(items, x => x.Include(                       item => item["ID"],                       item => item["Title"],                       item => item.DisplayName)); SharePoint FREEWARE www.PhilWicklund.com  SharePoint CONSULTING www.RBAconsulting.com
Adding new List Items List list = context.Web.Lists. GetByTitle(“List Title"); context.Load(list); ListItemnewItem = list.AddItem(new 	ListItemCreationInformation()); newItem["Title"] = "My new item"; newItem.Update(); context.ExecuteQuery(); SharePoint FREEWARE www.PhilWicklund.com  SharePoint CONSULTING www.RBAconsulting.com
Silverlight & Asynchronous Calls private void Button_Click(object sender, RoutedEventArgs e) { 	// Load a bunch of stuff clientContext.ExecuteQueryAsync(success, failure); } private void success(object sender, ClientRequestSucceededEventArgsargs) { RunQueryrunQuery= Run; this.Dispatcher.BeginInvoke(runQuery); } private delegate void RunQuery();  private void Run() {  /* do something */  } private void failure(object sender, ClientRequestFailedEventArgsargs) { /* do something */ } SharePoint FREEWARE www.PhilWicklund.com  SharePoint CONSULTING www.RBAconsulting.com
Demo 3: .NET COM Build a Console (client) Application Render all theList Titles from a remoteSharePoint site. Create a new list itemin a remote SharePointsite. SharePoint FREEWARE www.PhilWicklund.com  SharePoint CONSULTING www.RBAConsulting.com

Más contenido relacionado

La actualidad más candente

Getting The Most Out Of SP Search SPSTC
Getting The Most Out Of SP Search SPSTCGetting The Most Out Of SP Search SPSTC
Getting The Most Out Of SP Search SPSTC
John Ross
 
Intro to SharePoint Web Services
Intro to SharePoint Web ServicesIntro to SharePoint Web Services
Intro to SharePoint Web Services
Mark Rackley
 
What is SharePoint Development??
What is SharePoint Development??What is SharePoint Development??
What is SharePoint Development??
Mark Rackley
 

La actualidad más candente (20)

CSOM (Client Side Object Model). Explained @ SharePoint Saturday Houston
CSOM (Client Side Object Model). Explained @ SharePoint Saturday HoustonCSOM (Client Side Object Model). Explained @ SharePoint Saturday Houston
CSOM (Client Side Object Model). Explained @ SharePoint Saturday Houston
 
#SPSTC Maximizing the SharePoint User Experience with Free 3rd Party jQuery L...
#SPSTC Maximizing the SharePoint User Experience with Free 3rd Party jQuery L...#SPSTC Maximizing the SharePoint User Experience with Free 3rd Party jQuery L...
#SPSTC Maximizing the SharePoint User Experience with Free 3rd Party jQuery L...
 
Getting The Most Out Of SP Search SPSTC
Getting The Most Out Of SP Search SPSTCGetting The Most Out Of SP Search SPSTC
Getting The Most Out Of SP Search SPSTC
 
SPTechCon Boston 2015 - Utilizing jQuery in SharePoint
SPTechCon Boston 2015 - Utilizing jQuery in SharePointSPTechCon Boston 2015 - Utilizing jQuery in SharePoint
SPTechCon Boston 2015 - Utilizing jQuery in SharePoint
 
Intro to SharePoint Web Services
Intro to SharePoint Web ServicesIntro to SharePoint Web Services
Intro to SharePoint Web Services
 
The SharePoint & jQuery Guide
The SharePoint & jQuery GuideThe SharePoint & jQuery Guide
The SharePoint & jQuery Guide
 
Coding against the Office Graph
Coding against the Office GraphCoding against the Office Graph
Coding against the Office Graph
 
Advanced Office365 Sharepoint online Workflows
Advanced Office365 Sharepoint online WorkflowsAdvanced Office365 Sharepoint online Workflows
Advanced Office365 Sharepoint online Workflows
 
A Power User's Intro to jQuery Awesomeness in SharePoint
A Power User's Intro to jQuery Awesomeness in SharePointA Power User's Intro to jQuery Awesomeness in SharePoint
A Power User's Intro to jQuery Awesomeness in SharePoint
 
Rotating Banner in SharePoint with a DataView Webpart
Rotating Banner in SharePoint with a DataView WebpartRotating Banner in SharePoint with a DataView Webpart
Rotating Banner in SharePoint with a DataView Webpart
 
SharePoint REST vs CSOM
SharePoint REST vs CSOMSharePoint REST vs CSOM
SharePoint REST vs CSOM
 
SPTechCon Boston 2015 - Overcoming SharePoint Limitations
SPTechCon Boston 2015 - Overcoming SharePoint LimitationsSPTechCon Boston 2015 - Overcoming SharePoint Limitations
SPTechCon Boston 2015 - Overcoming SharePoint Limitations
 
Html5
Html5Html5
Html5
 
So You Want To Be A SharePoint Developer-SPS Silicon Valley 2015
So You Want To Be A SharePoint Developer-SPS Silicon Valley 2015So You Want To Be A SharePoint Developer-SPS Silicon Valley 2015
So You Want To Be A SharePoint Developer-SPS Silicon Valley 2015
 
So You Want to Be a SharePoint Developer - SPS Utah 2015
So You Want to Be a SharePoint Developer - SPS Utah 2015So You Want to Be a SharePoint Developer - SPS Utah 2015
So You Want to Be a SharePoint Developer - SPS Utah 2015
 
NOW I Get it!! What SharePoint IS and why I need it
NOW I Get it!! What SharePoint IS and why I need itNOW I Get it!! What SharePoint IS and why I need it
NOW I Get it!! What SharePoint IS and why I need it
 
What is SharePoint Development??
What is SharePoint Development??What is SharePoint Development??
What is SharePoint Development??
 
SPTechCon DevDays - SharePoint & jQuery
SPTechCon DevDays - SharePoint & jQuerySPTechCon DevDays - SharePoint & jQuery
SPTechCon DevDays - SharePoint & jQuery
 
Office 365 Connectors
Office 365 ConnectorsOffice 365 Connectors
Office 365 Connectors
 
Building a SharePoint Solution Brick By Brick
Building a SharePoint Solution Brick By Brick Building a SharePoint Solution Brick By Brick
Building a SharePoint Solution Brick By Brick
 

Destacado (11)

SPCA2013 - Building Windows Client Applications for SharePoint 2013
SPCA2013 - Building Windows Client Applications for SharePoint 2013SPCA2013 - Building Windows Client Applications for SharePoint 2013
SPCA2013 - Building Windows Client Applications for SharePoint 2013
 
Wrapping your head around the SharePoint Beast (For the rest of us)
Wrapping your head around the SharePoint Beast (For the rest of us)Wrapping your head around the SharePoint Beast (For the rest of us)
Wrapping your head around the SharePoint Beast (For the rest of us)
 
SP2010 Developer Tools
SP2010 Developer ToolsSP2010 Developer Tools
SP2010 Developer Tools
 
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
 
KapStone Production Supervisor 30 Day Business Plan
KapStone Production Supervisor 30 Day Business PlanKapStone Production Supervisor 30 Day Business Plan
KapStone Production Supervisor 30 Day Business Plan
 
Victory Packaging - Inventory Program
Victory Packaging - Inventory ProgramVictory Packaging - Inventory Program
Victory Packaging - Inventory Program
 
Ks Kraftpak
Ks KraftpakKs Kraftpak
Ks Kraftpak
 
Kapstone CIO Insights
Kapstone CIO InsightsKapstone CIO Insights
Kapstone CIO Insights
 
Signature Brands Victory Packaging Presentation
Signature Brands Victory Packaging PresentationSignature Brands Victory Packaging Presentation
Signature Brands Victory Packaging Presentation
 
KapStone-Sustainability-Report-2013
KapStone-Sustainability-Report-2013KapStone-Sustainability-Report-2013
KapStone-Sustainability-Report-2013
 
What IS SharePoint Development?
What IS SharePoint Development?What IS SharePoint Development?
What IS SharePoint Development?
 

Similar a Custom SharePoint 2010 solutions without server access

SharePoint 2010 Client-side Object Model
SharePoint 2010 Client-side Object ModelSharePoint 2010 Client-side Object Model
SharePoint 2010 Client-side Object Model
Phil Wicklund
 
Session4-Sharepoint Online-chrismayo
Session4-Sharepoint Online-chrismayoSession4-Sharepoint Online-chrismayo
Session4-Sharepoint Online-chrismayo
Mithun T. Dhar
 
Bringing Zest to SharePoint Sites Using Out-of-the-Box Technology
Bringing Zest to SharePoint Sites Using Out-of-the-Box TechnologyBringing Zest to SharePoint Sites Using Out-of-the-Box Technology
Bringing Zest to SharePoint Sites Using Out-of-the-Box Technology
joelsef
 
SharePoint 2010 Application Development Overview
SharePoint 2010 Application Development OverviewSharePoint 2010 Application Development Overview
SharePoint 2010 Application Development Overview
Rob Windsor
 
Wss Object Model
Wss Object ModelWss Object Model
Wss Object Model
maddinapudi
 
Developing and Deploying Custom Branding Solutions in SharePoint 2010
Developing and Deploying Custom Branding Solutions in SharePoint 2010Developing and Deploying Custom Branding Solutions in SharePoint 2010
Developing and Deploying Custom Branding Solutions in SharePoint 2010
jhendrix88
 
Whats New In Share Point Designer 2010 Ayman El Hattab Cairo Code Camp
Whats New In Share Point Designer 2010    Ayman El Hattab   Cairo Code CampWhats New In Share Point Designer 2010    Ayman El Hattab   Cairo Code Camp
Whats New In Share Point Designer 2010 Ayman El Hattab Cairo Code Camp
Ayman El-Hattab
 

Similar a Custom SharePoint 2010 solutions without server access (20)

SharePoint 2010 Client-side Object Model
SharePoint 2010 Client-side Object ModelSharePoint 2010 Client-side Object Model
SharePoint 2010 Client-side Object Model
 
Branding SharePoint 2013
Branding SharePoint 2013Branding SharePoint 2013
Branding SharePoint 2013
 
The SharePoint and jQuery Guide by Mark Rackley - SPTechCon
The SharePoint and jQuery Guide by Mark Rackley - SPTechConThe SharePoint and jQuery Guide by Mark Rackley - SPTechCon
The SharePoint and jQuery Guide by Mark Rackley - SPTechCon
 
Session4-Sharepoint Online-chrismayo
Session4-Sharepoint Online-chrismayoSession4-Sharepoint Online-chrismayo
Session4-Sharepoint Online-chrismayo
 
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With DeadlinesJBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
 
SharePoint Developer Education Day Palo Alto
SharePoint  Developer Education Day  Palo  AltoSharePoint  Developer Education Day  Palo  Alto
SharePoint Developer Education Day Palo Alto
 
Bringing Zest to SharePoint Sites Using Out-of-the-Box Technology
Bringing Zest to SharePoint Sites Using Out-of-the-Box TechnologyBringing Zest to SharePoint Sites Using Out-of-the-Box Technology
Bringing Zest to SharePoint Sites Using Out-of-the-Box Technology
 
SharePoint 2010 Application Development Overview
SharePoint 2010 Application Development OverviewSharePoint 2010 Application Development Overview
SharePoint 2010 Application Development Overview
 
Leverage Search and Customize to your Brand within SharePoint 2010
Leverage Search and Customize to your Brand within SharePoint 2010Leverage Search and Customize to your Brand within SharePoint 2010
Leverage Search and Customize to your Brand within SharePoint 2010
 
Sharepoint Online
Sharepoint OnlineSharepoint Online
Sharepoint Online
 
2014 SharePoint Saturday Melbourne Apps or not to Apps
2014 SharePoint Saturday Melbourne Apps or not to Apps2014 SharePoint Saturday Melbourne Apps or not to Apps
2014 SharePoint Saturday Melbourne Apps or not to Apps
 
Wss Object Model
Wss Object ModelWss Object Model
Wss Object Model
 
Developing and Deploying Custom Branding Solutions in SharePoint 2010
Developing and Deploying Custom Branding Solutions in SharePoint 2010Developing and Deploying Custom Branding Solutions in SharePoint 2010
Developing and Deploying Custom Branding Solutions in SharePoint 2010
 
Exam 70-488 Developing Microsoft SharePoint Server 2013 Core Solutions Learni...
Exam 70-488 Developing Microsoft SharePoint Server 2013 Core Solutions Learni...Exam 70-488 Developing Microsoft SharePoint Server 2013 Core Solutions Learni...
Exam 70-488 Developing Microsoft SharePoint Server 2013 Core Solutions Learni...
 
SharePoint 2010 Developer 101
SharePoint 2010 Developer 101SharePoint 2010 Developer 101
SharePoint 2010 Developer 101
 
Sharepoint designer workflow by quontra us
Sharepoint designer workflow by quontra usSharepoint designer workflow by quontra us
Sharepoint designer workflow by quontra us
 
2013 - Back to the Future with Client/Server Development
2013 - Back to the Future with Client/Server Development 2013 - Back to the Future with Client/Server Development
2013 - Back to the Future with Client/Server Development
 
Whats New In Share Point Designer 2010 Ayman El Hattab Cairo Code Camp
Whats New In Share Point Designer 2010    Ayman El Hattab   Cairo Code CampWhats New In Share Point Designer 2010    Ayman El Hattab   Cairo Code Camp
Whats New In Share Point Designer 2010 Ayman El Hattab Cairo Code Camp
 
Designing SharePoint 2010 for Business
Designing SharePoint 2010 for BusinessDesigning SharePoint 2010 for Business
Designing SharePoint 2010 for Business
 
No-code developer options in Office 365 and SharePoint 2013
No-code developer options in Office 365 and SharePoint 2013No-code developer options in Office 365 and SharePoint 2013
No-code developer options in Office 365 and SharePoint 2013
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 

Custom SharePoint 2010 solutions without server access

  • 1. Developing Custom SharePoint 2010 Solutions without server access Phil Wicklund SharePoint FREEWARE www.PhilWicklund.com SharePoint CONSULTING www.RBAconsulting.com
  • 2. About Me… Working with SP since 2004 Started as a trainer for Mindsharp Now consulting through RBA in MN Blog: philwicklund.com Writing a 2010 book:
  • 3. Agenda The Problem: how to develop custom solutions that won’t impair the farm SharePoint Designer 2010 Sandboxed Solutions Client Object Model Questions SharePoint FREEWARE www.PhilWicklund.com SharePoint CONSULTING www.RBAconsulting.com
  • 4. SharePoint Designer 2010 Used for: Browser alternative (administrate pages, content types, web parts, etc) Branding XsltListViewWebPart Workflow External Data SharePoint FREEWARE www.PhilWicklund.com SharePoint CONSULTING www.RBAconsulting.com
  • 5. Demo 1: Workflow with SPD Model Workflow in Office Visio Import Workflow into SharePoint Designer Publish to SharePoint, and test SharePoint FREEWARE www.PhilWicklund.com SharePoint CONSULTING www.RBAConsulting.com
  • 6. Sandboxed Solutions Solutions are cab based file with wspextenion can contain web parts, features, workflows, etc. Scoped to a Site Collection Site Collection Administrators Install, Manage and Monitor the solutions SharePoint FREEWARE www.PhilWicklund.com SharePoint CONSULTING www.RBAconsulting.com
  • 7. Sandboxed Solutions Solution Gallery: SharePoint FREEWARE www.PhilWicklund.com SharePoint CONSULTING www.RBAconsulting.com
  • 8. Sandboxed Solutions Debugging Sandboxed Solutions Farm Solutions run in the w3wp.exe process Sandboxed Solutions run in the SPUCWorkerProcess.exe process Hitting F5 automatically attaches to SPUCWorkerProcess.exe, then simply drop web part on a page, for example SharePoint FREEWARE www.PhilWicklund.com SharePoint CONSULTING www.RBAconsulting.com
  • 9. Sandboxed Solutions Caveats Full API swapped out at runtime with sandboxed subset. SPSecurity.RunWithElevatedPrivledges, for example, won’t work. IntelliSense is also truncated to help prevent runtime errors since compiler compiles against full API Try to avoid cut and paste All classes below SPSite are available Partial trust prevents access to anything outside the scope of the Site Collection (Internet, Web service, file system, etc) SharePoint FREEWARE www.PhilWicklund.com SharePoint CONSULTING www.RBAconsulting.com
  • 10. Sandboxed Solutions Monitoring “Point” quotas set in Central Administration. Default is 300 points. Shows usage reports, for today and a 14 day average Points – next slide Validators Fire on upload of solution into Gallery Can enfore, only web parts, singed cod with a particular token, log/catalog solutions, etc. SharePoint FREEWARE www.PhilWicklund.com SharePoint CONSULTING www.RBAconsulting.com
  • 11. Sandboxed Solutions Courtesy John W Powell - MSDN
  • 12. Demo 2: Sandboxed Web Part New Visual Studio Project Create a Web Part Deploy as Sandboxed Solution SharePoint FREEWARE www.PhilWicklund.com SharePoint CONSULTING www.RBAConsulting.com
  • 13. Client Side Object Model Not enough web services in SP 2007 Rather than create more services, COM provides the complete API COM provides a consistent development experience: Windows Applications ASP.NET web sites Silverlight Applications JavaScript, www client side scripting SharePoint FREEWARE www.PhilWicklund.com SharePoint CONSULTING www.RBAconsulting.com
  • 14. COM Architecture SharePoint FREEWARE www.PhilWicklund.com SharePoint CONSULTING www.RBAconsulting.com
  • 15. Assembly References SharePoint, Server Side Microsoft.SharePoint (ISAPI) .NET clients Microsoft.SharePoint.Client (ISAPI) Silverlight clients Microsoft.SharePoint.Client.Silverlight (Layouts/clientbin) Javascript clients SP.js & SP.Core.js (Layouts) SharePoint FREEWARE www.PhilWicklund.com SharePoint CONSULTING www.RBAconsulting.com
  • 16. Comparable Objects SharePoint FREEWARE www.PhilWicklund.com SharePoint CONSULTING www.RBAconsulting.com
  • 17. Starter Code Using Microsoft.SharePoint.Client; ... using (ClientContext context = new ClientContext("http://intranet")) { Web web = context.Web; context.Load(web); context.ExecuteQuery(); string title = web.Title; // ListCollection lists = web.Lists; } SharePoint FREEWARE www.PhilWicklund.com SharePoint CONSULTING www.RBAconsulting.com
  • 18. Iterating through Lists in a Web using (ClientContext context = new ClientContext("http://intranet")) { Web web = context.Web; context.Load(web); context.Load(web.Lists); context.ExecuteQuery(); foreach(List list in web.Lists) { //do something } } SharePoint FREEWARE www.PhilWicklund.com SharePoint CONSULTING www.RBAconsulting.com
  • 19. Efficiencies… Don’t be Lazy! Web web = context.Web; context.Load(web, wprop => wprop.Title)); ListCollection lists = web.Lists; IEnumerable<List> filtered = context. LoadQuery(lists.Include(l=>l.Title)); context.ExecuteQuery(); foreach(List list in filtered) { } SharePoint FREEWARE www.PhilWicklund.com SharePoint CONSULTING www.RBAconsulting.com
  • 20. Working with List Items Web web = context.Web; List list = context.Web.Lists. GetByTitle(“List Title"); CamlQuery query = CamlQuery.CreateAllItemsQuery(); ListItemCollection items = lst.GetItems(query); context.Load(items); context.ExecuteQuery(); foreach (ListItem item in items) { string title = item["Title"]; } SharePoint FREEWARE www.PhilWicklund.com SharePoint CONSULTING www.RBAconsulting.com
  • 21. Efficencies with List Items CamlQuery query = new CamlQuery(); query.ViewXml = "<View><Query><Where><Eq> <FieldRef Name='Title'/><Value Type='Text'>Phil</Value> </Eq></Where></Query></View>"; ListItemCollection items = list.GetItems(query); context.Load(items, x => x.Include( item => item["ID"], item => item["Title"], item => item.DisplayName)); SharePoint FREEWARE www.PhilWicklund.com SharePoint CONSULTING www.RBAconsulting.com
  • 22. Adding new List Items List list = context.Web.Lists. GetByTitle(“List Title"); context.Load(list); ListItemnewItem = list.AddItem(new ListItemCreationInformation()); newItem["Title"] = "My new item"; newItem.Update(); context.ExecuteQuery(); SharePoint FREEWARE www.PhilWicklund.com SharePoint CONSULTING www.RBAconsulting.com
  • 23. Silverlight & Asynchronous Calls private void Button_Click(object sender, RoutedEventArgs e) { // Load a bunch of stuff clientContext.ExecuteQueryAsync(success, failure); } private void success(object sender, ClientRequestSucceededEventArgsargs) { RunQueryrunQuery= Run; this.Dispatcher.BeginInvoke(runQuery); } private delegate void RunQuery(); private void Run() { /* do something */ } private void failure(object sender, ClientRequestFailedEventArgsargs) { /* do something */ } SharePoint FREEWARE www.PhilWicklund.com SharePoint CONSULTING www.RBAconsulting.com
  • 24. Demo 3: .NET COM Build a Console (client) Application Render all theList Titles from a remoteSharePoint site. Create a new list itemin a remote SharePointsite. SharePoint FREEWARE www.PhilWicklund.com SharePoint CONSULTING www.RBAConsulting.com
  • 25. Questions & Comments Phil Wicklund SharePoint FREEWARE www.PhilWicklund.com SharePoint CONSULTING www.RBAConsulting.com