Anders Evenrud on writing Web desktop platform with JavaScript

Anders Evenrud on writing Web desktop platform with JavaScript

We have seen many libraries and frameworks written in JavaScript, but we rarely see projects like OS.js. I'll let the author, Anders Evenrud, describe the project. He has been writing OS.js since 2011 and has built an amazing set of features. We'll discuss on his background, what is the project about, technical decisions, etc. After Q&A, you can find resources to dig in further.

Question: Anders, who are you, and how did you get interested in Web development?

I'm a 30-year old developer from Norway.

I got interested in the web when I was a kid, sitting at my father's computer at Friday nights, which was when I get to surf the net over dial-up for an hour or so.

At one point I installed "Netscape Composer" and started playing around with what was then called DHTML. I had been experimenting with programming languages like BASIC before this (modifying demos that came with the editors and such), but this was the first time I made something myself that had interactivity with buttons, input elements, and all that stuff. It was very exciting to make things on the screen blink and move around! I think that was where it all started.

Question: You have done plenty of open-source projects, and the most popular one is OS.js (version 2). How would you describe it for those who haven't heard about it?

OS.js aims to recreate the "desktop computer experience" with web technologies and JavaScript. Using the web also means that you can have it running on a server, and no matter where in the world you are and what machine you are using, you're on the same desktop and have the same experience.

Question: Have you heard about interesting use cases of OS.js and could it modified to be OS for NAS or some other device?

Arduino is deploying OS.js on some of their boards this year, so that is very exciting! I am also in contact with a couple of other companies that are looking into using OS.js for some internal systems.

Yes, you can make a NAS management system or something like that. I first made OS.js manage my VPS and Virtual Machines. I used it as sort of a control panel and monitoring system. This is something I want to look more into again.

Question: In the (long) list of features, there is "Dependency-free JavaScript frontend". The OS.js is a complex Web application, how did you end up not using any frameworks?

I looked into all the popular frameworks and libraries before starting, but I found out that I didn't have a need for any of them. I wanted to make my GUI libraries and utilities specifically made for this job -- so I did. Modern browsers have excellent APIs so I did not see any point in using (ex) jQuery and such to interact with the DOM.

I think the result is pretty good. Very light-weight (the "client core" is only ~400kb uncompressed) and fast!

Question: Have you encountered unusual performance issues and ways to solve them?

There have not been any performance issues (that I can think of). Modern browsers are really good at handling these kinds of applications.

Question: I was looking at the installation instructions and noticed that not only you have written support for multiple containers and virtual machines, but also two different languages (PHP and Node.js). What is the background of writing support for two languages?

At first, I used PHP to prototype the server layer. I was not very familiar with writing Node server applications, so I stuck with what I knew (I have a lot of PHP experience from work). I'm not sure if PHP will be a part of future releases seeing how many components I am currently maintaining. At very least it will be moved to its repository.

Question: You have been working on this project for years now, what have you learned on this journey and what would you do differently?

Yeah, since 2011 now (and working on the second iteration). I have learned so much, especially about JavaScript as a language, modern CSS, the DOM and how the browser renders your content and browser compatibility.

The first thing that comes to mind that I'd want to do differently is unit testing. It was introduced very late and implementing it required some changes to the server code. I've never actually been into TDD and stuff like that, but I see now how important this is, especially as a project grows. So, that was also something I learned a lot about.

Question: If people are interested in contributing to the project, where they should start?

I think the best place to start is to join the Gitter chatroom I have made. I'm there all the time and happy to answer any questions you might have (we also have a neat little community going there. So it's not strictly developer talk in there). You can contact via email, Twitter, Github or the Facebook group as well.

You can just go ahead and dive right in as well and just make changes and send me pull requests via Github if you feel comfortable with that. I provide full documentation on all the bits and pieces of OS.js.

Question: What is on the roadmap for the year 2016?

The groundwork has been made, and the APIs are solid... the only thing lacking is content, so Applications is first on the list. I will also make a lot of videos with tutorials and stuff like that (which is one of the highest requested things). Documentation, in general, will also be focused on, and I hope to see some contributions from the community.

I am very excited for 2016!


Thank you, Anders, for the interview. If you're interested in the project, please check following resources to learn more.

If you want to learn more about the author:

OS.js project:

Check also other Q&A sessions, there are more to come.

If you have suggestions for next interview, tweet me, and I'll get in touch with the person. Thanks!