SlideShare une entreprise Scribd logo
1  sur  49
Just Freakin’ Work!Avoiding Common Hurdles in SharePoint Development Geoff Varosky (GraceHunt) Mark Rackley (Juniper Strategy) Welcome to SharePoint Saturday—The Conference
Welcome to SharePoint Saturday—The Conference Thank you for being a part of the first SharePoint Saturday conference Please turn off all electronic devices or set them to vibrate. If you must take a phone call, please do so in the hall so as not to disturb others. Open wireless access is available at SSID:  SPSTC2011 Feel free to “tweet and blog” during the session Thanks to our Diamond and Platinum Sponsors:
About the speakers… The Hillbilly Mr. Ackley Catcher of all things that flow downhill Solutions Architect for Juniper Strategy, LLC. www.juniper-strategy.com Speaker, Blogger, (soon to be) Author Blog: www.sharepointhillbilly.com Twitter: @mrackley E-mail: mrackley@gmail.com
About the speakers… The Yankee Geoff Varosky Director, Development and Evangelism GraceHunt www.gracehunt.com Speaker, Blogger, (soon to be) Author Blog: www.sharepointyankee.com Twitter: @gvaro E-mail: gvarosky@gracehunt.com
You might be a SharePoint Developer if…
Agenda Introduction Development Deployment Resources Q&A
Introduction Types of Development Development Tools Development Environment Developing to Deploy
Introduction Types of Development Unmanaged Code Managed Code Customization
Introduction Development Tools STSDEV (2007) stsdev.codeplex.com WSPBuilder (2007 & 2010) wspbuilder.codeplex.com CKS:DEV (2010) cksdev.codeplex.com SharePoint Designer Developer Dashboard (2010)
Introduction Development Environment Physical? Virtual? Desktop? Dusty old PC under the desk?
Introduction 2007 or 2010 64-bit (leaves room for upgrade) >= 4G of RAM Choice of Virtual Host HyperV, VMWare, VirtualBox Not much in the way of VirtualPC support Create a base virtual image SQL, Base SP install, Service Packs, Dev Tools Visual Studio, SPD, etc.
Introduction Development Environment Follow the SDK (2010) 64 bit Desktop Windows 7 Vista (SP1+) Http://msdn.microsoft.com/en-us/library/ee554869.aspx Server 2008
Introduction Development Environment Make sure your environment matches deployment targets! In Visual Studio CPU x86? x64? AnyCPU? .NET Framework Service Packs Same architecture
Introduction Development Environment Don’t do everything as local admin! Follow proper account configuration from the SDK Developing to Deploy Use the least amount of privileges This will make admins happy Web application deployment (/bin) CAS policies
Development General Development Practices Lists Event Receivers Web Parts Unmanaged Code Web Services
Development General Development Practices Dispose of Objects! SPDisposeCheck Test with multiple accounts/privileges Strongly named assemblies Separate high and low privileged DLLs Do not mix .NET Framework versions 64 bit code compatibility
Development General Development Practices Stay away from the database USE THE API! Use resource & language files Do not hard code strings and labels Caching when and where possible msdn.microsoft.com/library/bb687949.aspx CAS Policies Safe Controls
Development General Development Practices Use try{} catch{} finally{} blocks Check for nulls in finally{} blocks with disposable objects before disposing Change defaults Assembly Info Name it properly GraceHunt.SharePoint.WebParts.Stuff
Development General Development Practices Sign Controls Do not password protect the SNK Elevating Privileges SPSecurity.RunWithElevatedPrivileges() Clean, Validated, Secure data Runs as System account Write operations? Preceeded by SPUtility|SPWeb.ValidateFormDigest Must use new SPSite or SPWeb – not SPContext.Current
You might be a SharePoint Developer if…
Development Lists Test queries before deployment! U2U CAML Query Builder Remove the <Query></Query> tags! http://www.spsprofessional.com/sqlcaml.aspx LINQ Batch queries when possible
Development Lists Do not use SPList.Items Use SPList.GetItems(query) Paginate (2000 items) – RowLimit GetItemByID Use SPList.GetitemByID Not SPList.Items.GetItemByID
Development Event Handlers Do not instantiate SPWeb, SPSite, SPList, or SPListItem Use what the properties give you properties.OpenWeb() properties.ListItem Bulk operations will not run event handlers Ex: New list created – FieldAdding will not run
Development Event Handlers Connections Make sure you code for external systems not being available LOG ERRORS Make it known why something went wrong
Development Web Parts Deploy to the Web Part Gallery Easy to add to a page from there AllowClose = false Closing web parts = bad X DOES NOT EQUAL DELETE Use Properties – avoid hard coded values HTMLEncode input values
Development Web Parts – In Code EnsureChildControls Ensure that the controls have been loaded before using them.
Development Unmanaged Code JavaScript Will this be used in more than one place? Central Script repository (easy access) Deployment to _layouts folder More of a “managed” approach, more secure Less flexible
Development Unmanaged Code Content Editor Web Parts Awesome, flexible web parts! Use a library with versioning to link the WP to Easier to manage Versioning of “code” Publishing Sites Use content controls, not CEWPs!
Development Unmanaged Code Ghosted v. UnGhosted pages Uncustomized v. customized Unghosted pages can have issues with upgrades i.e. site definitions change with upgrades Branding
Development SharePoint Web Services Provide remote access to a range of object model functionality Run on all front-end web servers Heavily dependent on XML and CAML Reside in physical file system in the 2.. Directory and in a virtual file system in /_vti_bin
Development SharePoint Web Services – What They Do Provide programmatic access via .NET and SharePoint Designer Deliver relatively robust remote API functionality Expose SharePoint data repository to disconnected clients
Development SharePoint Web Services – What They Do Permit inter-farm communication (geographic distribution) Integrate well with WinForms, WPF, and SilverLight Client Object Model (SP 2010)
Development SharePoint Web Services – What they DON’T do Do not provide access to entire object model Do not permit manipulation of BLOB objects (documents) NTLM and Basic Authentication Only No SSO integration No extensibility (sealed classes) Limited data aggregation (no joins)
Development SharePoint Web Services – When to use them Remote accessibility Integration with backend or legacy systems Retrieval of items and content as XML Perform large batch updates to lists
Development SPServices – jQuery library utilized SharePoint Web Services http://spservices.codeplex.com/
Development SharePoint Web Services Basics Add a Web Reference to any project type Must specify existing SharePoint site in URL + “/_vti_bin/” + ServiceName + “.asmx” Set URL to dynamic
Development SharePoint Web Services Basics All column names are XML encoded and prefixed with “ows_” <rs:dataItemCount="1" xmlns:rs="urn:schemas-microsoft-com:rowset">      <z:rowows_Title="Elmer@Fudd.com"  ows_MetaInfo="4764;#"  ows__ModerationStatus="0"  ows__Level="1"  ows_ID="4764"  ows_owshiddenversion="5"  ows_UniqueId="4764;#{2272A40C-0DA5-4C0D-938D-BFF3AF9C8ACF}"                           ows_FSObjType="4764;#0"  ows_Created="2009-12-12 12:55:10"            ows_FileRef="4764;#sps/Contact/test/Lists/Issues/4764_.000"  xmlns:z="#RowsetSchema" /> </rs:data>
You might be a SharePoint Developer if…
Development USE SOLUTION PACKAGES! USE SOLUTION PACKAGES! USE SOLUTION PACKAGES! USE SOLUTION PACKAGES! USE SOLUTION PACKAGES! USE SOLUTION PACKAGES! USE SOLUTION PACKAGES! USE SOLUTION PACKAGES!
Development User Code Solutions (2010 & Office 365) When possible Forces better programming practices Keeps the farm safe Makes admins & managers happy Admins can control Makes them feel special
Resources Development Tools Codeplex.com Search SharePoint & Development SharePointDevWiki.com www.sharepointdevwiki.com/display/public/SharePoint+Development+Tools SPDisposeCheck code.msdn.microsoft.com/SPDisposeCheck
Resources SDKs 2010 Server and Foundation http://msdn.microsoft.com/en-us/library/ee557253.aspx 2007 WSS http://msdn.microsoft.com/en-us/library/ms441339(office.12).aspx MOSS 2007 http://msdn.microsoft.com/en-us/library/ms550992(office.12).aspx
Resources General Development Roger Lamb’s Blog blogs.msdn.com/rogerla/ Patterns & Practices SharePoint Guidance msdn.microsoft.com/en-us/library/dd203468.aspx Using Disposable Objects msdn.microsoft.com/en-us/library/aa973248(v=office.12).aspx
Resources General Development Working with Large Lists go.microsoft.com/fwlink?LinkId=95450 SharePoint 2007 Best Practices Resource Center technet.microsoft.com/en-us/office/sharepointserver/bb736746.aspx
You… BEFORE session…
You… AFTER our session…
Resources Q&A
Thanks to Our Other Sponsors! Thanks to our Sponsors
Session Evaluation Please complete and turn in your Session Evaluation Form so we can improve future events.  Survey can be filled out at: http://app.fluidsurveys.com/surveys/spstc2011- and add the Session number to the URL Presenter:		Geoff Varosky & Mark Rackley Session Name:	Just Freakin’ Work! Session No.:	FRI-S5A-110

