Electron Connect Backend to Frontend?


#1

So we are build a Task Management Dashboard, have a DB set up mySQL hosted on a server, and our application needs to connect to that server from each users desktop when the app is installed, to get automatic updates, such as being assigned a new task, completing a task etc.

I guess I am asking what is the best way to go about this. Have watch a lot of tutorials all naming the benefits of Electron, but they focus on the frontend, and now how to connect to the backend and have reactive data.

Any help or suggestions would be greatly appreciated.


#2

I am looking setup similar architecture where essentially Electron is a front end app that get data from backend services through a push.
Let me know if you have found any suitable framework for this.
I have heard of Horizon (http://horizon.io/) but havent tried it out yet.


#3

If I was in your situation what I would do is create a service layer that sits between the client app (electron) and the database. This service would handle clients requests for data, events and triggers, pulling and pushing data etc.

As for what framework to use, this would largely depend on what your clients environment is. Choose the lowest common denominator in technologies. Clients don’t care about the latest nodeJS version, they just want it to work.

But if you are after three-way data binding have a look at meteor. You could also look to wrap an instance in meteor and separate some realtime data (i.e. task activities) from the static data (projects, milestones…) that would live in mysql. Again, the service Layer would be the ‘fat controller’ to kick off events which would trigger real time actions.

hope his helps and not too confusing. my head just rambles some times.


#4

So for anyone interested the system uses:

React
Redux
IsomophicFetch
Electron Cookies
Express
Passport
Cypto
MySQL Db

For further info comment and I can provide more info, but it works.