itaysk

26 במרץ 2012

A while ago, Microsoft has released a CTP (Community Tech Preview) version for the SDK (Software Development Kit) of the next version of SharePoint (aka SharePoint 15). Browsing through it I have learned about the new concept of Apps in SharePoint 15 (codename). In this post I will share my findings and conclusions.

I start by noticing the SPApp object, that lies in the Microsoft.SharePoint.Administration namespace. It “Represents an app loaded onto Microsoft SharePoint Server and ready to be installed.” Right next to the SPApp Object, we see the SPAppCatlog class which “Represents all of the SPAppInstance objects installed on an instance of Microsoft SharePoint Server. It provides querying capabilities for discovering installations.”. Naturally, if we are going to have apps, we need some sort of an App Store to obtain apps from.

If we drill down a level into the SPAppCatalog, we will see that it has a GetAppInstance method, that “Gets all the SPAppInstance objects installed at a given SPWeb.”. Also, the SPAppInstance class says it “Represents an SPApp object installed to a specific SPWeb site.”. So apps are scoped to the SPWeb level – cool.

Continuing to the SPWebApplication class, we find that is has a new method called IsUserLicensedForEntity, that “Checks if the currently logged in user has the proper license to access the specified entity.” If we going to have an App Store like system, we need to have a mechanism to enforce licensing.

What more do we know about apps from real world? They need your permissions to access your data. This is usually done (in real world) with the OAuth protocol, and SharePoint 15 apparently supports this too! There’s a new namespace called Microsoft.SharePoint.IdentityModel.OAuth2 that will probably contain the basis for this, and some classes in Microsoft.SharePoint like SPApplicationCredentials and SPAppPrincipalPermissionsManager that will probably allow programmatic handling of permissions.

There’s another new namespace called Microsoft.SharePoint.Administration.AppDeployment that contains two classes – DatabaseProviderConstants, and DatabaseProviderTypePersistedObject. So there’s apparently something with a database for an app. The SPWeb class also has new properties regarding App DBs – for example the AppDataBaseName property that “Gets the name of the app database associated with this Web.”. Frankly, this is still a mystery for me since it’s use is not documented in the CTP SDK, and not very self explanatory.

In conclusion:

SharePoint has a new concept of Apps

Apps are scoped to SPWeb

Apps are distributed via the AppCatalog

There’s built in support for licensing apps

Apps can ask for permission using OAuth

There’s something with app databases yet to be clarified

This is a very interesting direction that the SharePoint team is taking, and probably revolutionary in the SharePoint world. I hope we can here more details soon.