Electron Updates

Now that OSCON is over I can get back to working on Electron. That means a new version is coming, and by far the biggest change will be a brand new user interface. I had posted an early preview here but that's now completely out of date. You see, I discovered a new framework.

Currently Electron is built from two main components. The backend end is NodeJS code. This is the part that actually compiles and uploads your Arduino code. The front end is HTML and JavaScript. This is the part you actually interact with: editor, debugging, clicking the compile button, choosing boards, etc. Currently the UI is written in plain HTML with Bootstrap and JQuery. Sadly, this form of development won't scale. JQuery is great for manipulating a few DOM objects but it just doesn't scale up to a full app. I had considered a few UI frameworks like JQuery UI but several people at OSCON mentioned Angular JS. When I got home I bought a book from O'Reilly and built a few prototypes. I'm so glad that I did.

Angular isn't a set of widgets. It's a JavaScript modules framework with data binding. With Angular I can break Electron up into proper reusable, testable components. It also handles much of the data update boilerplate I previously wrote by hand.

After two days I've completely rewritten the UI in Angular. Almost everything that worked before works in the new UI. The switch over went smoothly thanks to the backend being done entirely with REST requests. I can actually run both the old and new UIs at the same time.

Here is a screenshot of what the new version looks like.

Some time next week I should have v0.3 released. After that the focus will be entirely on integrating Atom-Shell so that you don't need the command line at all. You'll be able to just download a proper app binary like any other desktop program.

Oh yeah, and we had a BOF at OSCON on Electron. I got lots of good feedback that will work it's way into the first post 1.0 release.

And one more thing...

If you live here in Eugene I'll be doing an Electron presentation at this week's Eugene Linux User's Group .

Talk to me about it on Twitter

Posted August 2nd, 2014

Tagged: electron arduino