Archive

Author Archive

The fresh and furiously fast Firefox

Originally posted on JAWS:

One of the less covered parts of this week’s Firefox release is high attention that was placed on the performance of the redesign of the tab shape.

The new Firefox introduces a new tab shape that is consistent with Firefox for Android, FirefoxOS, Thunderbird, as well as the web properties of Mozilla.

Firefox for Android

Firefox for Android


Firefox on desktop PCs

Firefox

As the Firefox team was implementing this new design, performance was a key metric that was measured and focused on. We wanted to not only bring a beautiful design to users, but one that matched the new sleek shape with an equally speedy outcome.

Each time a change was made to our source control repository, a fresh build of the browser was created and run against a suite of automated tests that measure the performance of the build. These results are then compared against the results of prior builds, allowing the team to track…

View original 297 more words

Categories: Uncategorized

Dear Community it’s time to imagine something new for Mozillians !! — A call for Assistance

November 1, 2013 Leave a comment

oneanddone

With the sole purpose of making the web a better place and enabling our community to make a difference, we  are putting together a new site that is capable of harnessing the tremendous power of the Mozilla community. –Me

The portal is to be named “One and Done”, it is to be a place you can  go when you have a few moments to contribute and you are looking for a quick and easy task to complete or skill to master.

To that end a few intrepid QA engineers (Peter Dehaan, Edwin Wong, and myself ) have gotten together with a goal of building a world class, responsive, mobile enabled  website…Now to be sure those things aren’t in the requirements, but we are QA after all.  So we have dusted off our development desks, blown away the cobwebs, and started to code.

Now we are testing out our asynchronous chops, working with a realtime database, and deploying with agility…. However …. we forgot one thing..

Design skills.. I really dislike styling pages…  So without further-a-do I would like to throw out a call for help…… light up the night sky with the Firefox Logo, and see if any budding html / css / javascript designers can answer the call.

A look at the mocks:

A look at what has already been done:

Where to fork:

If you have some free time and want to contribute to the project, would love to get your assistance.

If you feel you have the chops, just send me an e-mail  dclarke@mozilla.com, or just fork the repo and start hacking. You can also find me on irc: onecyrenus

Firefox vs Chrome App APIs How do the API’s compare ?

October 14, 2013 6 comments

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:

Firefox OS:
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

Chrome:
alarms, audio, bluetooth, events ,fileSystem, identity, idle, location, mediaGalleries, notifications, permissions, power, pushMessaging, socket, (Battery Status in Beta), 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.

Basically this is a bit of a cluster bug until W3C steps in these APIs aren’t close enough to easily describe all the differences in one document.  The best case scenario is if you are only using a subset of the above APIs and you manually code an abstraction layer, or use an intervening javascript framework like phonegap which would make the interfaces of less consequence to the developer.

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 ?

WebFM API, Vibration API,  Camera API, Power Management API, Proximity API, Time/Clock API, Ambient Light Sensor API, Device Orientation API, Screen Orientation APIWeb Activities,

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.

system.cpu, system.display, system.memory , system.storage = There are mechanisms to get some of these stats, but not all of them in firefox os.

tts: Text To Speech API

usb: An API that allows you to access USB based devices

Read more…

Rockin’ the Free Web – How to Convert a chrome packaged app to a Firefox OS packaged App

October 11, 2013 2 comments

I saw a question on a thread this week, and decided to spend a few hours to write up the process, as well as provide an example.

This bug will cover the general conversion process, but it doesn’t cover all the idiosyncrasies / differences between the two platforms.

The example I’m going to use for the conversion is from the google chrome sample app repository:

The most basic example I have already converted to a packaged app the Hello World example.

For the most basic app that I have converted “Hello World”, we look at the following pieces and how they differ / can also possibly coexist between the two platforms.

manifest.json:

 {  "manifest_version": 2,
    "name": "Hello World",
    "version": "2",
    "minimum_chrome_version": "23",
    "icons": {
         "16": "icon_16.png",
         "128": "icon_128.png"
     },
     "app": {
         "background": {
         "scripts": ["main.js"]
         }
      }
   }

