简体   繁体   中英

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. 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?)

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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