Contenu connexe

En vedette

Malla curricular preescolar
Malla curricular preescolarMalla curricular preescolar
Malla curricular preescolarEna Meza Profe
 
Desconforto Respiratório Neonatal
Desconforto Respiratório NeonatalDesconforto Respiratório Neonatal
Desconforto Respiratório Neonatalblogped1
 
Supplement For Secrets Of Successful Portals Presentation
Supplement For Secrets Of Successful Portals PresentationSupplement For Secrets Of Successful Portals Presentation
Supplement For Secrets Of Successful Portals PresentationSusan Hanley
 
Dippers, Drops, and Silver Boxes
Dippers, Drops, and Silver BoxesDippers, Drops, and Silver Boxes
Dippers, Drops, and Silver Boxeswww.sgis.org
 
Secrets Of Successful Portal Implementations Dec2008
Secrets Of Successful Portal Implementations   Dec2008Secrets Of Successful Portal Implementations   Dec2008
Secrets Of Successful Portal Implementations Dec2008Susan Hanley
 
Just Freakin Work!! Avoiding Obstacles and Overcoming Pain - SharePoint Devel...
Just Freakin Work!! Avoiding Obstacles and Overcoming Pain - SharePoint Devel...Just Freakin Work!! Avoiding Obstacles and Overcoming Pain - SharePoint Devel...
Just Freakin Work!! Avoiding Obstacles and Overcoming Pain - SharePoint Devel...Mark Rackley
 
