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
 
SilverlightCh01
SilverlightCh01SilverlightCh01
SilverlightCh01
 
Silverlight Chapter 01 - Introduction
Silverlight Chapter 01 - IntroductionSilverlight Chapter 01 - Introduction
Silverlight Chapter 01 - Introduction
 
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

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 

Recently uploaded (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 

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