SlideShare a Scribd company logo
1 of 21
SharePoint Web Parts 101Silicon Valley Code Camp 2009October 3, 2009 Joseph Ackerman, Senior ConsultantMicrosoft Consulting Services, GICS, Dell Inc.joseph_ackerman@dell.comSpecial thanks to Shawn Parker for his assistance with this presentation
The Ever-Popular Intro Slide Joseph Ackerman (joseph_ackerman@dell.com) 20 + years of software development for clients of all sizes and shapes Wells Fargo Hewlett-Packard Aetna Visa Stanford University Currently consulting as part of Dell’s Microsoft Consulting Services Formerly Allin, Microsoft’s Northwest Region Partner of the Year 2008 Most recent project: internal systems for eBay
Agenda Why are we talking about this? User Controls, Server Controls and Web Parts The Steps Deployment Choices The Future Resources DELL CONFIDENTIAL 3
Why are we talking about this? SharePoint adoption has exploded over the last couple of years Programmers and Software developers are often presented with the “opportunity” to work with SharePoint because someone in the business (frequently a non-technical person) has made that decision for them  If you work in an IT environment that runs on Windows Servers, the chances are pretty good that someone in your organization is already running SharePoint Bottom Line: it’s probably out there already whether you like it or not – but we all like to work, especially in today’s economic climate, right? DELL CONFIDENTIAL 4
User Controls Made up of HTML/ASP page fragments Maybe some code behind Great for breaking up functionality within an application Not very portable, hard to re-use DELL CONFIDENTIAL 5
Server Controls Harder to write UI elements must be built in code Easier to use across multiple applications DELL CONFIDENTIAL 6
Web Parts Similar to Server Controls Different inheritance tree Some additional requirements for development, deployment and use DELL CONFIDENTIAL 7
Types of Web Parts ASP.Net  Web Parts This is what we will build in our demo today Can be used on ASP.Net and SharePoint pages We’re going to do it from scratch, even though there are some helpful add-on tools SharePoint Web Parts Used in SP 2003; for 2007, DON’T. Data Web Parts Built in; use XSLT to display a data source User Controls wrapped in SmartPart (see CodePlex) Just a wrapper that allows UserControls to behave like web parts Not very secure, Poor performance DELL CONFIDENTIAL 8
The Steps Create a new project (C# windows class library) Sign the assembly References (System.web and Microsoft.SharePoint) Update assemblyinfo.cs (for anonymous users) Update web.config with Safecontrol Update/Create the web part classes Update/Create “.webpart” files Build and Deploy DELL CONFIDENTIAL 9
1. Create a new project C# Class Library project I love VB too, but do yourself a favor and use C# instead – SharePoint is not CLS compliant DELL CONFIDENTIAL 10
2. Sign the Assembly It’s all about trust Allows you to create a strong name for your assembly DELL CONFIDENTIAL 11
3. Set Your References System.Web Microsoft.SharePoint DELL CONFIDENTIAL 12
4. Update assemblyinfo.cs Add a reference to System.Security Allow anonymous users by adding an attribute containing AllowPartiallyTrustedCallers() It’s good practice to put your Public Key Token in here as a comment DELL CONFIDENTIAL 13
5. Update web.config Add your assembly to the SafeControls list Use the full, four-part name DLL name (without extension) Version number Culture Namespace Add the TypeName  For only one class, use the name For all classes in the namespace, use * Safe should equal “true” DELL CONFIDENTIAL 14
6. Create your web part classes Your functionality goes here Pick your output method CreateChildControls() Add controls to the web part control collection Render() Add HTML to the HTMLTextWriter object parameter  DELL CONFIDENTIAL 15
7.  Create your .webpart (xml) file Only if you are deploying to the bin folder of your site If you are deploying to the GAC, this is not necessary Where can you find an example of the format? In the web part gallery DELL CONFIDENTIAL 16
8. Build and Deploy If you are copying your .dll to the GAC, don’t forget to run IISRESET /Restart on your web server If you are deploying directly to your web site, make sure that you DLL is in the /bin folder and the .webpart file is in the /wpcatalog folder  Both are just off the root of your web site DELL CONFIDENTIAL 17
Best Practices Runtime performance is more important than quick-n-easy development Learn to write real web parts, don’t depend on the SmartPart wrapper Common “Base” web part SharePoint object disposal Single-purpose parts and logic Consistent deployment model DELL CONFIDENTIAL 18
Resources Web Parts Resource Center http://msdn.microsoft.com/en-us/sharepoint/bb851483.aspx Instructional Video, Module 2: web parts http://www.microsoft.com/winme/0901/34867/mod2/index.html DELL CONFIDENTIAL 19
Questions? DELL CONFIDENTIAL 20
www.dell.com

More Related Content

What's hot

Developing Office Add-Ins
Developing Office Add-InsDeveloping Office Add-Ins
Developing Office Add-InsPeter Plessers
 
Apache Flex: Overview
Apache Flex: OverviewApache Flex: Overview
Apache Flex: OverviewTarun Telang
 
Building Composite Application for Lotus Notes 8
Building Composite Application for Lotus Notes 8Building Composite Application for Lotus Notes 8
Building Composite Application for Lotus Notes 8dominion
 
Oracle APEX plugins - AUSOUG Connect 2016
Oracle APEX plugins - AUSOUG Connect 2016Oracle APEX plugins - AUSOUG Connect 2016
Oracle APEX plugins - AUSOUG Connect 2016Lino Schildenfeld
 
All about apple mail to outlook 2011 migration
All about apple mail to outlook 2011 migrationAll about apple mail to outlook 2011 migration
All about apple mail to outlook 2011 migrationCauvery Varma
 
Do's and don'ts for Office 365 development
Do's and don'ts for Office 365 developmentDo's and don'ts for Office 365 development
Do's and don'ts for Office 365 developmentChris O'Brien
 
Flex vs. HTML5 for RIAS
Flex vs. HTML5 for RIASFlex vs. HTML5 for RIAS
Flex vs. HTML5 for RIASPamela Fox
 
SharePoint 2010 - InfoPath, Workflow
SharePoint 2010 - InfoPath, WorkflowSharePoint 2010 - InfoPath, Workflow
SharePoint 2010 - InfoPath, WorkflowJonathon Schultz
 
Best Practices Configuring And Developing Share Point Solutions
Best Practices Configuring And Developing Share Point SolutionsBest Practices Configuring And Developing Share Point Solutions
Best Practices Configuring And Developing Share Point SolutionsAlexander Meijers
 
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem. SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem. Kushan Lahiru Perera
 
APEX 5.1 features - AUSOUG Connect 2016
APEX 5.1 features - AUSOUG Connect 2016APEX 5.1 features - AUSOUG Connect 2016
APEX 5.1 features - AUSOUG Connect 2016Lino Schildenfeld
 
Building configurable applications for the web
Building configurable applications for the webBuilding configurable applications for the web
Building configurable applications for the websupertom
 
Upcoming new features of selenium in automation testing
Upcoming new features of selenium in automation testingUpcoming new features of selenium in automation testing
Upcoming new features of selenium in automation testingsoftware testingchennai
 
Open Source examples from Adobe : Oscon kiosk
Open Source examples from Adobe : Oscon kioskOpen Source examples from Adobe : Oscon kiosk
Open Source examples from Adobe : Oscon kioskDave McAllister
 
Creating a Data Driven UI Framework
Creating a Data Driven UI FrameworkCreating a Data Driven UI Framework
Creating a Data Driven UI FrameworkAnkur Bansal
 
Team Foundation Server - Source Control
Team Foundation Server - Source ControlTeam Foundation Server - Source Control
Team Foundation Server - Source ControlDhirendra Singh
 
Office Add-ins developer community call-January 2020
Office Add-ins developer community call-January 2020Office Add-ins developer community call-January 2020
Office Add-ins developer community call-January 2020Microsoft 365 Developer
 

What's hot (20)

Developing Office Add-Ins
Developing Office Add-InsDeveloping Office Add-Ins
Developing Office Add-Ins
 
Office Add-in development
Office Add-in developmentOffice Add-in development
Office Add-in development
 
Apache Flex: Overview
Apache Flex: OverviewApache Flex: Overview
Apache Flex: Overview
 
Building Composite Application for Lotus Notes 8
Building Composite Application for Lotus Notes 8Building Composite Application for Lotus Notes 8
Building Composite Application for Lotus Notes 8
 
Oracle APEX plugins - AUSOUG Connect 2016
Oracle APEX plugins - AUSOUG Connect 2016Oracle APEX plugins - AUSOUG Connect 2016
Oracle APEX plugins - AUSOUG Connect 2016
 
All about apple mail to outlook 2011 migration
All about apple mail to outlook 2011 migrationAll about apple mail to outlook 2011 migration
All about apple mail to outlook 2011 migration
 
Integrating Office Web Apps with SharePoint 2013
Integrating Office Web Apps with SharePoint 2013Integrating Office Web Apps with SharePoint 2013
Integrating Office Web Apps with SharePoint 2013
 
Do's and don'ts for Office 365 development
Do's and don'ts for Office 365 developmentDo's and don'ts for Office 365 development
Do's and don'ts for Office 365 development
 
Flex vs. HTML5 for RIAS
Flex vs. HTML5 for RIASFlex vs. HTML5 for RIAS
Flex vs. HTML5 for RIAS
 
SharePoint 2010 - InfoPath, Workflow
SharePoint 2010 - InfoPath, WorkflowSharePoint 2010 - InfoPath, Workflow
SharePoint 2010 - InfoPath, Workflow
 
Best Practices Configuring And Developing Share Point Solutions
Best Practices Configuring And Developing Share Point SolutionsBest Practices Configuring And Developing Share Point Solutions
Best Practices Configuring And Developing Share Point Solutions
 
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem. SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
 
OnTime Partner Webinar September 2011
OnTime Partner Webinar September 2011OnTime Partner Webinar September 2011
OnTime Partner Webinar September 2011
 
APEX 5.1 features - AUSOUG Connect 2016
APEX 5.1 features - AUSOUG Connect 2016APEX 5.1 features - AUSOUG Connect 2016
APEX 5.1 features - AUSOUG Connect 2016
 
Building configurable applications for the web
Building configurable applications for the webBuilding configurable applications for the web
Building configurable applications for the web
 
Upcoming new features of selenium in automation testing
Upcoming new features of selenium in automation testingUpcoming new features of selenium in automation testing
Upcoming new features of selenium in automation testing
 
Open Source examples from Adobe : Oscon kiosk
Open Source examples from Adobe : Oscon kioskOpen Source examples from Adobe : Oscon kiosk
Open Source examples from Adobe : Oscon kiosk
 
Creating a Data Driven UI Framework
Creating a Data Driven UI FrameworkCreating a Data Driven UI Framework
Creating a Data Driven UI Framework
 
Team Foundation Server - Source Control
Team Foundation Server - Source ControlTeam Foundation Server - Source Control
Team Foundation Server - Source Control
 
Office Add-ins developer community call-January 2020
Office Add-ins developer community call-January 2020Office Add-ins developer community call-January 2020
Office Add-ins developer community call-January 2020
 

Similar to Share Point Web Parts 101

Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5Jeff Blankenburg
 
Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5Clint Edmonson
 
San Diego ASP.NET Meeting Oct 21st
San  Diego  ASP.NET Meeting Oct 21stSan  Diego  ASP.NET Meeting Oct 21st
San Diego ASP.NET Meeting Oct 21stWoody Pewitt
 
Oracle Web ADI Implementation Steps
Oracle Web ADI Implementation StepsOracle Web ADI Implementation Steps
Oracle Web ADI Implementation Stepsstandale
 
visual basic 2005 programmer certification
visual basic 2005 programmer certificationvisual basic 2005 programmer certification
visual basic 2005 programmer certificationVskills
 
2005 - .NET SummerCamp: Web developmentwith IIS & ASP.NET webservices
2005 - .NET SummerCamp: Web developmentwith IIS & ASP.NET webservices2005 - .NET SummerCamp: Web developmentwith IIS & ASP.NET webservices
2005 - .NET SummerCamp: Web developmentwith IIS & ASP.NET webservicesDaniel Fisher
 
MSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF DemystifiedMSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF DemystifiedDave Bost
 
Microsoft .NET 6 -What's All About The New Update
Microsoft .NET 6 -What's All About The New UpdateMicrosoft .NET 6 -What's All About The New Update
Microsoft .NET 6 -What's All About The New UpdateAdam John
 
Deploying Code In SharePoint
Deploying Code In SharePointDeploying Code In SharePoint
Deploying Code In SharePointCorey Roth
 
Mix Tech Ed Update No Video
Mix Tech Ed Update No VideoMix Tech Ed Update No Video
Mix Tech Ed Update No VideoAllyWick
 
Idol server 11.0.0_release_notes_en
Idol server 11.0.0_release_notes_enIdol server 11.0.0_release_notes_en
Idol server 11.0.0_release_notes_enAndrey Karpov
 
Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2Daniel Egan
 
Silverlight Chapter 01 - Introduction
Silverlight Chapter 01 - IntroductionSilverlight Chapter 01 - Introduction
Silverlight Chapter 01 - IntroductionBill Hatfield
 
Keeping Current with ColdFusion - Adobe Max 2011
Keeping Current with ColdFusion - Adobe Max 2011Keeping Current with ColdFusion - Adobe Max 2011
Keeping Current with ColdFusion - Adobe Max 2011Rupesh Kumar
 
AIR - Framework ( Cairngorm and Parsley )
AIR - Framework ( Cairngorm and Parsley )AIR - Framework ( Cairngorm and Parsley )
AIR - Framework ( Cairngorm and Parsley )senthil0809
 
ILUG 2007 - Notes and Office Integration
ILUG 2007 - Notes and Office IntegrationILUG 2007 - Notes and Office Integration
ILUG 2007 - Notes and Office IntegrationJohn Head
 
Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6Ido Flatow
 

Similar to Share Point Web Parts 101 (20)

Visual Studio 2012 introduction
Visual Studio  2012 introductionVisual Studio  2012 introduction
Visual Studio 2012 introduction
 
Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5
 
Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5Migrating To Visual Studio 2008 & .Net Framework 3.5
Migrating To Visual Studio 2008 & .Net Framework 3.5
 
Asp.net Web Development.pdf
Asp.net Web Development.pdfAsp.net Web Development.pdf
Asp.net Web Development.pdf
 
San Diego ASP.NET Meeting Oct 21st
San  Diego  ASP.NET Meeting Oct 21stSan  Diego  ASP.NET Meeting Oct 21st
San Diego ASP.NET Meeting Oct 21st
 
Oracle Web ADI Implementation Steps
Oracle Web ADI Implementation StepsOracle Web ADI Implementation Steps
Oracle Web ADI Implementation Steps
 
visual basic 2005 programmer certification
visual basic 2005 programmer certificationvisual basic 2005 programmer certification
visual basic 2005 programmer certification
 
2005 - .NET SummerCamp: Web developmentwith IIS & ASP.NET webservices
2005 - .NET SummerCamp: Web developmentwith IIS & ASP.NET webservices2005 - .NET SummerCamp: Web developmentwith IIS & ASP.NET webservices
2005 - .NET SummerCamp: Web developmentwith IIS & ASP.NET webservices
 
MSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF DemystifiedMSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF Demystified
 
Microsoft .NET 6 -What's All About The New Update
Microsoft .NET 6 -What's All About The New UpdateMicrosoft .NET 6 -What's All About The New Update
Microsoft .NET 6 -What's All About The New Update
 
Deploying Code In SharePoint
Deploying Code In SharePointDeploying Code In SharePoint
Deploying Code In SharePoint
 
Mix Tech Ed Update No Video
Mix Tech Ed Update No VideoMix Tech Ed Update No Video
Mix Tech Ed Update No Video
 
Idol server 11.0.0_release_notes_en
Idol server 11.0.0_release_notes_enIdol server 11.0.0_release_notes_en
Idol server 11.0.0_release_notes_en
 
Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2
 
Silverlight Chapter 01 - Introduction
Silverlight Chapter 01 - IntroductionSilverlight Chapter 01 - Introduction
Silverlight Chapter 01 - Introduction
 
SilverlightCh01
SilverlightCh01SilverlightCh01
SilverlightCh01
 
Keeping Current with ColdFusion - Adobe Max 2011
Keeping Current with ColdFusion - Adobe Max 2011Keeping Current with ColdFusion - Adobe Max 2011
Keeping Current with ColdFusion - Adobe Max 2011
 
AIR - Framework ( Cairngorm and Parsley )
AIR - Framework ( Cairngorm and Parsley )AIR - Framework ( Cairngorm and Parsley )
AIR - Framework ( Cairngorm and Parsley )
 
ILUG 2007 - Notes and Office Integration
ILUG 2007 - Notes and Office IntegrationILUG 2007 - Notes and Office Integration
ILUG 2007 - Notes and Office Integration
 
Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6
 

Recently uploaded

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
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 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
 
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 businesspanagenda
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
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 DiscoveryTrustArc
 
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
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
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 DevelopmentsTrustArc
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
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
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
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 Scriptwesley chun
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
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
 

Recently uploaded (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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 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
 
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
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
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
 
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...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
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
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
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)
 

Share Point Web Parts 101

  • 1. SharePoint Web Parts 101Silicon Valley Code Camp 2009October 3, 2009 Joseph Ackerman, Senior ConsultantMicrosoft Consulting Services, GICS, Dell Inc.joseph_ackerman@dell.comSpecial thanks to Shawn Parker for his assistance with this presentation
  • 2. The Ever-Popular Intro Slide Joseph Ackerman (joseph_ackerman@dell.com) 20 + years of software development for clients of all sizes and shapes Wells Fargo Hewlett-Packard Aetna Visa Stanford University Currently consulting as part of Dell’s Microsoft Consulting Services Formerly Allin, Microsoft’s Northwest Region Partner of the Year 2008 Most recent project: internal systems for eBay
  • 3. Agenda Why are we talking about this? User Controls, Server Controls and Web Parts The Steps Deployment Choices The Future Resources DELL CONFIDENTIAL 3
  • 4. Why are we talking about this? SharePoint adoption has exploded over the last couple of years Programmers and Software developers are often presented with the “opportunity” to work with SharePoint because someone in the business (frequently a non-technical person) has made that decision for them If you work in an IT environment that runs on Windows Servers, the chances are pretty good that someone in your organization is already running SharePoint Bottom Line: it’s probably out there already whether you like it or not – but we all like to work, especially in today’s economic climate, right? DELL CONFIDENTIAL 4
  • 5. User Controls Made up of HTML/ASP page fragments Maybe some code behind Great for breaking up functionality within an application Not very portable, hard to re-use DELL CONFIDENTIAL 5
  • 6. Server Controls Harder to write UI elements must be built in code Easier to use across multiple applications DELL CONFIDENTIAL 6
  • 7. Web Parts Similar to Server Controls Different inheritance tree Some additional requirements for development, deployment and use DELL CONFIDENTIAL 7
  • 8. Types of Web Parts ASP.Net Web Parts This is what we will build in our demo today Can be used on ASP.Net and SharePoint pages We’re going to do it from scratch, even though there are some helpful add-on tools SharePoint Web Parts Used in SP 2003; for 2007, DON’T. Data Web Parts Built in; use XSLT to display a data source User Controls wrapped in SmartPart (see CodePlex) Just a wrapper that allows UserControls to behave like web parts Not very secure, Poor performance DELL CONFIDENTIAL 8
  • 9. The Steps Create a new project (C# windows class library) Sign the assembly References (System.web and Microsoft.SharePoint) Update assemblyinfo.cs (for anonymous users) Update web.config with Safecontrol Update/Create the web part classes Update/Create “.webpart” files Build and Deploy DELL CONFIDENTIAL 9
  • 10. 1. Create a new project C# Class Library project I love VB too, but do yourself a favor and use C# instead – SharePoint is not CLS compliant DELL CONFIDENTIAL 10
  • 11. 2. Sign the Assembly It’s all about trust Allows you to create a strong name for your assembly DELL CONFIDENTIAL 11
  • 12. 3. Set Your References System.Web Microsoft.SharePoint DELL CONFIDENTIAL 12
  • 13. 4. Update assemblyinfo.cs Add a reference to System.Security Allow anonymous users by adding an attribute containing AllowPartiallyTrustedCallers() It’s good practice to put your Public Key Token in here as a comment DELL CONFIDENTIAL 13
  • 14. 5. Update web.config Add your assembly to the SafeControls list Use the full, four-part name DLL name (without extension) Version number Culture Namespace Add the TypeName For only one class, use the name For all classes in the namespace, use * Safe should equal “true” DELL CONFIDENTIAL 14
  • 15. 6. Create your web part classes Your functionality goes here Pick your output method CreateChildControls() Add controls to the web part control collection Render() Add HTML to the HTMLTextWriter object parameter DELL CONFIDENTIAL 15
  • 16. 7. Create your .webpart (xml) file Only if you are deploying to the bin folder of your site If you are deploying to the GAC, this is not necessary Where can you find an example of the format? In the web part gallery DELL CONFIDENTIAL 16
  • 17. 8. Build and Deploy If you are copying your .dll to the GAC, don’t forget to run IISRESET /Restart on your web server If you are deploying directly to your web site, make sure that you DLL is in the /bin folder and the .webpart file is in the /wpcatalog folder Both are just off the root of your web site DELL CONFIDENTIAL 17
  • 18. Best Practices Runtime performance is more important than quick-n-easy development Learn to write real web parts, don’t depend on the SmartPart wrapper Common “Base” web part SharePoint object disposal Single-purpose parts and logic Consistent deployment model DELL CONFIDENTIAL 18
  • 19. Resources Web Parts Resource Center http://msdn.microsoft.com/en-us/sharepoint/bb851483.aspx Instructional Video, Module 2: web parts http://www.microsoft.com/winme/0901/34867/mod2/index.html DELL CONFIDENTIAL 19