manifest.webapp:

 {  "name": "Hello World",
    "description": "Hello World",
    "launch_path": "/index.html",
    "icons": {
        "128": "icon_128.png",
        "16": "icon_16.png"
    },
    "developer": {
        "name": "David Clarke",
        "url": "https://github.com/onecyrenus/firefox-os-apps"
    },
    "default_locale": "en",
    "permissions": {
    }
 }

The main difference between these two loading mechanisms is just file structure, and some syntactic sugar.  So why not deploy a manifest.json and start rocking the free web !!!

The Art Of Battling Giants / Mozilla Summit Reflection

October 10, 2013 2 comments

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:

  1. Have a copy of Xcode (ergo a Mac OSX computer)
  2. Apply for a developer license ($99 / year)
  3. 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…

Facebook Home

April 6, 2013 2 comments

facebook-home

So I thought I’d spend a few moments writing about why I am not too interested in a social phone, and basically just bitch and whine about why I am not too happy about having all my phone interactions to be  viewed through the lens of facebook.

There are probably 5-10 people I call on a regular basis, I don’t think i’d call more people if my phone was more social, would I post more to facebook ? Would I upload more photos ? Probably not…

Where is the value add for the consumer, I sometimes wonder if companies invent ideas to satisfy there need to do something rather than satisfy a need in the market.  My most pressing concern with facebook at this point is that the software is slow.  I can’t really go into why it is slow, because the code is not open sourced. But compared to Google+ it is molasses.

I very well don’t want something that is slow / buggy to take over my homescreen.  I dislike this concept immensely. (Given that my phone was released approx 2 years ago)

A new idea:

The problem I have with my phone is around the following list.  List is not ordered according to any priority.

  1. Privacy: I don’t know what most apps are doing.  As a user you have no clue when an app is gathering data, and when it is being disseminated. I don’t think giving an app blanket permissions for geolocation access is enough, I generally want to know what data it is using and when. I want to be able to analyze this data. (Tough problem to solve)
  2. Data Segregation: I would like data segregation to happen further up in the app ecosystem so data is stored in an app independent datastore.  Apps should share not just activities, but data.  Ex: After my run, I would have a copy of the geolocation information on my phone, and have it setup to share that information with Strava / mapmyrun..etc..etc.  What I don’t want is for a specific app to gather information, and then surreptitiously pass that information up to their service, and all of a sudden I dont have a copy of my own data. (Tough problem to solve)
  3. Async: All apps should by default not block.  I think spinning wheel  = annoying, if the internet is not accessible, highlight that on the device, if there is a queue of events that need to be processed, and something is blocking then highlight that, an let the user make the appropriate choice. (Tough problem to solve)

I really dislike that there is this idea being pushed that for the user having a social phone is a good thing ?  When for me it doesn’t solve any of the problems that I actually care about.  If my friend is listening to Rhianna on his lunch break, which although interesting and confusing (why would any guy be listening to Rhianna on their lunch break), it unfortunately has a lower priority on my list.

Solving any one of the above problems and then blanketing my phone with navy blue facebook colors is more acceptable, but just giving up all your data without getting anything in return..

That is just silly.

Part III: Profiling Firefox OS.. An Entry point

November 16, 2012 2 comments

Gathering profiling Data on Firefox OS can be done in several different ways.
#1) Simpler is better, sometimes a stop watch is a great medium with which to gather timing data for an application you don’t understand.

Picture of StopWatch

Stop Watch

2) In Application Profiling

A great way to accomplish this is to use timestamps in javascript to determine when specific things are happening, and if you are having a bottle neck insdie your application.

Ex:

var d = new Date();

console.log(“The time since epoch = ” + d.getTime());

Once you insert a few of these statements in “strategically” placed points.

Just cd gaia; make install-gaia, this will install the new version of gaia to your phone, and you can see what code path gets triggered at which points.

3)Measuring app startup Times

Turn on show app load times  by loading your settings app.

Click Device Information –> More Information –> Developer –> Show Time to Load.

This is one mechanism for measuring app start times, but this only measure time until mozbrowserfirstpaint which measure the time until first pixels are available for an app.

More details can be found in Bug: 787378

Part II: About Memory Gathering / Dissecting

November 14, 2012 Leave a comment

I have my B2G device in hand….. how do I start gathering memory statistics for the apps I use.

Firstly git clone the b2g repo >

