none
SharePoint Addin RRS feed

  • Question

  • Hello,

    We can do most of the work with content editor webpart that we can do with SharePoint hosted Add in. Then why we use SharePoint hosted Add in.

    Regards,

    Nilanjan

    Monday, October 7, 2019 2:53 PM

All replies

  • Here you go

    This boils down to the effort required for building app and the requirements to use either Content Editor or SharePoint Add-Ins. Content Editor is useful for building quick functionalities but the requirements which require complex stuff like Integration with External System SharePoint Addins are the best best.

    For Content Editor Web Part, it usually used for build a simple function with Angular JS, such as a simple render or a quick test, check this demo:

    Use Content Editor Web Part And AngularJS Link In SharePoint Online

    For SharePoint Add in, it will usually handle a complex logic, such as cross domain Rest API data call or some others handle with Angular JS, check this demo about using Angular JS with SharePoint add-in:

    Use AngularJS In SharePoint -- Hosted Apps illustrated

    In a conclusion, it will up to your business requirement, you can choose the suitable way by yourself.


    Please remember to click Mark as Answer on the answer if it helps you

    Monday, October 7, 2019 5:11 PM
  • Hi Nilanjan,

    as per my personal experience and knowledge you should be using content editor web part only to add html content on page, If you want to add scripts then use script editor web part.

    why you should use sharepoint add in - 

    It's easier to manage. Consider an app installed in app catalog and installed to 100 site collections compare to injecting script editor web part in each site collection. What if in future you don't want that functionality? In case of script editor web part you are going to right some power shell to delete script editor web part but in case of app you can simply uninstall it from app catalog. The same principal applies for update as well. You can push future updates easily as compare to script editor web part.

    Making cross domain calls within sharepoint and out side sharepoint is easy with the help of web proxy and request executor. 

    You can share your apps outside your organisation using app store.  

    So if your customization is small then it's fine to go with script editor web part.

     


    K Mohit


    Monday, October 7, 2019 6:15 PM
  • Hi Nilanjan,

    Agree with Lakshmanan's and Mohit's suggestions. 

    In Conclusion, if you will need to make complex cross Domain Rest request and use App Only Permission instead of real user permission, then it's suggested to use SharePoint Add-in.

    If you only want do some CRUD operation for list, then use Content/Script Editor Web Part with JSOM or Rest API is enough.

    Thanks

    Best Regards


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Tuesday, October 8, 2019 9:10 AM
  • Adding to Jerry's reply - App only policy wont work for sharepoint hosted add in. App only policies will only work for provider hosted add In. Yes setting's are there inside app manifest to configure it but it wont work -

    https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/add-in-authorization-policy-types-in-sharepoint?redirectedfrom=MSDN#Approve


    K Mohit

    Tuesday, October 8, 2019 10:10 AM
  • Hi All,

    Yes, App Only permission can only be used in Provider Hosted Add in. Thanks Kumar for suggestion.

    Thanks

    Best Regards


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Wednesday, October 9, 2019 1:37 AM
  • Thank you all for the suggestions. Really appreciate. 

    1 small question in this: If all the small functionality of SharePoint Hosted Add in can be done by script editor / content editor webpart we can use the later. But from the developers point of view which one is more secured?

    Thursday, October 10, 2019 3:55 AM
  • Hi Nilanjan,

    This will also based on buiness requirement as specified above, if developers want to publish their code and release in SharePoint Add-in Store, then it's necessary to build Add-in. Otherwise, if only want to do some customization in a page, then script/content editor web part is enough.

    Thanks

    Best Regards


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Thursday, October 10, 2019 4:31 AM
  • Hi Nilanjan,

    Security should not be a concern from developer point of view. sp hosted add in uses internal authentication which will managed internally and script/content editor web part will use the authentication configured for web application. I think both are equally secured. 


    K Mohit

    Thursday, October 10, 2019 9:52 AM