Jean Paul's Blog

There are 2 types of People in the World, One who Likes SharePoint and..

    Advertisements
  • Microsoft MVP

  • MindCracker MVP

  • CodeProject MVP

  • eBook on SharePoint 2010

  • eBook on Design Patterns

  • eBook on Windows Azure

  • NLayers Framework @ CodePlex

  • MSDN Forums

  • .Net vs. Java

    Due to Public Demand
  • Advertisements

Posts Tagged ‘sha’

SharePoint Hosted App

Posted by Paul on April 24, 2015

In this article we can quickly create a SharePoint Hosted App on SharePoint 2013 On-Premises.

About SharePoint Hosted App

SharePoint Hosted App (SHA) will have all components deployed to SharePoint server. Optionally there can be JavaScript components running in the client side.

App Pre-Requisites

You should have the following pre-requisites done to create a SharePoint Hosted App.

http://www.jeanpaulva.com/index.php/2015/04/25/app-development-pre-requisites/

Steps

Open Visual Studio 2013 in Administrator mode. Choose New Project > SharePoint > App for SharePoint 2013 option as shown below.

image

In the next dialog choose the SharePoint-hosted app option.

image

You will get the following items created in Solution Explorer.

image

Examining the Content

The Page default.aspx is the main page.

image

The page displays a Hello message with the current user name. The current user name is displayed using a JavaScript which you can find in the App.js.

image

References

https://msdn.microsoft.com/en-us/library/office/fp179930.aspx

Summary

In this article we have seen how to create a SharePoint Hosted App.

Advertisements

Posted in SharePoint, SharePoint 2013 | Tagged: , | Leave a Comment »

SHA vs. PHA

Posted by Paul on January 6, 2015

In this article we can explore when we have to choose SHA & PHA.

1. SHA – SharePoint Hosted App

2. PHA – Provider Hosted App

image

Apps Overview

As we all know, Apps are the preferred programming model for SharePoint 2013. Microsoft introduced App Model in SharePoint 2013.

Apps provide the following advantages:

1. Code outside Server

2. Discoverability

3. App Store Eco System

4. Easy Installation

5. Easy Uninstallation

Advantages of SHA

SharePoint Hosted Apps are those in which code is hosted in the SharePoint server. Since the App is containing JSOM (JavaScript Object Model) the execution happens in the client side.

Pure HTML/JavaScript based application can be built using this approach.

Advantages of PHA

Provider Hosted Apps are those in which code is hosted outside the SharePoint server. Since the App can contain both JSOM & CSOM the execution is happens in another server or in the client side.

Remote Event Receivers, Custom WCF Services, Protected Business Logic can be achieved using this approach.

Since PHA is hosted in an external server, there requires a server-to-server trust through certificates. The trust can be Low Trust or High Trust depending on your requirement. This certificate configuration would be an additional configuration overhead going with PHA.

When to choose SHA?

Following are the reasons to go with SHA:

1. If you wanted to publish in Office App Store, then go with SHA

2. If you have just HTML/JavaScript code, then go with SHA

When to choose PHA?

Following are the reasons to go with PHA:

1. If you have proprietary business logic, then go with PHA

2. If you have custom services to be created, then go with PHA

3. If you have custom event receivers, then go with PHA

4. If you wanted to integrate existing ASP.NET application, then go with PHA

5. If you have difficulty in finding JSOM resources, then go with PHA

We are not discussing CHA (Cloud Hosted App) here as it has been deprecated.

References

http://msdn.microsoft.com/library/office/dn268593.aspx

Summary

In this article we have explored SHA vs. PHA.

Posted in SharePoint, SharePoint 2013 | Tagged: , , | Leave a Comment »