SPSDenver - Wrapping Your Head Around the SharePoint Beast
SPSDenver - Wrapping Your Head Around the SharePoint BeastSPSDenver - Wrapping Your Head Around the SharePoint Beast
SPSDenver - Wrapping Your Head Around the SharePoint BeastMark Rackley
 
Breaking Down Barriers (to enterprise social) in the Land of Dinosaurs
Breaking Down Barriers (to enterprise social) in the Land of DinosaursBreaking Down Barriers (to enterprise social) in the Land of Dinosaurs
Breaking Down Barriers (to enterprise social) in the Land of DinosaursSusan Hanley
 
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..Mark Rackley
 
Welcome to the Neighborhood
Welcome to the NeighborhoodWelcome to the Neighborhood
Welcome to the NeighborhoodMorgan Appel
 
SharePoint Saturday NYC - SharePoint and jQuery, what I wish I would have kno...
SharePoint Saturday NYC - SharePoint and jQuery, what I wish I would have kno...SharePoint Saturday NYC - SharePoint and jQuery, what I wish I would have kno...
SharePoint Saturday NYC - SharePoint and jQuery, what I wish I would have kno...Mark Rackley
 

En vedette (11)

Malla curricular preescolar
Malla curricular preescolarMalla curricular preescolar
Malla curricular preescolar
 
