TRANSITIONING FULL TRUST CODE TO CLIENT APIS Architecting SharePoint For The Future Chris Domino...
-
Upload
clarence-small -
Category
Documents
-
view
214 -
download
0
Transcript of TRANSITIONING FULL TRUST CODE TO CLIENT APIS Architecting SharePoint For The Future Chris Domino...
TRANSITIONING FULL TRUST CODE TO CLIENT APISArchitecting SharePoint For The FutureChris DominoDecember 10, 2015
SharePoint Fest 2015 2
HI
Chris Domino [email protected] (not so social on the media)
• Rightpoint SharePoint Architect / Developer / Everything
• Author– Blog: http://chrisdomino.com/blog
– Book: http://www.amazon.com/Deployment-Driven-Design-Chris-Domino-ebook/dp/B00C4V482E
SharePoint Fest 2015 3
TRANSITIONING FULL TRUST CODE TO CLIENT APIS
Microsoft has ushered in a paradigm shift for SharePoint developers.
Emerging best practices call for us to start moving away from deploying server code to the farm.
Custom solutions should start leveraging the Client APIs.
…but…but why?
SharePoint Fest 2015 4
A BRIEF HISTORY OF SHAREPOINT APIS
SharePoint 2003 SharePoint 2007 SharePoint 2010 SharePoint 2013
Server APIs ASP.NET Client APIs Enhanced Client APIs
Web Services Solutions / Features Sandbox Solutions App Model
Event Receivers SSPs Service Applications Search
Each new version of SharePoint has added more capabilities to our customization arsenals.
SharePoint Fest 2015 5
SO WHAT’S WRONG WITH SERVER CODE?
• Technically speaking…nothing…
– Very powerful
– I could do anything
– Tooling keeps improving
• But…
– Too powerful?
– Deployments are too impactful
– Not future-proof
SharePoint Fest 2015 6
THE PARADIGM SHIFT
• Server code…– Is architecturally monolithic
– Does not scale
– Requires heavy dev environments
• Client code…– Is layered
– Scales like a champ
– Lightweight and efficient
It’s time to start thinking about SharePoint as a modern web platform.
SharePoint Fest 2015 7
MEET THE CLIENT APIS
C# Object Model (CSOM) JavaScript Object Model (JSOM) REST (already an acronym!)
Managed C# code First class ECMAScript Pure URL-based REST endpoints
Runs on any .NET platform Runs on any SharePoint page Runs on anything that’s HTTP
Replaces server code behind All you need for SP hosted apps Great for cross-platform integration
But…
Chatty Difficult to debug URLs can get cryptic
Synchronous Need to load scripts in order Authentication tokens required
These are the wireless drills of SharePoint development.• Site collection scoped
• Feature parity
SharePoint Fest 2015 8
THE APP MODEL (PROVIDED HOSTED)
Provider hosted apps demonstrate the power of CSOM and are great for distributing autonomous functionality across farms. But…
• Difficult to configure
• Forces our hand a bit architecturally
• Introduces an extra layer of security
• Uses IFRAMES
SharePoint Fest 2015 9
RETHINKING SHAREPOINT ARCHITECTURES
With an understanding of the paradigm shift and client APIs, let’s look at how we can start transitioning our full trust code.
1. Server-based with some client functionality.
2. Client-based with some server functionality.
3. SharePoint as a platform.
SharePoint Fest 2015 10
1. SERVER-BASED ARCHITECTURE
This is a largely out-of-the-box SharePoint deployment with very few customizations.
• Content Query web parts become Content Search web parts.
• JSOM can be used for light-weight custom functionality.
• Install third party apps for advanced functionality.
SharePoint Fest 2015 11
2. CLIENT-BASED ARCHITECTURE
This is a largely custom SharePoint solution that is still on premise.
• Pages are still served out of SharePoint.
• All custom code is converted to CSOM and potentially moved off-farm.
• Blend of WSPs, features, branding, JSOM, REST, etc.
SharePoint Fest 2015 12
3. SHAREPOINT AS A PLATFORM
In this architecture, SharePoint acts as a database / asset repository.
• End users never visit SharePoint. All UI is hosted externally (like a provider-hosted app).
• No code is deployed to the farm.
• Search, security, document libraries, image renditions, and any other services can be leveraged.
SharePoint Fest 2015 13
WHAT SHOULD STAY THE SAME
The Client APIs can’t actually do everything…
• Subset of the Server APIs
• Beyond site collections…– Web Applications
– Service Applications
• Cross-site collection functionality
• Non code based customizations– Custom Actions
– Application Pages
29 North Wacker Drive | 4th Floor | Chicago, Illinois 60606312.920.8383 | 312.920.8384 faxrightpoint.com
Indulge the paradigm shift.
Transition your full trust code to client APIs and watch your SharePoint architectures evolve.
Questions?