6

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 ?

1
  • 3
    You actually asks like three different questions at once. As usual, try to only ask one question per post to allow users to fully answer each of the questions without answering them all Mar 15, 2016 at 9:22

1 Answer 1

9
+100

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

4
  • 1
    The Office PnP also have some samples: For example, github.com/OfficeDev/PnP/tree/master/Samples/… Mar 15, 2016 at 11:39
  • Yepp, there are great resources in the PnP. I've used the PnP cmdlets a lot lately with PowerShell Mar 15, 2016 at 11:40
  • @RobertLindgren now i always read that using App is preferred since it provide more future prove solution, unlike using deprecated technologies such as sandbox and farm.But are sandbox and farm really deprecated ? since i read that one SP 2016 it support fully trust solution + farm + sandbox,and who knows maybe on SP 2019 it will also support them. so i can not really understand if i have on-premise sharepoint what will be the benefits of using App compared to sandbox and farm, as i mentioned SP 2016 support sandbox and farm solutions,, so do u still consider these solutions deprecated !!
    – John John
    Mar 22, 2016 at 0:50
  • Yes I do, Microsoft has explicitly told us sandboxed solutions is not the way forward and launched the add-in model as a substitute. Regarding farm solutions, yes they will continue to work for now. But only in an on-premise environment, you will never be able to deploy a farm solution to the cloud making it more difficult for your clients to migrate to the cloud (there is no doubt that Microsoft wants as many of their SP users in the cloud as possible). So when developing new solutions to day your number one choice should be to write an add-in (in my opinion). Mar 22, 2016 at 6:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.