vendredi 30 janvier 2015

Deploying an HTML App to Multiple Sites

I am developing an HTML app for SharePoint Online. This will be a hybrid app which will consist of an HTML page, JavaScript and CSS files, and image resources.


This app will be hosted on a page in a content editor web part - The HTML file will be linked to the content editor web part. It will use ECMAScript CSOM to communicate with SharePoint and use jQuery for performing some DOM manipulations on the page. Since I have to do DOM manipulations in the host site, I cannot opt for a SharePoint-hosted app (which runs in an iframe).


I want some opinions on how to distribute this app to multiple sites so that users can easily use it.


One option that I have thought of is to create a provider-hosted app and perform remote provisioning -



  1. Manually configure the content editor web part in any one site and export it as a DWP file.

  2. Modify the DWP file and add a token for dynamically replacing the HTML file's path per site.

  3. Iterate through each site I want to deploy to (List of sites can be stored in a configuration file).

  4. Deploy all the required resources to each site, along with the DWP file (to the web parts gallery). Before deploying the DWP file, replace the HTML file path token with the actual site URL.

  5. Users will be able to see the web part when they click "Add a Web Part" in an edited page.


But, I am thinking if there is some other way this can be achieved. Because, I can deploy the current package to 1000 sites today, through the approach mentioned above, but what if some user wants to use it in 1001th site? I will have to run the remote provisioning again and deploy the required artifacts.


Aucun commentaire:

Enregistrer un commentaire