I have some dynamic pages in my intranet website (CRUD operation plus search/filter). I have office 365 SharePoint online version. I want to develop client web part using reactjs and restAPI to work with my premise SQL server data. Is SPFx client webpart durable? Also how robust it is to achieve CRUD operations and filter/search using RestAPI development? I also might have to access the sharePoint files stores using SharePoint RestAPI or other methods if available. But most of the time I will be using my premise SQL server since I have lot of procedures already working in place.
1 Answer
You should look at SharePoint provider hosted add-ins for your case. In this way you can deploy your add-in as Azure Web app, create a site-to-site VPN with your on-premises data center (unless express route already exists in your environment) and use SQL server on premises data in your add-in through hybrid connection.
As per Microsoft, The SharePoint Framework (SPFx) is a page and web part model that provides full support for client-side SharePoint development, easy integration with SharePoint data, and support for open source tooling. With the SharePoint Framework, you can use modern web technologies and tools in your preferred development environment to build productive experiences and apps that are responsive and mobile-ready from day one. The SharePoint Framework works for SharePoint Online and also for on-premises (SharePoint 2016 Feature Pack 2 and SharePoint 2019).
Using SPFx you might be able to build the UI of your application and make use of SharePoint data, but you also need to think about connecting to your on-premises SQL Server database.
Otherwise you might have to think about exposing your SQL server data using a WCF service and make it available in SharePoint online through BCS, which will have limited scope to work with your data comparing to provider hosted add-in.
-
Let me know if the concept has helped you to achieve your goal, please mark as answer if it did.– UBKMay 3, 2020 at 1:36
-
Hi UBK, thank you for your answer and your time. Right now I am doing SPFx client webpart test to access external hosted APIs of premise sql server. I know there is the security challenges but I know how to handle that. I have read data and also display in web part from my external APIs using ReactJS UI. This works fine. My question is I am not sure this is the right path to achieve my goals.– rajmaharMay 3, 2020 at 1:38
-
Isn't that SharePoint provider hosted add-ins is only for on-premise SharePoint version?– rajmaharMay 3, 2020 at 1:49
-
Provider hosted add-ins can work in on-premises SharePoint as well, but it is certainly not limited to on-premises. If you have externally hosted APIs then it is kind of similar to having a provider hosted add-in, it was not mentioned in your question, hence I thought of it, since you will need some mechanism to make use of you on premises SQL server procedures and need to deal with exposing the data to SharePoint online SPFx webpart. I feel you are in the correct path already.– UBKMay 3, 2020 at 2:01