Search This Blog

Showing posts with label SharePoint Add-ins. Show all posts
Showing posts with label SharePoint Add-ins. Show all posts

Thursday, April 7, 2016

Working With SharePoint 2013 APP - Three SharePoint 2013 App Deployment Models

What are the Three SharePoint 2013 App Deployment Models?

  • SharePoint-hosted
  • Self-Hosted
  • Automatically Provisioned Azure Web Application


SharePoint Hosted Apps:

When the app is hosted in SharePoint itself, the code is only in HTML and JavaScript and is hosted by SharePoint.A SharePoint-hosted app may provision basic resources into its app web such as HTML/CSS/JS files, site column/content type/list definitions, etc. 
Under no circumstances can server-side code run within a SharePoint-hosted app.

In the SharePoint-hosted deployment type model, a new isolated subweb known as app web is created under the parent site called the host web,for hosting app. The app web keeps all the app content such as lists, workflows, pages, out-of-webparts and so on. 
The app code runs in the client browser which can use only HTML and JavaScript with CSOM / REST API and not any server side code.

Provider Host Apps:

In a provider-hosted app, you are responsible for the infrastructure (again, external to SharePoint) where your app runs. You have lots of flexibility in the sense that you can run full-blown server side code and even take advantage of frameworks like ASP.NET MVC 
(or even use Java, PHP, or other non-Microsoft technologies as well), but you are also responsible for things like tenant isolation.



You or your app purchaser’s IT department must host a provider-hosted app on a dedicated server or third-party hosting service. Depending on your choice, these apps run either on your server or in the cloud. A provider-hosted app can also include SharePoint components that run in SharePoint, so it can be mixed in its hosting

The Provider-hosted deployment model is almost same as Auto-hosted model, the only difference is that the app code resides in an external domain or server i.e. your own hosting environment which may not be necessarily be windows-based. The app code can be written in any programming language and technology like PHP, .NET or Java. 
In this scenario, SharePoint acts only as launching pad for the external app. 

Auto-Hosted App:

In this cloud model, though the app is developed for SharePoint but the app code resides outside of the SharePoint on Microsoft Windows Azure in the background, 
which can also have access to Microsoft SQL Azure database for managing data. The app is automatically deployed to Windows Azure and SharePoint creates a cloud-hosted app on your behalf. Auto-hosted model is supported on SharePoint Online only unlike the other deployment models.



Working With SharePoint 2013 APP - Introduction

Apps for SharePoint or SharePoint Add-ins:

First, a quick background: 

SharePoint 2010 introduced the sandboxed concept, the predecessor to SharePoint Apps, but it offered limited access for developers at the site-collection level. It had many issues and had to work under several code access security (CAS) policies. What grew out of that was the need for a new concept that would allow developers to become more productive, 
efficient and have more freedom and, thus, SharePoint Apps.

One of the important things to note is that a SharePoint App creates a sub-site of the site where the app is installed and supports creating lists, defining properties and so on.

Microsoft set out to create an extensibility point in SharePoint 2013 that would allow customers to build their own solutions for SharePoint without hurting the hosted model whenever a customer’s code was found to be ‘executionally challenged’. They came up with a model called a SharePoint App, which is simply a solution with no SharePoint server side code.

Here are some important notes to be made on SharePoint Apps when compared with farm solutions:

1. App code never runs within the SharePoint host environment.
2. Apps have two scopes: They can work within the scope of a SharePoint site, as well as with a special SharePoint site        called the App Catalog.
3. No down time is required for the whole environment when an app is being upgraded.





Restricting Custom People Picker to only one Sharepoint group programatically

Refer the following script files in your page,     <!-- For People Picker -->     <script type="text/javascript" src...