6

When we create a new app in Visual Studio, we are given the option to select an hosting model:

enter image description here

What are the differences between the various models?

SPArcheon
  • 6,868
  • 1
  • 30
  • 47
HelloWorld1
  • 1,035
  • 7
  • 17
  • 23

2 Answers2

5

So, a quick introduction of the different hosting options. It is really based on your requirements which one you should / need to choose.

Note that it is possible to mix the different patterns as well

All quotes and images from MSDN:

SharePoint-hosted App

Start with the simplest option: SharePoint-hosted apps, or apps where all components are hosted on either an on-premises or Office 365 SharePoint farm. SharePoint-hosted apps are installed on a SharePoint 2013 website, called the host web. They have their resources hosted on an isolated subsite of a host web, called the app web. It’s important to know the difference between host webs and app webs.

enter image description here

Provider-hosted App

Provider-hosted apps for SharePoint include components that are deployed and hosted outside the SharePoint farm. They are installed to the host web, but their remote components are hosted on another server.

enter image description here

Autohosted App (Now Deprecated!)

Autohosted apps for SharePoint are cloud-hosted apps whose remote components are provisioned and deployed for you on Windows Azure. As with a provider-hosted app, an autohosted app for SharePoint can interact with a SharePoint website but also uses resources and services that are located on a remote site that is hosted by Windows Azure. The SharePoint 2013 installation provisions and deploys these resources for you.

enter image description here

So, there you go! Now you should have enough info to determine which option to choose.

Robert Lindgren
  • 24,520
  • 12
  • 53
  • 79
0

As a default I would choose SharePoint hosted. If you can't live with the restrictions on hosting the app on SharePoint, then go for either autohosted which will put it in the cloud for you and still have some restrictions or Provider hosted where you'll have to source you own server to host it on but have full control.

Ian
  • 580
  • 3
  • 7