Desconforto Respiratório Neonatal
Desconforto Respiratório NeonatalDesconforto Respiratório Neonatal
Desconforto Respiratório Neonatal
 
Supplement For Secrets Of Successful Portals Presentation
Supplement For Secrets Of Successful Portals PresentationSupplement For Secrets Of Successful Portals Presentation
Supplement For Secrets Of Successful Portals Presentation
 
Dippers, Drops, and Silver Boxes
Dippers, Drops, and Silver BoxesDippers, Drops, and Silver Boxes
Dippers, Drops, and Silver Boxes
 
Secrets Of Successful Portal Implementations Dec2008
Secrets Of Successful Portal Implementations   Dec2008Secrets Of Successful Portal Implementations   Dec2008
Secrets Of Successful Portal Implementations Dec2008
 
Just Freakin Work!! Avoiding Obstacles and Overcoming Pain - SharePoint Devel...
Just Freakin Work!! Avoiding Obstacles and Overcoming Pain - SharePoint Devel...Just Freakin Work!! Avoiding Obstacles and Overcoming Pain - SharePoint Devel...
Just Freakin Work!! Avoiding Obstacles and Overcoming Pain - SharePoint Devel...
 
SPSDenver - Wrapping Your Head Around the SharePoint Beast
SPSDenver - Wrapping Your Head Around the SharePoint BeastSPSDenver - Wrapping Your Head Around the SharePoint Beast
SPSDenver - Wrapping Your Head Around the SharePoint Beast
 
Breaking Down Barriers (to enterprise social) in the Land of Dinosaurs
Breaking Down Barriers (to enterprise social) in the Land of DinosaursBreaking Down Barriers (to enterprise social) in the Land of Dinosaurs
Breaking Down Barriers (to enterprise social) in the Land of Dinosaurs
 
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
#SPSEMEA SharePoint & jQuery - What I wish I would have known a year ago..
 
Welcome to the Neighborhood
Welcome to the NeighborhoodWelcome to the Neighborhood
Welcome to the Neighborhood
 
SharePoint Saturday NYC - SharePoint and jQuery, what I wish I would have kno...
SharePoint Saturday NYC - SharePoint and jQuery, what I wish I would have kno...SharePoint Saturday NYC - SharePoint and jQuery, what I wish I would have kno...
SharePoint Saturday NYC - SharePoint and jQuery, what I wish I would have kno...
 

Plus de Mark Rackley

Column Formatter in SharePoint Online
Column Formatter in SharePoint OnlineColumn Formatter in SharePoint Online
Column Formatter in SharePoint OnlineMark Rackley
 
SharePoint Conference North America - Converting your JavaScript to SPFX
SharePoint Conference North America - Converting your JavaScript to SPFXSharePoint Conference North America - Converting your JavaScript to SPFX
SharePoint Conference North America - Converting your JavaScript to SPFXMark Rackley
 
A Power User's Introduction to jQuery Awesomeness in SharePoint
A Power User's Introduction to jQuery Awesomeness in SharePointA Power User's Introduction to jQuery Awesomeness in SharePoint
A Power User's Introduction to jQuery Awesomeness in SharePointMark Rackley
 
Utilizing jQuery in SharePoint: Get More Done Faster
Utilizing jQuery in SharePoint: Get More Done FasterUtilizing jQuery in SharePoint: Get More Done Faster
Utilizing jQuery in SharePoint: Get More Done FasterMark Rackley
 
Citizen Developers Intro to jQuery Customizations in SharePoint
Citizen Developers Intro to jQuery Customizations in SharePointCitizen Developers Intro to jQuery Customizations in SharePoint
Citizen Developers Intro to jQuery Customizations in SharePointMark Rackley
 
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 SharePointMark Rackley
 
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 SharePointMark Rackley
 
#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...Mark Rackley
 
Introduction to StratusForms #SayNoToInfoPath
Introduction to StratusForms #SayNoToInfoPathIntroduction to StratusForms #SayNoToInfoPath
Introduction to StratusForms #SayNoToInfoPathMark Rackley
 
