New horizons for Firefox OS

Since I joined Netlife, I tackled many interesting problems and completed several projects, but none of them were as astounding and revolutinary as Firefox OS application development. You may know that we're developing a CRM solution for small businesses, called BeeCRM. When I got to know of the system, I've seen a possible use case for mobile users: Having an easily accessible interface to call/message customers with every relevant information displayed in front of them, like meetings/tasks and prior events, seemed invaluable. Me being mainly a web developer, I welcomed Firefox OS with open arms because I knew Javascript much better than Java or Objective-C, and needed rapid prototyping, while realizing all of the features that were needed to the initial 1.0 version that would be later ported to the more popular platforms. I was very happy with the fast (nearly non-existent) learning curve: I could push my application with ease to our phone, while developing in my well-known, productive environment. I think this is the main selling point of FFOS: making a plaftorm accessible to millions of web developers around the world. So I made a JSON REST API in Go to our database with goweb. On the client-side I used plain old jQuery + knockout.js. This was my first experience with Knockout, and it really peaked my interest in MV* frameworks. But there were some problems, that frustrated me to no end while developing:

  • Offline Storage. MDN mentions IndexedDB and localStorage. IndexedDB is complicated beyond human understanding if you don't use a full-fledged storage library. In contrast localStorage has a very nice interface, the downside is, it's synchronous and it can only store string objects (there are JSON hacks of course, but we don't do "hacks" at this company ;) ). After half a week I found asyncStorage, which was nearly identitical to what I developed until then, to ease my frustration. This should be promoted as the #1 offline storage solution, because it wraps the aforementioned IndexedDB in the localStorage interface, just asynchronically and it can also store any kind of JS objects. Neat!
  • Too much restriction. I think the WebAPI limits the developers too much in the protection of the user. I know after recent events this sounds reasonable, but when I can't determine from a call launched from my app if it's finished or the duration of it... It frustates me to no end. The devs at Mozilla are working on this, but I can't even imagine why this hasn't been implemented in the first place. Automatic logging of calls are a no-no for now.
  • Breaking HTML standards. Building Blocks features multiple best-practices and code samples to achieve native looking effects in your own apps. These "samples" are done in deeply nested HTML tags with non-standard attributes. (Abusing the "role" attr this way is against every HTML standard I know!) Also CSS styles rely on eachother too much and on this abomination of a structure.

Otherwise my experience has been great. When Android was this old it was much-much worse in UI and UX terms, so props to all the great work for every contributor on the project! Of course the OS and the WebAPI ecosystem needs to mature, but we're working on it with the awesome Mozilla team. I'm looking forward watching the wave of the Web Dev Community making the cheap chinese Android knock-offs fall!