When to choose SHA or PHA.
- SHA: SharePoint Hosted App
- PHA: Provider Hosted App

Apps Overview
As we all know, Apps are the preferred programming model for SharePoint 2013. Microsoft introduced the App Model in SharePoint 2013.
Apps provide the following advantages:
- Code outside Server
- Discoverability
- App Store Eco System
- Easy Installation
- Easy Un-installation
Advantages of SHA
SharePoint Hosted Apps are those in which the code is hosted in the SharePoint server. Since the App contains the JavaScript Object Model (JSOM) the execution occurs in the client side.
A pure HTML/JavaScript based application can be built using this approach.
Advantages of PHA
Provider Hosted Apps are those in which the code is hosted outside the SharePoint server. Since the App can contain both JSOM and CSOM the execution happens in another server or in the client side.
Remote Event Receivers, Custom WCF Services, Protected Business Logic can be done using this approach. ![]()
Since PHA is hosted in an external server, there requires a server-to-server trust using certificates. The trust can be Low Trust or High Trust depending on your requirements. This certificate configuration would be an additional configuration overhead going with PHA.
When to choose SHA
The following are the reasons to go with SHA:
- If you want to publish an Office App Store, then go with SHA
- If you have just HTML/JavaScript code, then go with SHA
When to choose PHA
The following are the reasons to go with PHA:
- If you have proprietary business logic, then go with PHA
- If you have custom services to be created, then go with PHA
- If you have custom event receivers, then go with PHA
- If you want to integrate an existing ASP.NET application, then go with PHA
- If you have difficulty in finding JSOM resources, then go with PHA
We are not discussing Cloud Hosted Apps (CHAs) here since it has been deprecated.
References
http://msdn.microsoft.com/library/office/dn268593.aspx
Summary
This article explored SHA vs. PHA.

Sumit KumarPosted Jul 9, 2020, 1:21 AM
Thanks for the sharing article abt SHA and PHA. please publish on blog PHA for SharePoint 2019. Thanks
Amit KumarPosted Feb 19, 2015, 5:08 AM
Sir, I want to know the scenario where REST API/ OData should be preferred than CSOM. Pls give an example and also share the link for using REST....
Jean PaulPosted Feb 16, 2015, 10:04 AM
Dear Amit, Apps are used to remove server-side coding OR to publish solution to a broader market space like App Store OR for O365 custom solutions. Also, Nowadays more & more clients are preferring App Model
Jean PaulPosted Jan 20, 2015, 8:33 PM
Thank You Tarun & Archana. I hope I know you all.. :)
archana singhPosted Jan 20, 2015, 8:31 PM
Nice one Jean!!!
Tarun DPosted Jan 20, 2015, 1:14 AM
Thanks for sharing
Jean PaulPosted Jan 16, 2015, 2:10 PM
You are Welcome Amit! Happy SharePointing.. :)
Amit KumarPosted Jan 16, 2015, 12:49 PM
Very new terms for SharePointers......Thanx
Jean PaulPosted Jan 12, 2015, 12:23 PM
Thank You Vithal!
Vithal WadjePosted Jan 12, 2015, 2:01 AM
thanks for sharing ,nice explanation