Myths and mysconceptions about Firefox on the Palm Pre

Since I posted last week about how I was experimenting with running Firefox on my Palm Pre a number of tech news sites, large and small, picked it up and posted their own take on it. Some of the sites (and some of the readers of those sites) made some fairly odd statements about my work. This is probably because to the uninitiated (and many of the initiated in fact) the internals of Firefox are something of a mystery. I also suspect I made a couple of poor choices of words which led to some misunderstandings so I’d like to try to clarify a couple of points that might make it easier to understand what is going on.

Why this isn’t a port of an Android application

Lots of sites made mention of how this is a port of Firefox for the Pre. This isn’t surprising since even I said that. Many also called it a port of the Android version of Firefox, this is slightly true but really a misnomer. What you have to realise is that the bulk of Firefox’s code is written to work on any platform, only a few fairly small parts of it are platform specific. For the most part this is called the widget code and handles drawing the UI on the screen and receiving mouse and keyboard events. There is a widget implementation for Windows, for Linux, for Mac, for the N900, for Android and would you believe also for BeOS and OS/2.

The largest part of the work of making Firefox run on the Pre was writing this widget implementation. It’s true some of it was copied from the Android widget code, but that is because that already had code to use OpenGL to draw to the screen. No point in trying to rewrite that from scratch when you’re going to do exactly the same thing anyway (especially if you are like me and have never touched OpenGL before). If it makes people feel any better though the Pre version is now using a 2D method of drawing to the screen which is totally written from scratch so hardly any of the copied Android code remains now.

Why user interfaces don’t always need to look nice

Fennec UI on the Palm Pre
Fennec UI on the Palm Pre

I should probably have expected it. Loads of places posted only the screenshot and not the background description to it, my fault really for not getting the blog post up in time. Even then I didn’t say a lot about why I was using the full Firefox UI either so of course lots of people complained about how terrible the UI was and it would never be any use and was this some sort of joke? The thing is that during that early work having nice looking UI is really unimportant, maybe even detrimental to getting things done. All that is important is that you can see enough to see that things are working. Because of this it makes more sense to use Firefox’s desktop UI for testing as it is complicated and uses many different types of UI elements. If anything wasn’t working properly it would be obvious pretty quickly. In contrast the Firefox Mobile (commonly referred to by its codename Fennec) UI is simple and stays out of your way. Most of the time you can’t even see any of the UI, just the webpage. So you wouldn’t actually notice very quickly if a part of the UI was broken.

Once the code to run Firefox on the Pre was working switching between the full Firefox UI and the Fennec UI is actually pretty simple, basically just a different build configuration. Now that things are working I’m mostly testing with the simpler Fennec UI which hopefully looks more usable on the small screen. There may still be some work to do though, The Palm Pre has a smaller screen than I think any other device that the Firefox Mobile team develop for which means it is still perhaps too large to be useful. I’m looking at ways to solve that without having to fork the entire UI.

In the meantime here is a shot of what it looks like right now. This is a screenshot taken straight from the device.

Why the Palm PDK doesn’t suck

At least one site took my comments about problems debugging to mean that I didn’t think much of developing against Palm’s PDK, literally turning my statement that “Debugging is hell” into “Palm Pre coding is like hell”. This couldn’t be much further from the truth. For a mobile platform developing for the Pre seems remarkably easy. Granted this is the first mobile platform that I’ve ever developed for but the fact that it was basically a few hours before I had a command-line program compiled for and running on the phone seems like a testament for just how easy Palm have made this. Yes there are some teething problems with things missing from the PDK, but it is in beta, I’ve seen important bits missing from SDK’s released by Microsoft that are somewhere around their 7th version so in comparison Palm are doing great. And yes debugging is difficult, but debugging is difficult even on desktops. There has been really only one problem where I got completely stuck and had no way to try to figure it out myself, and in that case the Palm developer relations team stepped in and very quickly gave me the solution I needed.

Where are things now?

Since Palm helped me solve the main hanging problem a couple of days ago I’ve been working on resolving the main stumbling blocks to being able to really browse the web on the phone by fixing little things like making characters like “/” and “:” work from the keyboard. I’ve also added orientation detection so you can browse in portrait or landscape mode and fixed ctypes to work, it is this latter bit that will allow a future version of the Weave extension to work on the phone letting you sync bookmarks and history with your desktop. There are still a couple of bits that I’d really like to fix before letting people get their hands on this, like zoom and gesture support but I wouldn’t be surprised if I have those fixed very soon now.

I’m going to be at Palm’s developer day on Saturday if anyone wants to say hi, I’ll try to remember to load a working copy onto my phone to show off before I go.

27 thoughts on “Myths and mysconceptions about Firefox on the Palm Pre”

  1. Take a direct screenshot, press:

    SYM + ORANGE + P

    The picture will be saved to the photo app (in a folder called “screenshots”, but i don’t know this for sure as i use a German Pre 😉

    1. Nice tip, but it seems to only work for regular WebOS applications. I guess apps built on the PDK are handled differently, all I get is a black image.

      1. So why not running the app on the emulator and take the screenshot there? This should be much easier than taking pictures of your Pre!

  2. WebOS screenshots are easy! Just hold the alt/square/orange key (the one to type numbers & symbols above the letters) while also holding the “Sym” key (next to the period) and “P”. Unfortunately it won’t give you a nice shutter sound like an iPhone, but the screenshots will appear in your photos app in an album called “Screen captures”.

  3. Fantastic work! Can’t wait til it’s done. 🙂 I’ll be at the developer conference as well so I’d love to check out your work in person. You have my email, and I’m @shiftb on Twitter if you want to connect.

      1. Do you have a rough idea when you think it’s stable enough for people to try it out? I so wanna have this in my pre.

        Thanks.
        d

  4. So how is the progress on this? Hopefully after the last requests for an update this has not been forgotten.

    1. Currently progress is stalled. The current webOS release appears to contain a bug that causes crashes that I cannot work around. Apparently this is fixed in the next webOS release, but I also know that that will break some other things though it should be possible to fix those. Basically until the next webOS release is out I can’t make much progress towards getting a test build out that is actually functional.

      1. HOPEFULLY, that is not to distant in the future with Palm slowing to a crawl recently because of the merger. But it’s good to hear your still doing it, just waiting for the ability to finish.

        1. Hopefully now that the 1.4.5 SDK is out and the 1.4.5 update is now being released, you will be able to finish it.

  5. Any News about a stable running FF-Mobile Version for Palm WebOS? Would really be great!

    1. From the information that I’ve gleaned through Palm’s developer forums the 1.4.5 OS’s jailing feature won’t break me as much as I expected, but really the status is still the same as it was a month ago. Until I can get my hands on the 1.4.5 OS for testing on my phone I don’t really know where things are.

      1. How is it going? Is there a subscription list to keep updated? please put me on it! Are you on precentral.net?

Comments are closed.