Forum Discussion
SharePoint framework Vs SharePoint hosted add-in, when building CRUD operations
jcgonzalezmartin wrote:
I totally disagree here with AndreKrijnen....modern experiences in SPO are totally ready and the recommendation when developing custom functionality for SPO is to go to SPFx or to PowerApps depending on your requirements
I also agree with your point that the SP framework is ready to be used. but to keep my question specific, now in SP online classic experience, when we wanted to build advance CRUD operations, we use to do so using sharepoint hosted add-in, as it is very suitable for this. but SP-hosted add-ins option will not work with modern experience. so what is the official replacement for sharepoint hosted add-in which use SP rest api to implement advance CRUD operation? powerapps OR modern web part built using SP framework? let ignore the fact that powerapps currently can not be used by external users, to have more accurate comparison, as i think in the near future powerapps are supposed to work with external users.
Regards
john john Do you get an answer for your question? Should we go with App model or SP framework can help with CRUD operations given the modern experience it provides?
- Beau CameronJun 26, 2019MVP
Rishi Gupta john john Whether you are using modern or classic experience in SPO, the recommendation would be to use SharePoint Framework instead of SharePoint-Hosted Add-Ins. There are many reasons SPFx is preferred over Add-Ins - Performance, ALM/CI/CD support, Web Parts aren't hosted in IFrames and more. https://docs.microsoft.com/en-us/sharepoint/dev/spfx/enterprise-guidance
If you like SharePoint hosted add-ins because you like control of a larger page, or you are building a SPA... You can check out single part app pages https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/single-part-app-pages
You can do all the crud operations you want using SharePoint Framework.
Here is an example of doing CRUD operations with SPFx. If you take a look at this repository, you'll see a lot of other community built solutions.
https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/sharepoint-crud- Rishi GuptaJun 26, 2019Brass Contributor
Beau Cameron Thank you for your response. I am currently looking for solutions wrt SharePoint 2019. We are planning to host a Form in SharePoint which will save the data in a list and then calls REST API from another 3rd party system. The Third party system will talk to SharePoint hosted Form using REST calls and it will be two way communication. The reason I asked this is because in this case Provider Hosted application makes more sense to have greater control on the REST API as the calls will not be made in context to user but a separate account. Let me know if you have other thoughts.
- Beau CameronJun 26, 2019MVP
Rishi Gupta What service/API is it? Generally speaking, APIs may support client credential flows and not just user flows. Is this available to you?