How to manage views and pages?


#1

Hi,
I’m new in electron and javascript in general.Long time ago I wrote websites using php and I’m familiar with include.
For many days, I’ve read a lot about Electron and Js but there still is something unclear.

Is the main process is like a web nodejs server and the render process is the frontend ?

I have a socket server using node-ipc package and I would like to create a desktop app with a login page and an interactive menu with only the content changing.

  1. Login page
  2. If the login is OK, he can see the menu and access to the content of each pages.
  3. A Javascript file/functions have to be separated because the behavior is different and the communication to the socket is different.

I understood I could open a new hidden window to connect to the socket.

I saw the electron-api-demo but at the starting, the main file load every pages and the menu just changes the “is-shown” class.

What should I do ? Using AngularJs ? EmberJs ? I just need 3 pages …
First time I need to create this, in PHP it was easy with session variables and include php files but in Javascript …

Sorry if the question is too “noob” but I read a lot and it makes me more confusing than helping me with so many frameworks and no body explains the real basic concept.

Thank you.