philly code camp oct sharepoint/office 365 developer best practices

37

Upload: jennifer-kenderdine

Post on 12-Apr-2017

265 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices
Page 2: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential Jennifer KenderdineProduct Application Lead for SharePoint

[email protected]

OCTOBER 10, 2015

SharePoint / Office 365Developer Best Practices

Page 3: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Featuring a Keynote fromScott GuthrieExecutive Vice PresidentCloud & Enterprise

Microsoft Azure TourTuesday, Oct 13, Philadelphia

A FREE day of Technical Training on October 13 at the Philadelphia Convention Center!Top engineers from Redmond and independent experts from around the world will present: 12 technical sessions across two tracks (IT Experts and

Developers) 6 hands-on labs

Security, Networking, Big Data, Storage, Identity, Web, Mobile, Hybrid, Containers, Devops, Open Source, Management, Internet of Things

Whether you’re new to the cloud or an existing user, you’ll learn something new and walk away ready to apply your discoveries.

Register now! http://MicrosoftAzureTour.com

Page 4: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 4

AgendaKnow SharePoint:

• Configure vs. Custom• Terminology• Planning• Pages

Dev Environment & Tools

API’s & Plugins

Branding & Design

Add-Ins & Custom Solutions

Error Logging

Performance

References

Q & A

Page 5: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 5

Know SharePoint

Page 6: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 6

Configure vs. Custom

Do you know: • Hierarchy• Base Architecture • Difference between File System and Content Database• Business case for creating the customization

Page 7: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 7

Configure vs. Custom

Do you know what options you have with “out of the box” configurations?

• Training is key to knowing what you can do before you create that Visual Studio Project

• You need to be more than a .Net DEV - Understanding SharePoint under the covers is Fundamental

• Know the requirements

• Understand Enhanced Workflow model

Page 8: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 8

Do you know the terminology?

Client Context

AppWeb

Root Web

HIVEREST

Host Web

Content Database CSOM

Site Collection

Page 9: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 9

Configure vs. Custom

• Keep long term maintenance in mind – who takes over when you leave?

• End Users?• Power Users?• Admins?• Other?

Page 10: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 10

Key Elements in Planning

• Reusable – “Once and Done”• Testable• Error Handling• Deployable• Maintainable

Page 11: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 11

SharePoint Pages

• Know the web parts to use and when• Content Editor

• Reference files vs. “Edit Source”• Script Editor• Content Query• Form Parts• Filters• Content Search

• Maintenance Mode (?contents=1)• Force Edit Mode (?ToolPaneView=2&pagemode=edit)

Page 12: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 12

Development Environment

Page 13: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 13

DEV Environment Options

• Office 365 Developer Site• Visual Studio• Cloud-based Visual Studio• NAPA (Office 365 Dev)• Guidance from Microsoft

Page 14: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 14

DEV Environment Options

• On premise DEV• DEV Environment should mirror

production• Document the install and configuration• Build your own• Visual Studio is installed on the same

computer.

Page 15: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 15

Developer Tools

• SharePoint Designer• NAPA (Office 365 Dev)• Visual Studio / Other Code Editors• Git / TFS / other source code management• Debugging tools

• Fiddler• Built in browser debuggers

• Office 365 Developer Patterns & Practices on github

Page 16: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 16

API’s and Plugins

Page 17: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 17

API’s and Plugins

• Central Library• Scripts (JavaScript, CSS, HTML) • Plugin references (I.e. JQuery)

• Add Content Types (I.e. JavaScript Display Templates)• Use relative paths to reference the required files to use the JavaScript

object model within existing web (/_layouts/15/sp.js)• Client API examples, JavaScript API, .Net API, REST examples

Page 18: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 18

Branding and Design

Page 19: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 19

Branding and Design

• Use industry best practices and workflow to complete the designs• Plan• Create the assets

• Imagery• CSS Stylesheets• HTML• Scripts

• Build• Test• Package for re-usability

Page 20: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 20

Branding and Design

• The Cloud App Model – Remote Provisioning• Code samples for Site Provisioning• Site branding and page customizations• Theming & Alternate CSS• Display Templates

• On Premise – Features in Full trust  code

Page 21: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 21

Branding and Design

• Master Page Gallery• Always make a copy of the following before you make edits:

• Existing master page• Page layout(s)

• Customizing could cause issues with upgrades• Do you know the difference?

• Ghosted• Unghosted• Customized• Uncustomized

Page 22: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 22

Client Side Rendering | JSLink

• JSLink files (JavaScript Display Templates) can be used to quickly and easily change how a list view or a form is rendered

• Master Page Gallery Display Template or Content Type in a library?

Page 23: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 23

Add-Ins and Custom Solutions

Page 24: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 24

Add-Ins and Custom Solutions

• Moving outside of the Server Side Object Model is more secure and upgradeable

• Full Trust code: if not done well• Impacts performance• Makes upgrades difficult

• Think “Cloud” development (Add-Ins)• Client Side Object Model• REST / OData clients

• Hosting Models and Deployment choices• App Web

Page 25: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 25

Add-Ins and Solutions

• Web Parts• Features• Event Receivers• Timer Jobs

Page 26: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 26

Error Logging

Page 27: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 27

Exceptions in the Code

• Exception Management in SharePoint• Where to log?

• Trace log• ULS Log• SharePoint list• Workflow History List (in SharePoint Workflow)

• Error Messages• Catch the most specific type of exception you can

• Makes the bugs easier to find• If you know the type of error you can customize the Error Messages

users see to make them as user friendly as possible• Avoid empty catch blocks

• Comment the Code

Page 28: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 28

Performance

Page 29: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 29

Performance Troubleshooting

• Developer Dashboard • On Premise Only

• Stack Tracing • Correlation ID

• Diagnostic Logging• Usage Reporting• SQL Server Performance• Disposal of objects

Page 30: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 30

References

Page 31: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 31

Links for SharePoint Developers

• Get started creating SharePoint-Hosted Ad-Ins• Dev.Office.com/patterns-and-practices• Dev.Office.com/Getting-started• Dev.Office.com/training• Microsoft Virtual Academy

• Developing Microsoft SharePoint 2013 Core Solutions

• JSLink code samples• Bill Baer blog on creating dev environment• Workflow Fault Handling• Monitoring and Maintaining SharePoint 2013

Page 32: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Confidential ● trellist.com ● 05/03/2023 ● 32

Questions?

Page 33: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Thank You

Page 34: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

Trellist Overview

Page 35: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

About Trellist

Professional ServicesFirm since 1995

Intelligent SolutionsEmployee Shared

Entrepreneurial Company

Unique CollectiveApproach to Business

Empowering CultureClients as Partners

Immersion and Efficiency

130 Employees across 5 Divisions:

ConsultingBranding + Marketing

DigitalEnterprise Technology

Staffing

Page 36: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

About Trellist

Page 37: Philly Code Camp Oct SharePoint/Office 365 Developer Best Practices

About Trellist

Industry LeadingClients

Regional, National and GlobalVaried IndustriesTrusted Partner

Intelligent Solutions that Create Business Value

Broad CapabilitiesDeep Expertise

Stronger Solutions

Dynamic Options in Professional Services

Agency ModelsStaffing ModelsHybrid Models