Jul 17, 2012

Apps in SharePoint 2013 - A New Developer Paradigm

As I first saw SharePoint 2013 I was really surprised. I had just expected some enhancements to the Farm and Sandboxed Solutions model, but the product team unveiled a completely new development model. This doesn’t mean that the old stuff will not work anymore, but the new model seems to be preferred for a couple of reasons.

Why the hell do we need a new development model?

Custom Code

Within the last few years SharePoint becomes the fastest growing server technology ever. Microsoft sold over 100 million SharePoint licenses. This fact made SharePoint very attractive for partners. Currently almost every Microsoft partner is developing SharePoint solutions – more or less successful. There is one problem, SharePoint development isn’t easy, it’s complex and error-prone. Learning it could take years. And the fact that each bad farm solution could break your whole SharePoint farm doesn’t make the situation better. Guess what Microsoft’s support case #1 for SharePoint is?

Sandboxed Solutions

Don’t want to talk much about Sandboxed Solutions. Sandboxed Solutions has been an approach to address the above mentioned issue with farm solutions and to get an extension model suited for hosted multi-tenancy environments like Office 365. But in many cases the model is to restricted. For example there are no off-box connections. Most the time you just use the sandbox to roll out some JavaScripts using ClientOM and Web Services. I believe that the sandbox solutions model will not succeed.

Developers

There is a highly increasing demand for SharePoint developers. But unfortunately there aren’t many good SharePoint developers and becoming a good SharePoint developer can take years. Currently there are only few SharePoint developers but about 10 million non SharePoint developers world wide.

Standards

HTML5, CSS, JS and railed development are going to dominate the next decade of web development. SharePoint is based on ASP.NET Forms. Most web developers don’t like ASP.NET Forms, because it produces ugly HTML.

Identity Management

In a more and more connected and service oriented world, identity management is from vital importance. It seems that OAuth 2.0 have a promising future.

The App Model

Microsoft’s solution for all this issues is the new App Model. The App model in SharePoint 2013 is based on web standards: HTML 5, CSS, JS, OAuth 2.0 and OData. The dev model is similar to dev models like the one from Facebook. This opens SharePoint development to about 10.000.000 million potential developers.
Microsoft invested a lot in making most of the SharePoint API functions remote accessible. A remote interface is much easier to maintain and more secure. Developers will not be able to do all the hacks and workarounds they did before (SharePoint developers usually spend most their time doing exactly this ;)
The new paradigm is: no server-side code on the SharePoint box.
This is not something bad, this absolutely needed and addresses the issues with farm and sandboxed solutions. The idea is, let you server-code run on a remote box and callback to SharePoint through the OData based remote API. Because OData is a standard it doesn’t matter, which programming language do you use. C#, Python, Ruby, Java, PHP, NodeJS, it’s up to you. I really appreciate this strategic decision. SharePoint isn’t a real application platform. SharePoint is a portal, a door to the world of information within your company. It is a collaboration platform. On the other hand Azure is a real application platform. But both together are a perfect match.

Different Types of Apps

SharePoint-hosted apps

Provisions an isolated sub web on a parent web. The app webs site gets it’s own unique sub-domain (browser cross domain policy). This is important to separate one app from each other app. Use lists, out-of-box web parts. No server-side code allowed, client JavaScript only.

Provider-hosted apps

Bring your own server hosting infrastructure. Use the programming language of your choice and callback to SharePoint via the OData API. There is also an option to create remote event receivers.

Autohosted apps

Windows Azure Web Site and SQL Azure Database provisioned automatically when app is installed.

Hybrids between SharePoint-hosted and self-hosted apps

You can combine SharePoint-hosted apps with remote apps.

How does an App looks like?

The main part on app is the app manifest:
<?xml version="1.0" encoding="utf-8" ?>

<App xmlns="http://schemas.microsoft.com/sharepoint/2012/app/manifest (http://schemas.microsoft.com/sharepoint/2012/app/manifest)"

ProductID="{5eccee90-1e41-4ecc-af8c-485facb5c188}"

Version="1.0.0.0"

SharePointMinVersion="15.0.0.0"

Name="LocalTheater"

>

  <Properties>

    <Title>Local Theater</Title>

       <StartPage>https://localhost:44303/Default.aspx/?{StandardTokens}</StartPage>
  </Properties>

  <AppPrincipal>

    <RemoteWebApplication ClientId="ca81d876-8525-44a8-8a60-e02ee79a4a6e" />

  </AppPrincipal>

</App>


The manifest contains an unique app id, the title, permissions and a start page. The example shows how to register a remote app. {StandardTokens} appends some standard url parameters to the request like the url of the SharePoint host site. The url of the SharePoint host site is important for callbacks from the remote app to SharePoint.

Marketplace

Microsoft also is going to introduce a commercial public marketplace for SharePoint and Office apps (Office apps are similar to SharePoint apps and will bring a new and unified web development model to the Office rich clients and web apps). 100 million potential SharePoint apps customers, or even 750.000.000 potential Office apps customers sounds very promising. Beside the public marketplace there is also the option to have a private corporate app catalog.

Summary

I think the SharePoint product group did a really good job with the new app model, the marketplace and the current SharePoint strategy. They did some really clever decisions!´


You can also check out the blog from Thorsten Hans. He’s also going to blog a lot about the new SharePoint app model…

7 comments:

Ali Miles said...

SharePoint is growing fast and this is one of the reason why it's thought about making it as an app development platform for 2013. I think this would be really interesting concept if it ever gets implemented.

Lucas Bird said...

An impressive share, i just given this onto a colleague who was little analysis on this.

Anonymous said...

Nice post! You can check more details about Apps here:
http://praveenbattula.blogspot.in/2012/08/sharepoint-2013-apps-overview.html

Bruno Austin said...

Now a time for go ahead.SharePoint 2013 is going very popular in market.i never done SharePoint application.because of i dont have microsoft office sharepoinr designer.

Dillon Levy said...

There is a very improving need for services for SharePoint designers,becoming a good SharePoint designer can take years.

Unknown said...
This comment has been removed by a blog administrator.
Suresh Pydi said...

Nice post. Here is the post explaining the basics of sharepoint App model,

http://sureshpydi.blogspot.in/2013/03/sharepoint-2013-app-model.html