SharePoint 2013 App Models

by Oguz Alpoge
September 15, 2014

SharePoint technology and architecture is undergoing major changes because of the ever increasing demand by mobile devices.


We need to understand the new SharePoint 2013 App Models

In SharePoint 2013 there is a design goal to move the application code off of the SharePoint server. With this evolution, server-side code is minimized. Client-side application code is emphasized utilizing APIs, HTML5, CSS and JavaScript.

SharePoint 2013 has new application models (app models) which are very cloud centric. You may deploy your code into the cloud or to an on-premises IIS server. In the non-cloud (on-premises) deployment the application will run on the local IIS web server. The full SharePoint server is also on-premises. In the cloud application model, the application code runs in the Windows Azure server domain, which is at the data centers of Microsoft, thus off-premises. There is a new .APP configuration file. It enables us to deploy the application code either to the cloud or to the on-premises IIS web server.

SharePoint 2013 applications have two components:
1) The configuration file (.APP)
2) The assemblies that execute the code.

Cross-domain calls are managed and authenticated with OAuth. Data is accessed with REST and OData.

There are three app models:
1) SharePoint-hosted
2) Autohosted (on Microsoft Azure)
3) Provider-hosted

SharePoint-hosted

In the SharePoint-hosted model, there is only client-side JavaScript code (JSOM, JavaScript Object Model). It is good for light-weight apps. But you still have powerful capabilities to access SharePoint data (like lists) through REST web services.

Autohosted

In the Autohosted model, the application code is deployed to an automatically created Office 365 Azure server, which is in a separate domain from the SharePoint server. You have limited control over the Azure servers and you receive one single subscription bill from Microsoft Online Services for the entire environment. You utilize CSOM (client-side object model) with C# or VB.

Provider-hosted

The application web page resides on a different off-premises server. It could be on an Azure server or on an IIS web server or another type server. It does not need to be based on ASP.NET. It could very well be PHP or JSP based. You can still integrate this application with the SharePoint server. This is richer and more flexible. In this case, you have more control, management (of updating, integrating, testing) and ownership on the SharePoint server and code installations and billing.

Examples of JSOM (JavaScript Object Model) API for SharePoint List access

CSOM JSOM API Examples CSOM JSOM API Examples

Evolution of utilizing JavaScript Object Model (JSOM) and JavaScript frameworks like AngularJS

It is a recent evolution of 2014 to start considering Single-Page Applications (SPAs) in a SharePoint environment. A SPA can be created with JavaScript frameworks like AngularJS. AngularJS is based on client-side MVC (model-view-controller) and MVVM (model-view-viewmodel) design patterns.

In order to become more and more mobile-friendly, Microsoft in general and SharePoint teams in particular started embracing more efficient technologies of client-side frameworks. It will be interesting to see what next few years will bring to our desktops, mobile devices and internet-of-things (IoT) devices. Hiring managers and head-hunters are now looking for talent with such client-side experience.

For gaining hands-on experience with this technology in a classroom and team setting, we strongly advise you to take the following course:
  Advanced SharePoint 2013 Development