Today SilverStripe Senior Developer - Carlos Barberis - shares his thoughts on Amy Palamountain's talk from the New Zealand PHP Conference.
The second PHP conference was the ideal place to learn about new technologies, the future of PHP and other great new initiatives in the tech industry.
In the last few years, we have seen some great ideas on how to run these awesome web applications outside the browser. In my opinion, this really took over with Phonegap/Cordova, which made it possible to write applications with web technologies that could be wrapped and compiled as iOS and/or Android native applications and be run on mobile devices.
The Electron project started in January 2013 and was initially developed for the Atom editor, but is now used in a significant number of applications. Slack is the most popular example of all the capabilities an application built with Electron can have.
More on the technical side: Electron is built upon open source technologies, and is based on io.js and Chromium. Applications can silently be updated via Squirrel, so you can keep apps up to date (which is an advantage of web apps). There are tonnes of native modules that allow you to interact with the operation system, which makes the application feels native. These modules are based on Node.js and can be easily installed with NPM. Some cool examples of what you can achieve with native modules are access to the files system, creating OS native menus, access to keyboard configuration and much more.
Some of the most impressive pros of using Electron are:
- It’s very easy for web developers to start working with it.
- One base code for multiple operation systems.
- Better than browser apps, thanks to the native modules you can access OS capabilities.
- Silently keep users up to date, thanks to Squirrel.
- Yes, you can use ES6 and Typescript, therefore you can build your application with Angular 1 or 2, ReactJS or any other JS flavour you like.
- You can debug your applications in the same way you debug your web apps on Chrome.
- You don’t have to test your app on multiple browsers, yay!!
- Good documentation.
Some of the cons of using Electron are:
- Performance: you are not running your app with the native language, so an extra layer is added (think of JVM).
- Limited access to the OS APIs, but more modules are created every day.
Now go and have a play with it - it’s fun; there is plenty of documentation available and has a keen community behind it.
Posted by David Thomsen, 15/09/2015 5:59pm (8 years ago)