I have Custom WebParts using server-side usercontrols in SharePoint 2010. I would like to migrate or rewrite these WebParts for SharePoint online/O365.
These WebParts are using SQL heavily and the requirement is to store nothing in a SharePoint List. I want to both query from SQL and store in SQL but show the data in a Gridview on SharePoint online. The user should be able to edit the data from SharePoint but update straight to SQL.
What are my options and the best way to build this application/WebParts for SharePoint online?
I would suggest you two options.
You may need to create a API layer(may be exposed as REST) that would talk to your SQL & read/update data for both options.Â
- Create a SPFx add-in that would call the api to do your read/write operations. SPFx is a client side components & hence if you have security concerns pertaining to the data, avoid this option & go to option 2Â
- Create a provider hosted app, which would help you implement any level of customisations in a secured way. You also have the possibility of using user & app tokens so you can even elevate privileges.
To help with the answers, can you explain a little about why you don’t want to use a SharePoint List? Depending on your answer there could be other quick ways of doing this.