SharePoint apps: data access options
-
Upload
sergei-sergeev -
Category
Software
-
view
110 -
download
2
Transcript of SharePoint apps: data access options
Agenda 1. Review possible data access options
(remote to SharePoint and SharePoint to remote).
2. DEMOs.3. Pros & cons for each option. 4. How to select right data access option.
List of different data access optionsRemote web to SharePoint host.NET CSOM
Server REST
JavaScript CSOM
JavaScript REST
SharePoint host to remote webWeb Proxy JSOM
Web Proxy REST
Custom Proxy page
BONUS – Azure AD
Remote web to host .NET CSOM PROS
+ .NET code+ results as objects+ batch calls+ app only context+ code protection (reverse engineering)+ remote events (.NET)
CONS - .NET code only - testability - performance (vs cross-domain library) - portability - results as objects
Remote web to host server REST PROS
+ any language + JSON, XML + testability + app only context + portability + code protection (reverse engineering)
+ remote events (.NET)
CONS - performance (vs cross-domain library)
- no batch support? - CSOM isn’t fully covered
REST API batching implemented!
Office 365 Roadmap
Enable batching support for the REST API
Cross-domain library (SP.RequestExecutor.js)
- same origin policy - allows to perform cross domain calls
Cross-domain library (SP.RequestExecutor.js) - not an original (xdomain.js) - alternatives (cors, jsonp)
Remote web to host JavaScript CSOM and client RESTPROS
+ fast+ testability?+ portability+ allows to bypass firewall behind remote app and SharePoint
CONS - no app only context - no remote events - intellectual protection - IE security zones (link)
App web to remote web (web proxy)
Prerequisites: AppManifest’s Remote Endpoints
You can chose your own method, cors, jsonp (if you can access the server)
App web to remote web (web proxy)PROS
+ fast to SharePoint (you are in the app web domain already)+ testability?+ portability
CONS - can be slow - no authentication - response limit – 200kb (can be customized for on premise)
- remote endpoint should be publicly available
- ports limit – 80, 43, 7000-10000
App web to remote web (custom proxy page)PROS
+ fast to SharePoint (you are in the app web domain already)+ fast to remote web (because of iframe)+ testability
CONS - IE security zones (link) - no app only context - no remote events - intellectual protection
Remote web to host with SharePoint hosted app
DEMO Access SharePoint data from remote
web with SharePoint hosted app
What method is right for me?
It depends:- analyze your requirements- keep in mind all cons & pros for every method