Let me draw an example:
Due to the new SharePoint 2013 model, if you have the same problem as before, you cannot deploy the contents in the _layouts directory if you want to release a 100% compliant Office 365 app.
So, for example, if I developed 4 apps in my DEV environment and I used a mixed solution like deploying a Farm WSP with all my shared contents in the _layouts directory these coming to be unusable on SharePoint online.
The best options to share your contents are to adopt one of the following two:
- SharePoint Web Application
- Azure
- ASP.NET Web Application
- Blob storage
- CDN
So if you start to use one of those options you'll start to implement an architecture like this:
SharePoint Web Application
The idea behind is something that comes from the old versions of SharePoint. You could deploy a web application and have it in an assets library, anonymously accessible if you need, where the web parts or the apps can access to download them.
This solution is restricted because the boundary is the SharePoint farm where the SharePoint Web Application lives.
If you have an app installed outside your farm (and it should be the usually), you have to configure your farm to give the access from outside. That makes it hard to maintain, and also unsafe for your LAN.
Azure
ASP.NET Web ApplicationI picked up this idea from Chris O'Brien. He uses this solution as his choice.
The easy idea is to use a public web project on azure. So you should have a web site published on Azure:
and through VS 2012 you can deploy your assets:
Blob storage and CDN
Windows Azure Blob is a service for storing large amounts of unstructured data that can be accessed from anywhere in the world via HTTP or HTTPS.For more information about the blob storage you can read the following link: http://www.windowsazure.com/en-us/develop/net/how-to-guides/blob-storage-v17/
The CDN is an option of the blob storage and that is a global solution for delivering high-bandwidth content by caching blobs and static content: http://www.windowsazure.com/en-us/develop/net/common-tasks/cdn/
To upload the files on your blob storage you can develop your own client or you can use something that exists already, like this: http://azurestorageexplorer.codeplex.com/
You just have to create a blob container on your Azure, for this example I created the images container:
this is my blob service with the CDN option enabled:
and this is my images container:
cool eh!? :)
Ok now that your Share Content Environment is ready you can refer to it with code.
Some considerations
Sharing contents between apps shouldn't be usual but could be if you have to develop more than one app for a client project (same logos, same css, shared javascript!).
IMHO these are the best solutions you could implement.
If you have some other ideas, please let me know ;)
No comments:
Post a Comment