I am trying to wrap my head around how Electron (formerly Atom Shell) works.
I come from a traditional MVC-style web application, where the browser invokes the action of the controller through the routing system, then the controller retrieves data from the storage (File system, Database ...) and displays a view that is sent back to the browser. Some actions may send JSON instead, because they are invoked through JavaScript / AJAX instead of the browser actually navigating to them.
I want to create this, but as a cross-platform desktop application. I know that Atom Shell combines both Chromium-Browser and Node.js / v8, but I'm not sure how they will communicate.
I suppose I could start a full web server (basically some Node.js HTTP Middleware, such as Express ), but this creates a network connection, (which can also disable firewalls) is one of the reasons why I want to create a desktop application - this is just to avoid starting a real server. In principle, as an MVP / MVVM pattern in a normal working application.
Can someone give me some starting points for what I'm trying to do? How will the browser speak with the node runtime (βClientβ, what do they call it?), To say βHey, take my entry with ID 12345β and whether the client will return the rendered HTML or will only the browser drop JSON back and render it using JavaScript template engine?
Michael Stum Jul 05 '14 at 5:12 2014-07-05 05:12
source share