SPTechCon Boston 2015 - Overcoming SharePoint Limitations
SPTechCon Boston 2015 - Overcoming SharePoint LimitationsSPTechCon Boston 2015 - Overcoming SharePoint Limitations
SPTechCon Boston 2015 - Overcoming SharePoint LimitationsMark Rackley
 
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 SharePointMark Rackley
 
TulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery librariesTulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery librariesMark Rackley
 
SPTechCon DevDays - SharePoint & jQuery
SPTechCon DevDays - SharePoint & jQuerySPTechCon DevDays - SharePoint & jQuery
SPTechCon DevDays - SharePoint & jQueryMark Rackley
 
SPTechCon Dev Days - Third Party jQuery Libraries
SPTechCon Dev Days - Third Party jQuery LibrariesSPTechCon Dev Days - Third Party jQuery Libraries
SPTechCon Dev Days - Third Party jQuery LibrariesMark Rackley
 
SPSNH 2014 - The SharePoint & jQueryGuide
SPSNH 2014 - The SharePoint & jQueryGuideSPSNH 2014 - The SharePoint & jQueryGuide
SPSNH 2014 - The SharePoint & jQueryGuideMark Rackley
 
SPTechCon 2014 How to develop and debug client side code in SharePoint
SPTechCon 2014 How to develop and debug client side code in SharePointSPTechCon 2014 How to develop and debug client side code in SharePoint
SPTechCon 2014 How to develop and debug client side code in SharePointMark Rackley
 
Using jQuery to Maximize Form Usability
Using jQuery to Maximize Form UsabilityUsing jQuery to Maximize Form Usability
Using jQuery to Maximize Form UsabilityMark Rackley
 
SharePoint & jQuery Guide - SPSNashville 2014
SharePoint & jQuery Guide - SPSNashville 2014SharePoint & jQuery Guide - SPSNashville 2014
SharePoint & jQuery Guide - SPSNashville 2014Mark Rackley
 
The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14Mark Rackley
 
SharePoint REST vs CSOM
SharePoint REST vs CSOMSharePoint REST vs CSOM
SharePoint REST vs CSOMMark Rackley
 

Plus de Mark Rackley (20)

Column Formatter in SharePoint Online
Column Formatter in SharePoint OnlineColumn Formatter in SharePoint Online
Column Formatter in SharePoint Online
 
SharePoint Conference North America - Converting your JavaScript to SPFX
SharePoint Conference North America - Converting your JavaScript to SPFXSharePoint Conference North America - Converting your JavaScript to SPFX
SharePoint Conference North America - Converting your JavaScript to SPFX
 
A Power User's Introduction to jQuery Awesomeness in SharePoint
A Power User's Introduction to jQuery Awesomeness in SharePointA Power User's Introduction to jQuery Awesomeness in SharePoint
A Power User's Introduction to jQuery Awesomeness in SharePoint
 
Utilizing jQuery in SharePoint: Get More Done Faster
Utilizing jQuery in SharePoint: Get More Done FasterUtilizing jQuery in SharePoint: Get More Done Faster
Utilizing jQuery in SharePoint: Get More Done Faster
 
Citizen Developers Intro to jQuery Customizations in SharePoint
Citizen Developers Intro to jQuery Customizations in SharePointCitizen Developers Intro to jQuery Customizations in SharePoint
Citizen Developers Intro to jQuery Customizations in SharePoint
 
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
 
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
 
#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...
 
Introduction to StratusForms #SayNoToInfoPath
Introduction to StratusForms #SayNoToInfoPathIntroduction to StratusForms #SayNoToInfoPath
Introduction to StratusForms #SayNoToInfoPath
 
SPTechCon Boston 2015 - Overcoming SharePoint Limitations
SPTechCon Boston 2015 - Overcoming SharePoint LimitationsSPTechCon Boston 2015 - Overcoming SharePoint Limitations
SPTechCon Boston 2015 - Overcoming SharePoint Limitations
 
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
 
TulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery librariesTulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery libraries
 
