Getting started


#1

Hi,

I’m new to electron (and js in general) and I would like to know how to get started. What should I learn to be able to create a LOB application in electron ? I’ve readabout so many technologies (Node.js, Angular, React, etc.) and the more I read, the more I’m getting lost.

Could someone recommend ressources (books, articles, anything that could possibly speed up the learning curve) so that I will know where to start from ?

Any help is welcome.

Regards,

David


#2

There’s nothing very special about Electron. I say this because you say you’ve been reading about “Angular, React, etc.” and a lot of those frameworks have special syntaxes, special file types, and their own ways of doing things. Once you learn JavaScript, there’s very little to taking the next step to Electron. There is a slight paradigm jump from just scripting bits of a web page to writing a server-side Node.js application, but it’s still vanilla JavaScript. The best resource for learning Node that I’ve found is The Art of Node. It in turn will refer you to NodeSchool.io where you can practice. That’s basically it. Once you have enough Node expertise to create a thing that runs in the browser, the Electron documentation and Quick Start Guide should be all you need to slot your initial application into it.

Since you’re new to JavaScript, that’s how I suggest going about it. If you’re antsy or if you learn better by reverse-engineering things, the Quick Start Guide includes instructions to set up a sample app that you can then modify to play around with the things you find in Art of Node.


#3

Thanks for your reply. Looks like these are valuable ressources that will keep me busy for a while. So basically I learn JavaScript and then I should be able to code Electron apps ? Where does Node come into this ?


#4

Node is what allows JavaScript to act like a server-side language (or in some cases, build web servers). It contains the logic to interact with the host computer and the network, things that have historically been handled by languages like PHP, Perl, and Ruby. You don’t actually need to touch anything in Node in order to use Electron, but Electron has Node built in. All scripts that you can run via the node executable will run within Electron.

What makes Electron different from Node is that Electron includes bits of Chromium. An Electron app has access to a modified form of the standard Chrome browser API and the Chrome dev tools, so you will have debugging tools included with your application by default and you can treat it just like you’re writing a web app, but with more control of the browser (a browser that doesn’t give the user any tools to go elsewhere, but one that also doesn’t have any safeguards, so is not to be exposed to the general Internet).