Wednesday, July 17, 2013

SharePoint 2013 - An introduction to SharePoint 2013 App Model

In this post we will discuss about the concept of SharePoint Apps, which is the most newly added aspect in SharePoint 2013. The app programming model helps to create rich apps and publish them in an Office Store or public market place. The app model focuses on the development by customizing and extending the SharePoint sites without full trust access to the target farm.



Why Apps Model?
1) First of all there is no dependency for custom code on SharePoint Server since it executes on Client-Browser or may be in some other scope like IIS or Windows Azure.
2) Apps communicate with SharePoint using Client side object model (CSOM) or Rest Services with OAuth being the authentication mode.
3) Remarkable usability in Tablets and Mobile devices.
4) One step ahead for development in future where cloud hosting could be more preferrable.
5) Moreover, in SharePoint 2013 everything is an app including Lists, Libraries etc.
6) SharePoint apps can be developed with any programming language or technology, provided they are hosted outside the SharePoint (autohosted or provider-hosted model).
7) SharePoint apps can be created using PHP, Java, or any other technology capable of communicating with SharePoint via the new REST API and the OAuth protocol.

Types of Configuration 
1) Full-Page: These apps have an independent UI irrespective of the Sites on which they are hosted. A "Back" button should be provided to navigate back to the parent site which triggered the app.
2) App Parts: App parts renders inside an IFrame from whithin the pages of the parent site. They are also known as Client Parts.
3) UI command extension: These apps are used to extend the UI of the parent site. For example, you can create an app to add a new button to the ribbon.

Types of Hosting
1) SharePoint-hosted: These apps are hosted on the SharePoint Farm within a subweb of the parent site and are capable of using the various SharePoint artifacts such as lists, fields, content types, webparts etc.
2) Auto-hosted: These apps are hosted on Microsoft Windows Azure.They can communicate with SharePoint through events or Client Object Model. "OAuth" is used to enforce secure communication.
3) Provider-hosted: These are very much similar to the Auto-hosted apps, the only difference being that they are deployed on an external hosting enviornment other than SharePoint enviornment and does not necessarily use the Windows Azure environment.

Security Perspective
From a security point of view one can trust SharePoint 2013 app model to be thouroughly secured.
A definite set of permissions are requested by the SharePoint App when it is installed. The app will be installed only if the current user can grant the requested permissions, otherwise the app will not install. Pretty straight formward. Isn't it!!

App Development environment
1) "Napa" office 365 dev tools: This tool is purely client side and ideal for creating SP hosted apps. It doesn't support code behind you can view only markup. Developers can also create apps for Office in a web-based environment hosted in Office 365. Previously code-named “Napa,” this subscription-based online experience is being updating on a weekly basis, according to Microsoft. It consists of a SharePoint site in Office 365 configured for apps and the "Napa" Office 365 Development Tools. You can sign up for the Office 365 Developer Site on the Microsoft web site. The subscription costs $99 per year. But Visual Studio Ultimate and Visual Studio Premium with MSDN subscribers receive a one-year Office 365 Developer Subscription as a benefit, and Office 365 Plan E1 or E3 customers can provision a Developer Site as part of their subscription. A 30-day trial is available.

2) Visual Studio: For developing apps using Microsoft .NET and Microsoft Visual Studio 2012, you will need the Office Developer Tools for Visual Studio 2012, which can be downloaded and installed through the Web Platform Installer 4.0 tool.

You also will need to install the following tools and libraries:
i) SharePoint client components
ii) Windows Identity Foundation SDK
iii) Workflow Tools SDK and Workflow Client SDK
iv) Windows Identity Foundation SDK and Windows Identity Foundation extensions

Note:- If you are working on a server with SharePoint 2013 installed, you need to add only Visual Studio 2012 and the Office Developer Tools for Visual Studio 2012. All the other libraries and tools are already part of the installation set of any SharePoint 2013 environment.

App Deployment
There are three ways that you can access CSOM functionality, so the deployment model that you are using for your SharePoint 2013 app will determine the option that you choose.
1) .NET / Silverlight API
2) JavaScript API
3) REST API

No comments:

Post a Comment