SPTechCon DevDays - SharePoint & jQuery
SPTechCon DevDays - SharePoint & jQuerySPTechCon DevDays - SharePoint & jQuery
SPTechCon DevDays - SharePoint & jQuery
 
SPTechCon Dev Days - Third Party jQuery Libraries
SPTechCon Dev Days - Third Party jQuery LibrariesSPTechCon Dev Days - Third Party jQuery Libraries
SPTechCon Dev Days - Third Party jQuery Libraries
 
SPSNH 2014 - The SharePoint & jQueryGuide
SPSNH 2014 - The SharePoint & jQueryGuideSPSNH 2014 - The SharePoint & jQueryGuide
SPSNH 2014 - The SharePoint & jQueryGuide
 
SPTechCon 2014 How to develop and debug client side code in SharePoint
SPTechCon 2014 How to develop and debug client side code in SharePointSPTechCon 2014 How to develop and debug client side code in SharePoint
SPTechCon 2014 How to develop and debug client side code in SharePoint
 
Using jQuery to Maximize Form Usability
Using jQuery to Maximize Form UsabilityUsing jQuery to Maximize Form Usability
Using jQuery to Maximize Form Usability
 
SharePoint & jQuery Guide - SPSNashville 2014
SharePoint & jQuery Guide - SPSNashville 2014SharePoint & jQuery Guide - SPSNashville 2014
SharePoint & jQuery Guide - SPSNashville 2014
 
The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14
 
SharePoint REST vs CSOM
SharePoint REST vs CSOMSharePoint REST vs CSOM
SharePoint REST vs CSOM
 

Dernier

Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Hiroshi SHIBATA
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightSafe Software
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfalexjohnson7307
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfFIDO Alliance
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...FIDO Alliance
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdfMuhammad Subhan
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptxFIDO Alliance
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Paige Cruz
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxFIDO Alliance
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxFIDO Alliance
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024Stephen Perrenod
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideCollecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideStefan Dietze
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxFIDO Alliance
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingScyllaDB
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...ScyllaDB
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!Memoori
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentationyogeshlabana357357
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsLeah Henrickson
 

Dernier (20)

Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideCollecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 

