When porting a chrome packaged app to a firefox packaged app you will need to do an inventory as to which chrome specific api’s you are using and create a level of abstraction around them, as the naming / capabilities of the apis vary across the platforms.
I will try to break this article into information on which apis are supported across both platforms, where you can find docs, and lastly which apis have no commonality across both platforms (Firefox or Chrome).
Web APIs in Common:
The Web APIs that share commonality in function between the two platforms, are listed below:
alarm, getUserMedia(audio), Bluetooth, Device Storage API, navigator.id API, Idle API, Geolocation API, Web Notifications, Permissions API, Battery Status API, Simple Push API, TCP Socket API, Pointer Lock API, Power Management API, ContextMenus
List of Chrome’s HTML5 apis: http://developer.chrome.com/apps/api_other.html
The difficulty for the developer will be in writing an app that can handle both browsers elegantly. This is already done in many cases with the use of W3C compliant API’s such as geolocation data.(navigator.geolocation, which is also supported under google chrome, just not listed as such in their packaged apps documentation (ack), and soon to be battery status. But for the majority the function calls are different as well as the data being returned.
The other part of the discussion could revolve around which Firefox OS API’s are not yet implemented in Chrome OS. How close are all the APIs to standardization ?
Chrome OS similarly has a set of APIs which are not implemented in Firefox OS:
app.window = a concept not supported in firefox, generally gives the ability to maximize, minimize, change window size..etc
app.runtime = a concept not supported in firefox, basically used to notify when the app has been restarted
i18n = internationalization API.
serial= An API that allows you to read contents of the serial port.
runtime = API to retrieve the background page, return details about the manifest, and listen for and respond to events in the app or extension lifecycle.
tts: Text To Speech API
usb: An API that allows you to access USB based devices
On the way back from the Mozilla Summit 2013, I spent the time to read Malcolm Gladwells new book. David and Goliath, underdogs, misfits and the art of battling giants, and I was immediately struck by the similarity between Mozilla and the story of the underdog.
The history of the browser has been one of constant change and innovation. Mozilla has been a company that has been the underdog, so much so that I don’t believe that anyone would have bet on the success of the Mozilla project at the very beginning (except it’s core actors). But 10+ years later the project is still going strong, albeit with new challenges, and new Goliaths to tackle in the industry.
The core issue that I feel we struggle with is in communicating our tremendous core value to our users, and similarly delivering a product that our community feel is a great world class / stable product for them to use.
Throughout the course of Mozilla Summit 2013 a question came up throughout the conference was as to why the state of the web so little resembles the web that we as users want. The question came up several times throughout the conference..
What is the type of web that users need ?
Is there a message or thought that will be appreciated, digested, and acted upon to make the end user more cognizant of the lack of choice. If users can understand that we are just in a more cleverly designed box than the Aol / Compuserve / Prodigy would they care ?
Each app ecosystem has it’s own gotchas, license agreements and restrictions which limit the inclusion and fraternity to which the web was designed. I remember our first experiments building web pages in high school. Changing font sizes, the blink tag, tables and the like. We all got to put up and manage our home page. A system that allowed for play, and learning for all, and was free.
If a student in school wants to make an iOS app you have to:
- Have a copy of Xcode (ergo a Mac OSX computer)
- Apply for a developer license ($99 / year)
- Have an iphone / ipad.
For students that don’t have access to such a technology stack this must be an insurmountable hurdle. If the web is not relevant to students, and their only point of entry is via their phones / tablets. What does this mean for internet literacy in general. Are we turning people away from the internet by not having a cheap / fun alternative, which allows people to experiment, build experiences and play.
Can Mozilla find itself in a nuanced position which will allow all users to play, and learn. Or will we live in a world where users don’t get that fundamental education. How will Mozilla do battle against it’s new Goliath?
Malcolm Gladwell notes that in a competition between a smaller adversary and a larger, if the smaller adversary takes a conventional approach to the confrontation the odds are the smaller adversary will loose, but in the situation where the smaller adversary takes an unconventional approach the probability will be that the smaller adversary will win.
By having the advantage of agility, a scrappy attitude and the will to change the internet, “users” could find themselves again in a winning position, where they are once again able to play and learn in an environment that is built for that very purpose…
Vision Based Testing – An Experimentation / Learning Experience — Time To Test Web Apps Jan 20th, 2012
I have recently been experimenting with a vision based testing framework Sikuli (www.sikuli.org), and wanted to share some of my findings / expertise with the community.
As with any new tool there are ups and downs, installation difficulties, learning curve..etc.. The hope with this test day is that you can walk away with expertise / know how , how you can roll your own vision based testing framework, and solve your own problems either in your day to day computing, student, or professional lives.
My belief is that some of this technology has the possibility to be transformational, and there is a huge capability here to make automation simple, or at least simpler .
This Test Day is for you if you are interested in any of the following.
Connect to the mozilla community. Become a Mozillian, and shape the future of the web!
Learn about Web Applications !
Learn a new Test Automation Strategy that is current, and applicable !
To learn more about this test day please and how you can contribute just read:
If you are new to test days, please read our FAQ
Just thought i’d throw out a challenge to the best and brightest, who might be interested in learning a little more about the openwebapps development / testing infrastructure.
This is the mission if you choose to accept it.
Below is a podcast on how to add unit tests:
Your mission is to find as many test cases / edge cases that are not represented in our test suite and get your submissions in to me.
Show me your pull requests in the comment feed and we can get this competition going!
*** Technical Details ***
To the top contributor i will send a goodie bag of the coolest Mozilla stuff I can find. The coolness of the stuff depends on the coolness of the submissions!!!