I finished the Desktop application that I was developing for ACM. Yes, I know, took one week or little more to do it with Electronjs, just to say that I didn’t have a clue one week ago what Electronjs was (shame on me), so not previous knowledge needed.
It is a small application that puts a “nice face” to an unfriendly sh file, which has to create an structure of files and folders, sometimes running some tests or just validating configurations.
I started my approach, creating a web application with raw HTML, JavaScript and JQuery, but it was limited and frustrating , and at the end it just fulfilled half of the requirements.
A colleague pointed out that it would be a good idea to have a Desktop Application for these requirements, above all for the limitation from JavaScript to “inter-actuate” with System files and folders. He was also the person who pointed out to Electronjs.
On the spot I started to read, to check the possibilities, what was this Electron about, and I liked it, even more when I created my first app from this video ( https://www.youtube.com/watch?v=kN1Czs0m1SU , Thank you Traversy Media), it was everything falling in place, HTML, CSS and Creating/ Accessing system files. Just perfect!
Maybe you are not into videos so, here a list of resources that I found useful when struggling with some points.
- https://www.christianengvall.se/category/electron/ – Under this website I found very clear information step by step, and everything that I needed was there. Included possible failures.
- Quick question – I needed a way to get the path of a file – https://stackoverflow.com/questions/17192150/node-js-get-folder-path-from-a-file
- Files & Folders – Information about creating and accessing the File System? Here you have all you need https://nodejs.org/dist/latest-v4.x/docs/api/fs.html#fs_file_system
- XML – You can do them manually, as I was doing at the beginning but it was not worthy and quite frustrating, so I found this straight forward solution https://github.com/jrades/electron-app/tree/master/node_modules/xmlbuilder .
Works like a charm!
I’m looking forward to create another application with Electron, just to face new challenges and learn more about it. What about this EasyFinance app that I started in PHP and is dying of boredom? Let’s see, let’s see.