#SPSTCDC Just Freakin Work! Development Best Practices in SharePoint

  • 1. Just Freakin’ Work!Avoiding Common Hurdles in SharePoint Development Geoff Varosky (GraceHunt) Mark Rackley (Juniper Strategy) Welcome to SharePoint Saturday—The Conference
  • 2. Welcome to SharePoint Saturday—The Conference Thank you for being a part of the first SharePoint Saturday conference Please turn off all electronic devices or set them to vibrate. If you must take a phone call, please do so in the hall so as not to disturb others. Open wireless access is available at SSID: SPSTC2011 Feel free to “tweet and blog” during the session Thanks to our Diamond and Platinum Sponsors:
  • 3. About the speakers… The Hillbilly Mr. Ackley Catcher of all things that flow downhill Solutions Architect for Juniper Strategy, LLC. www.juniper-strategy.com Speaker, Blogger, (soon to be) Author Blog: www.sharepointhillbilly.com Twitter: @mrackley E-mail: mrackley@gmail.com
  • 4. About the speakers… The Yankee Geoff Varosky Director, Development and Evangelism GraceHunt www.gracehunt.com Speaker, Blogger, (soon to be) Author Blog: www.sharepointyankee.com Twitter: @gvaro E-mail: gvarosky@gracehunt.com
  • 5. You might be a SharePoint Developer if…
  • 6. Agenda Introduction Development Deployment Resources Q&A
  • 7. Introduction Types of Development Development Tools Development Environment Developing to Deploy
  • 8. Introduction Types of Development Unmanaged Code Managed Code Customization
  • 9. Introduction Development Tools STSDEV (2007) stsdev.codeplex.com WSPBuilder (2007 & 2010) wspbuilder.codeplex.com CKS:DEV (2010) cksdev.codeplex.com SharePoint Designer Developer Dashboard (2010)
  • 10. Introduction Development Environment Physical? Virtual? Desktop? Dusty old PC under the desk?
  • 11. Introduction 2007 or 2010 64-bit (leaves room for upgrade) >= 4G of RAM Choice of Virtual Host HyperV, VMWare, VirtualBox Not much in the way of VirtualPC support Create a base virtual image SQL, Base SP install, Service Packs, Dev Tools Visual Studio, SPD, etc.
  • 12. Introduction Development Environment Follow the SDK (2010) 64 bit Desktop Windows 7 Vista (SP1+) Http://msdn.microsoft.com/en-us/library/ee554869.aspx Server 2008
  • 13. Introduction Development Environment Make sure your environment matches deployment targets! In Visual Studio CPU x86? x64? AnyCPU? .NET Framework Service Packs Same architecture
  • 14. Introduction Development Environment Don’t do everything as local admin! Follow proper account configuration from the SDK Developing to Deploy Use the least amount of privileges This will make admins happy Web application deployment (/bin) CAS policies
  • 15. Development General Development Practices Lists Event Receivers Web Parts Unmanaged Code Web Services
  • 16. Development General Development Practices Dispose of Objects! SPDisposeCheck Test with multiple accounts/privileges Strongly named assemblies Separate high and low privileged DLLs Do not mix .NET Framework versions 64 bit code compatibility
  • 17. Development General Development Practices Stay away from the database USE THE API! Use resource & language files Do not hard code strings and labels Caching when and where possible msdn.microsoft.com/library/bb687949.aspx CAS Policies Safe Controls
  • 18. Development General Development Practices Use try{} catch{} finally{} blocks Check for nulls in finally{} blocks with disposable objects before disposing Change defaults Assembly Info Name it properly GraceHunt.SharePoint.WebParts.Stuff
  • 19. Development General Development Practices Sign Controls Do not password protect the SNK Elevating Privileges SPSecurity.RunWithElevatedPrivileges() Clean, Validated, Secure data Runs as System account Write operations? Preceeded by SPUtility|SPWeb.ValidateFormDigest Must use new SPSite or SPWeb – not SPContext.Current
  • 20. You might be a SharePoint Developer if…
  • 21. Development Lists Test queries before deployment! U2U CAML Query Builder Remove the <Query></Query> tags! http://www.spsprofessional.com/sqlcaml.aspx LINQ Batch queries when possible
  • 22. Development Lists Do not use SPList.Items Use SPList.GetItems(query) Paginate (2000 items) – RowLimit GetItemByID Use SPList.GetitemByID Not SPList.Items.GetItemByID
  • 23. Development Event Handlers Do not instantiate SPWeb, SPSite, SPList, or SPListItem Use what the properties give you properties.OpenWeb() properties.ListItem Bulk operations will not run event handlers Ex: New list created – FieldAdding will not run
  • 24. Development Event Handlers Connections Make sure you code for external systems not being available LOG ERRORS Make it known why something went wrong
  • 25. Development Web Parts Deploy to the Web Part Gallery Easy to add to a page from there AllowClose = false Closing web parts = bad X DOES NOT EQUAL DELETE Use Properties – avoid hard coded values HTMLEncode input values
  • 26. Development Web Parts – In Code EnsureChildControls Ensure that the controls have been loaded before using them.
  • 27. Development Unmanaged Code JavaScript Will this be used in more than one place? Central Script repository (easy access) Deployment to _layouts folder More of a “managed” approach, more secure Less flexible
  • 28. Development Unmanaged Code Content Editor Web Parts Awesome, flexible web parts! Use a library with versioning to link the WP to Easier to manage Versioning of “code” Publishing Sites Use content controls, not CEWPs!
  • 29. Development Unmanaged Code Ghosted v. UnGhosted pages Uncustomized v. customized Unghosted pages can have issues with upgrades i.e. site definitions change with upgrades Branding
  • 30. Development SharePoint Web Services Provide remote access to a range of object model functionality Run on all front-end web servers Heavily dependent on XML and CAML Reside in physical file system in the 2.. Directory and in a virtual file system in /_vti_bin
  • 31. Development SharePoint Web Services – What They Do Provide programmatic access via .NET and SharePoint Designer Deliver relatively robust remote API functionality Expose SharePoint data repository to disconnected clients
  • 32. Development SharePoint Web Services – What They Do Permit inter-farm communication (geographic distribution) Integrate well with WinForms, WPF, and SilverLight Client Object Model (SP 2010)
  • 33. Development SharePoint Web Services – What they DON’T do Do not provide access to entire object model Do not permit manipulation of BLOB objects (documents) NTLM and Basic Authentication Only No SSO integration No extensibility (sealed classes) Limited data aggregation (no joins)
  • 34. Development SharePoint Web Services – When to use them Remote accessibility Integration with backend or legacy systems Retrieval of items and content as XML Perform large batch updates to lists
  • 35. Development SPServices – jQuery library utilized SharePoint Web Services http://spservices.codeplex.com/
  • 36. Development SharePoint Web Services Basics Add a Web Reference to any project type Must specify existing SharePoint site in URL + “/_vti_bin/” + ServiceName + “.asmx” Set URL to dynamic
  • 37. Development SharePoint Web Services Basics All column names are XML encoded and prefixed with “ows_” <rs:dataItemCount="1" xmlns:rs="urn:schemas-microsoft-com:rowset"> <z:rowows_Title="Elmer@Fudd.com" ows_MetaInfo="4764;#" ows__ModerationStatus="0" ows__Level="1" ows_ID="4764" ows_owshiddenversion="5" ows_UniqueId="4764;#{2272A40C-0DA5-4C0D-938D-BFF3AF9C8ACF}" ows_FSObjType="4764;#0" ows_Created="2009-12-12 12:55:10" ows_FileRef="4764;#sps/Contact/test/Lists/Issues/4764_.000" xmlns:z="#RowsetSchema" /> </rs:data>
  • 38. You might be a SharePoint Developer if…
  • 39. Development USE SOLUTION PACKAGES! USE SOLUTION PACKAGES! USE SOLUTION PACKAGES! USE SOLUTION PACKAGES! USE SOLUTION PACKAGES! USE SOLUTION PACKAGES! USE SOLUTION PACKAGES! USE SOLUTION PACKAGES!
  • 40. Development User Code Solutions (2010 & Office 365) When possible Forces better programming practices Keeps the farm safe Makes admins & managers happy Admins can control Makes them feel special
  • 41. Resources Development Tools Codeplex.com Search SharePoint & Development SharePointDevWiki.com www.sharepointdevwiki.com/display/public/SharePoint+Development+Tools SPDisposeCheck code.msdn.microsoft.com/SPDisposeCheck
  • 42. Resources SDKs 2010 Server and Foundation http://msdn.microsoft.com/en-us/library/ee557253.aspx 2007 WSS http://msdn.microsoft.com/en-us/library/ms441339(office.12).aspx MOSS 2007 http://msdn.microsoft.com/en-us/library/ms550992(office.12).aspx
  • 43. Resources General Development Roger Lamb’s Blog blogs.msdn.com/rogerla/ Patterns & Practices SharePoint Guidance msdn.microsoft.com/en-us/library/dd203468.aspx Using Disposable Objects msdn.microsoft.com/en-us/library/aa973248(v=office.12).aspx
  • 44. Resources General Development Working with Large Lists go.microsoft.com/fwlink?LinkId=95450 SharePoint 2007 Best Practices Resource Center technet.microsoft.com/en-us/office/sharepointserver/bb736746.aspx
  • 46. You… AFTER our session…
  • 48. Thanks to Our Other Sponsors! Thanks to our Sponsors
  • 49. Session Evaluation Please complete and turn in your Session Evaluation Form so we can improve future events. Survey can be filled out at: http://app.fluidsurveys.com/surveys/spstc2011- and add the Session number to the URL Presenter: Geoff Varosky & Mark Rackley Session Name: Just Freakin’ Work! Session No.: FRI-S5A-110

Notes de l'éditeur

  1. Things to take away from this session…