git clone https://github.com/mozilla-b2g/B2G

cd B2G /tools

python get_about_memory.py –help

There are several options you might want to consider with the tool, for now you can just run without any options.

Next Open Firefox Aurora or Nightly, and type about:memory.  At the bottom of the page is a button for loading the memory report from File.

Select and open the file you just saved in B2G/tools/about-memory

Read more…

Part I: A how to for performance testing on Firefox OS.

November 14, 2012 Leave a comment

Performance testing (http://en.wikipedia.org/wiki/Software_performance_testing) for B2G is being done by many dogfooders / early users as we speak.  The beginnings of this effort are to begin a framework for gathering this data, as well as empower both power users and employees to really start to make sense of all this complex data !. 

Toolset: Mind, stop watch, performance profiler, about:memory tools 

Background: 

https://developer.mozilla.org/en-US/docs/Performance/Profiling_with_the_Built-in_Profiler

http://blog.mozilla.org/nnethercote/2012/11/14/memshrink-progress-week-73-74/

http://andreasgal.com/2010/10/13/compartments/ (an oldie but a goodie)

First Steps in performance measurements, were hashed out over the B2G work week most recently in San Francisco. The most immediate things we want to gather data on are the following.

  • B2g Startup Time:

Measure / Record the startup time for the overall system. We want to know how long it takes to get to the unlock screen. 

  1. Use case: As a user I do not want to wait for a long period of time before my phone will start. 

Requirements:
     — The phone is off
     — Start phone
    — wait for unlock screen, with animation.

  •  B2G Startup Time for each App:
  1.  Use case: As a user I want to be able to open apps one after another and have the operating system be able to quickly load each app, and switch to the homescreen.

Part II of this blog post will go over How To’s of memory gathering / dissecting. 

 

Tune into Part II: About Memory Gathering / Dissecting 

If you are Launching your startup HTML5 is the way to go ( imho )

April 17, 2012 2 comments

As we progress through the webapps project there is an astounding see of change coming to HTML5 Apps near you.

If you are starting a new project, I would recommend that you think about some of the ideas I am laying out below.

Graphic Design:

Apps will have different characteristics than webapps.  You generally will not just want to layer css ontop of your page, and consider it mobile enabled and done.

You will have to design a completely different set of views for your mobile app than your desktop site, and possibly even your tablet as each platform will offer different capabilities that you’ll want to take advantage off.  Your layouts will accomodate different styles, and furthermore different functionality.

Redirects: Another thing to consider is that an App doesn’t allow navigation off of the page, so you should think about that and what it means for your app.  You wouldn’t want to redirect your users off of your domain.

Apps should be targeted / focused towards doing one thing well, and bubbling that information up to the user.

Popups: These are a web browser concept, that doesn’t translate into the App experience, so expect that popups won’t work.

So if you want a kick ass App experience,  plan on having completely different views for different device sizes.  The good news is everyone will be writing the same language, and basically using the same stylesheets !

There must be a ton of user UI tips, for writing kick ass mobile /tablet  apps, if you have any add it to the conversation

Infrastructure:

WebApps probably won’t make too many changes to the internal infrastructure of data centers.  But to the infrastructure / mechanisms you use for exposing your product to the world, those are / have changed.  The rest api revolution has been replaced by the Javascript Object revolution.  Exposing your services as part of a Javascript SDK is the new kid on the block, and it’s knocking down walls.

So far I haven’t seen too much change in this area, the cloud is pretty much a given at this point, at least for a startup.

Personnel:

The time for the Android / IoS developer is over, don’t do it, don’t fragment your infrastructure, your support, your ability to ship early and often.. It’s just not worth it.  If you are a startup and anyone is telling you to go native, i would seriously get second / third opinions.

Having said that using Phonegap or something of the like is a good idea to help bridge some of the functionality gaps.

If you want to take a look at how to  load client side / server site javascript in phonegap and all have it process you should take a look at github.com/mozilla/soup

Why:

The advantage of being small is that you can move quickly.  Try doing that with an android release , iphone release, and website release.. All with differing capabilities / code bases, and then dealing with android fragmentation.  It will make you slow, and slow is bad….

Learn More.

Follow

Get every new post delivered to your Inbox.

Join 78 other followers