Wednesday, March 20, 2013

Sharepoint 2013 - App Model

App Model is the major and interesting change from SharePoint 2010 to share point 2013. It brings a new set of opportunities from development environment. Before going to app model, we can check few things,

What are development models we have in share point?

  • We have Solution Package model and Client object model and Ecma Script Object model. Solution Packages models are farm solutions and Sand Boxed solutions  Extended in SharePoint 2010) are not deprecated or not going away. There is no change in both of them.
  • App model will not support SharePoint Server side code. there is no chance of access like Sand boxed solutions. All the code must be run in client side (JavaScript) or out of share point (like Azure or other hosting Plat forms), just connect back to share point remotely.
  • Only SharePoint 2013 will support App Model  There is no support for earlier versions of share point yet.
Why App Model?

In SharePoint 2010, with farm solutions, custom code was deployed into server. All the things will deployed to the server means an IT consultant with console access would need to upload the solution package to the server. So that the Access must be required to deploy the solution in farm level. This will only works On Prem environment. It will not suitable for hosted deployment. Both Farm and Sand Boxed solutions developer need to have full understanding on the server and command on sever API.Farm solutions are not suitable for cloud environment. We can use sand boxed solution on cloud environment, but there is lot of limitations put users off from it. For example we cannot call External Web services from sand boxed solutions and we can only access limited set of SharePoint API's.

App model is mainly designed for cloud hosting. It will not use server side code. It will use only client script like java script or jQuery, and will work on top of share point framework. So that it will keep environment light. you can easily migrate the apps and easily add the apps from app store.

App Isolation- 

Apps are isolated. One app cannot talk with other app. When we install app share point will create a sub site in the existing site like as : http://app-APPID1.apps.domain.com/AppName- here apps will run under a separate domain. APPID will generated for share point.

There is no alternative way to call the app with out URL  If you want to try to call the app from parent site (i mean site which app was created or app was installed) it access to URL only. The reason here isolation. Apps will run under a separate domain, If in case apps will run same domain, here apps will use java script to access data. That will cause security issue. So that Microsoft people elected to go for another domain and that will unique for app. So that we can skip cross site attack.

We can present the app in three ways to the customers-

  • Immersive App: Here app will take an entire page and when we click on the app it will redirect to a page. Every App has this functionality because every app app has a start page.
  • Part App: This is app is located in a part of a page, similar as web part  Suppose we have map app..it just provide a widget to show the location.
  • Custom Action App: Here app will be shown in a ribbon control or as menu item. For example we can take print option.
Scope of an App-

There are two choices to build the app scope

  • Web Scoped: Web scoped apps will live only with in the app web.
  • Tenant scoped: we can publish the app to the entire company or to the public scope.
Availability of Apps -

Just like Mobile apps we have a market for share point apps and we can acquire or buy the apps from app market. There is a private market place for employee in corporate company. Microsoft is having market place in cloud. Developers can develop their apps and sell it through Microsoft app market. There is more chances to launch third party market places and sell the apps. This will get more spice to the app market and help boosting the competition.

Types of Apps-

There are three types of app development models are available to build apps.

  • SharePoint Hosted Apps: Here in this option every thing in SharePoint "With in SharePoint Only". When you install the app, a new site will create with in the share point and will keep all the app content in share point  app content will be lists, Pages, Site Columns  Content Types etc. All the process will happen in client browser using client side scripting.
  • Developer Hosted Apps/ External Apps: In this scenario all the logic will be external to share point  Logic may be in any technology like .net , Java, PHP...and on any infrastructure like IIS, Apache ... Here share point will work as a Launching pad. That might do anything. Here the name "Developer/External" comes that developer or external is the responsible for the code.
  • Azure Or Auto Hosted: Here App will be located in cloud. When ever developer download the app from cloud and installs it in site, app will automatically create site and also provisions a new azure website. We can build this type of app and host in cloud. 
What i need to do to develop Apps?

Before developing and deploying apps, we need to do some configurations,

  • Subscription service and App Management service must be running for apps usage.
  • we need to create the DNS domain to create the unique URL's for app.

What we can do with apps?

  1. We can write remote event receivers
  2. Deploy new fields based on existing field types
  3. Can provision lists, Content types  with in app website.
  4. We can have custom application pages to work
  5. Can consume custom web services.

What we can't do?

  1. Custom Site Definitions
  2. Delegate Controls
  3. Custom Themes
  4. Custom Action groups and Custom Hidings
  5. Custom User Controls
  6. Timer Jobs
  7. Workflows


Thanks for Salman Blog and Andrew Connel to providing very useful posts on App model. 



Share this