简体   繁体   English

电子应用程序的Sails.JS或Loopback

[英]Sails.JS or Loopback for Electron App

I am developing a image capture/storage software for school photographers that uses an angular front-end using electron to make it a native cross-platform desktop app. 我正在为学校摄影师开发一种图像捕获/存储软件,该软件使用带有角度的前端电子来使其成为本机跨平台桌面应用程序。 The app will need to have online and offline access. 该应用将需要具有在线和离线访问权限。 I will run a database on the client machine while offline and when online access is obtained it will sync to a cloud based database. 我将在脱机时在客户端计算机上运行数据库,并且在获得在线访问后,它将同步到基于云的数据库。 In the future I want to be able to have the option for enterprise customers to run the application on premise and link to their own databases as well. 将来,我希望能够为企业客户提供在内部运行该应用程序并链接到他们自己的数据库的选项。

I was looking into using either Sails.js or Loopback to do this. 我正在考虑使用Sails.js或Loopback来做到这一点。 Do you think one of the frameworks would be better for my particular use case? 您认为对于我的特定用例而言,其中一种框架会更好吗? I would assume that both frameworks would be able to sync the offline data from multiple clients to the master cloud database using transactions easily? 我认为这两个框架都可以使用事务轻松地将脱机数据从多个客户端同步到主云数据库吗? Any input you have would be appreciated! 您的任何输入将不胜感激! Thanks 谢谢

(Also would react and redux be a better option for the font-end with electron opposed to using angular?) (对于电子反对使用角的字体末端,反应和redux还是更好的选择吗?)

Deciding which one suits you best is your call, but technically speaking Loopback can do what you need. 确定最适合您的是您的通话,但从技术上讲,环回可以满足您的需求。

  • The offline/online sync is referred as isomorphic Loopback . 离线/在线同步称为同构环回 Basically, you can run loopback client-side in offline mode, and when you get a connection it will sync with the remote server (that, ultimately, decides if the local data is accepted or not, depending on access control, validation, etc). 基本上,您可以在脱机模式下运行回送客户端,当您建立连接时,它将与远程服务器同步(最终将根据访问控制,验证等来决定是否接受本地数据) 。 There is an example repository . 有一个示例存储库 Be aware that this functionnality is still considered experimental. 请注意,此功能仍然被认为是实验性的。

  • Transactions are supported by some database connectors but not all of them. 某些数据库连接器支持事务,但并非全部。 You can find the documentation here . 您可以在此处找到文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM