Working with SharePoint as a development platform means that you can deliver custom tailored functionality for considerable less effort and time to delivery. This is a high level crash course into conventional custom code patterns used by SharePoint developers used from SharePoint 2007 to present day on SharePoint Online. We will also discuss when and why to use custom coded solutions, and when they should be avoided. No previous coding experience is required.
Introduction to SharePoint as a development platform
1. apps for the modernenterprise
INTRODUCTION TO
SHAREPOINT AS A
DEVELOPMENT PLATFORM
RON COURVILLE
2. apps for the modernenterprise
Welcome to SharePoint Saturday Houston
• 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.
• Special thanks to our Diamond Sponsor, HSPUG
Thank you for being a part of the
7th Annual SharePoint Saturday
for the greater Houston area!
3. apps for the modernenterprise
Thanks to all our Sponsors!
4. apps for the modernenterprise
Information
•Speaker presentation slides should be
available from the SPSHOU website within a
week or so
• This presentation is available at
http://slideshare.net/ronaldcourville
•The Houston SharePoint User Group will be
having it’s next meeting Wednesday April 20th.
Please join us at www.h-spug.org
5. apps for the modernenterprise
A software team that speaks your language
6. apps for the modernenterprise
About Me
•LSU alumnus
•Working with custom
SharePoint
development since
2009
•With Entrance
Consulting since 2012
7. apps for the modernenterprise
… !?
“So, what do you do?”
8. apps for the modernenterprise
Software platform
“A major piece of software, as an operating
system, an operating environment, or a
database, under which various smaller
application programs can be designed to run.”
http://www.dictionary.com/browse/software-
platform
9. apps for the modernenterprise
What is SharePoint? (technically)
•An application?
• “Intranet to go”
• Core features
Document / Item Versioning Basic workflows
Metadata Sites
Wikis Search
Collaboration Permissions
10. apps for the modernenterprise
What is SharePoint? (technically)
•An application?
•A framework?
• Provides functionalities / solution to the particular
problem area
• No code solutions (OOTB)
• SharePoint Designer workflows
• Content Deployment
• Custom code solutions
• APIs
• Code libraries
• Higher business value: Custom software can be
delivered with…
Less time to delivery More consistent user experience
Less bugs More bang for the buck
11. apps for the modernenterprise
Why have custom development?
Why
• The SharePoint application lacks
specific functionality
• Automate or assist typical user
functions within SharePoint
• Integrate metadata from other
LOB systems into SharePoint
• Surface external applications on
SharePoint for a better user
experience
Why not
• It’s fun / cool
• There’s a viable ISV on the market
• It’s a large project (large scale
applications should not be built
directly on SharePoint)
• SP lists < SQL tables
• 5000 list item query threshold
• More costly, could introduce
additional bugs
12. apps for the modernenterprise
SharePoint 2007 server side code
•Server side languages
• PHP, ASP.Net, Java
•SharePoint is built on ASP.Net
13. apps for the modernenterprise
SharePoint 2007 server side code
•Application Page = custom ASP.Net page
14. apps for the modernenterprise
Packaging and deploying custom code
Solution Package
• Deploys to IIS application pool
• Dangerous
• Memory leaks
• Could crash server
• Difficult deployment (server restart)
• Not supported in Office 365
15. apps for the modernenterprise
SharePoint 2010 server side code
• Solution package Farm solutions
• Elevated access: Timer jobs, event receivers, site definitions,
custom content organizer rules, etc.
• Deployable by farm admin
• Not supported in Office 365
• Sandbox solutions
• Simple, limited scope functions: custom web parts, ribbon
button, menu items, site themes, etc.
• Deployable by site collection admin
• Deprecated in Office 365
16. apps for the modernenterprise
SharePoint 2010 custom code web parts
•Server side code
•Or JavaScript-based
• Primarily using web
services (SOAP)
• Easier to deploy
• Protects the server
•SPServices
• https://spservices.codepl
ex.com/
17. apps for the modernenterprise
SharePoint 2010: SPServices + Content Editor
18. apps for the modernenterprise
SharePoint 2013: Client code renaissance
JavaScript Object
Model (JSOM)
• Runs in the browser
• Language: JavaScript
Client Side Object
Model (CSOM)
• Runs on local machine
• Languages: C# or Visual
Basic
Representational State
Transfer (REST)
• Highly standardized API
• Upgraded from SOAP API
in 2010
Enabled SharePoint
Apps…
19. apps for the modernenterprise
• Deployable from the app store
• On prem and O365
• Delivers functionality and/or UI to
the host SP site
Types of add-ins
• SharePoint hosted add-in
• Lives on SharePoint
• Provider hosted add-in
• Lives on external, independent
website
• Webpage surfaced as an iframe
SharePoint 2013: Apps Add-ins
20. apps for the modernenterprise
Why host custom code outside of SharePoint?
Farm not at risk of memory leaks or unstable code
• Degrade performance; difficult to track, and can take down the whole farm
Dedicated and isolated app resources
• Separation of concerns
Complete control over architecture
• Supports any programming language or data source
Support large scale applications
• > 5000 rows and faster read/write access
Can re-use outside of SharePoint
• App data readily accessible by other LOB
24. apps for the modernenterprise
What is SharePoint? (technically)
• An application?
• A framework?
• A platform?
“A major piece of software, as
an operating system, an
operating environment, or a
database, under which various
smaller application programs
can be designed to run.”
“An ecosystem of applications”
25. apps for the modernenterprise
What’s next?
Office 365 as a platform
28. apps for the modernenterprise
How to get started?
Learning resources
• Pluralsight
• MSDN
• Dev.Office.com
• Office 365 Patterns and Practices
Start simple, with low impact project
29. apps for the modernenterprise
Questions?
Learn more at www.entranceconsulting.com
Editor's Notes
Feel free to interrupt me with questions. If I don’t know the answer, someone else will.
Sometimes all of that is not good enough
Sometimes we need to extend SharePoint
SP provides hidden value with a toolset under the hood
Custom code using Microsoft libraries and APIs – 50 lines of code become one line of code
Research or consult with a SP expert to be sure that functionality not present
Server maintains session data: user account information, quantity of item, details of the item
Server maintains session data: user account information, quantity of item, details of the item
** In 2007 and 2010: SharePoint as a framework; custom applications built on top of SharePoint
Talk about a real world application.
My very first SP development project
Client = User’s machine or browser
Session data, processing
Even safer, easier to deploy
App store – public or private
Mission critical applications can use SQL or Oracle or even NoSQL
Use PHP or Node.js
Suppose we created a method for querying timesheet records
Walled garden
Microsoft is releasing control of the environment, and allowing more flexibility
Add ins appear in multiple Office products with consistent experience
Can pull data from different products – Unified API - Graph
Examples: send an email from SharePoint ribbon button with an attachment stored in OneDrive, linking to a newly generated notebook in OneNote