Question

I am working on SharePoint 2013 server and I like the idea of creating site columns & content types using visual studio as this allow me to easily manage the artifacts among my different farms, dev, UAT & live.

Now I used to create these artifacts, using the following steps:

  • Inside VS 2012, create a new sandbox solution.
  • add new item of type site column OR content type.
  • deploy the solution into my SharePoint site collection gallery.

Now I have these questions:-

  • I read that sandbox solution is not preferred in SharePoint 2013 and we should use the app model. So is creating artifacts an available approach to do inside SharePoint apps?

  • if the answer for the above question is yes.. then what will be the benefits of using APPs over sandbox solution , for crating artifices ?

  • why all the tutorials which i read ,, create sandbox solution rather than farm solutions when creating site columns ? what is the idea ?

Was it helpful?

Solution

I read that sandbox solution is not preferred in SharePoint 2013 and we should use the app model. So is creating artifacts an available approach to do inside SharePoint apps?

Yes there are multiple available approaches. The one I use the most is (for provider hosted add-ins) to use a remote event receiver on AppInstalledevent. In the event receiver you can then use CSOM to create your artifacts

if the answer for the above question is yes.. then what will be the benefits of using APPs over sandbox solution , for crating artifices ?

The main benefit is that you are not using depricated technologies, meaning that the code is more future proof. Also you are able to (contrary to creating with pureXML definitions) debug the provisioning code if needed.

why all the tutorials which i read ,, create sandbox solution rather than farm solutions when creating site columns ? what is the idea ?

I personally have found guides using both approaches. But, that said, the main idea behind using sandboxed solutions instead of farm solutions was (and is) that sandboxed solutions makes a smaller impact in the server farm since they run in isolation and should not be able to impact the overall performance of the farm in a huge way.

With a farm solution you can (if you are careless) impact the overall performance in a bad way since all your code executes in the same processes as the main SharePoint functions.

More info about the differences can be found in this post

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top