Mobile Update – Fennec 0.4 Released

Fennec 0.4, the M4 milestone, wrapped up last week. There are install packages for those who want to see it running on their Nokia n800/n810 devices. We have some installation instructions and release notes.

Those of you who saw Aza’s UI demo / video and are eager to see that UI in action will have to wait. Milestone 4 doesn’t make any significant UI updates. We have been focusing on some of the underlying, platform work. The UI changes will come in future releases to be sure. Some new UI mockups are available.

Check out the Fennec requirements document for the breakdown of future work. Also, if you want to stay current on happenings with Fennec and Mozilla Mobile in general, sign up for the about:mobile newsletter!

Extensions & XMLHttpRequest & eval – Oh My

Using eval() to decode JavaScript you downloaded from a remote website in your extension is just plain wrong. It’s not safe! Don’t do it!

Every now and then, an AMO reviewer will send me an email asking me to help an extension developer workaround the situation. Why? Because AMO will not allow add-ons that eva() JavaScript downloaded from a remote website to be moved out of the AMO sandbox. It’s not safe! Using eval() in an extension can give rogue JavaScript chrome privileges – the ability to do pretty much whatever it wants to the computer.

I finally made an MDC article with more details. The short version is:

  • If you’re downloading JSON, use a real JSON decoder, not eval().
  • If you’re downloading real JavaScript, use a JavaScript sandbox, not eval().

XUL Tip – Wrapping Boxes

In HTML you can use a DIV as a container and when the DIV changes size, the contents will wrap or adjust the layout. This does not happen with XUL BOX (or HBOX and VBOX) by default. However, you can easily add this capability with a style change. Make the BOX style="display: block" and the wrapping behavior will occur when the box is resized:



  
  
  
  

If you put IMAGE in the contents, you should probably add align="start" attribute to the box. This keeps the image from stretching inside the box.

This question keeps popping up on IRC, so I added a code snippet to MDC. Hopefully, it will reduce the number of times Mook, Mossop and Neil have to answer the question. (At least they have something to point to now)

Mozilla Platform, Wizards and FizzyPop

Building things with the Mozilla Platform usually involves dealing with some boilerplate. Extensions have install and chrome manifests and overlays. XULRunner applications have application and chrome manifests and default preferences. XPCOM, even the simpler JavaScript XPCOM, has modules, factories and categories. It’s more than enough to slow developers down, especially new-to-Mozilla developers.

That’s why I have always been thankful to Ted Mielczarek for his Extension Wizard and JS XPCOM Wizard. Those tools have been helpful to me and countless other Mozilla developers.

Because of their great utility, I started to think that Mozilla should host, develop and extend the tools. Turns out, this pleases Ted 🙂 – Therefore, I’ve put together a plan for FizzyPop, a simple project to develop/extend tools that assist Mozilla developers.

I had done a similar project with XUL Explorer, template-driven wizards to create extensions and xul applications. Turns out the Web has a wider reach than a desktop tool, especially for these types of scaffolding projects. In any case, I am taking the templates I use in XUL Explorer and converting them for use in a PHP web application.

I plan to get an SVN repo, bugzilla support and a Mozilla hosted for the project. We want to turn this into a contributor-base project. I’ll let you know when the prototype is ready to start hacking.

Developing for Mobile Devices – The Mozilla Way

As you might have heard, Mozilla is working on a mobile browser (codenamed Fennec). If you are interested in Mozilla and mobile, I’d encourage you to start following the project. Besides the just plain awesome idea of a Firefox browser running on mobile devices, there are other reasons I like the project.

Fennec is using XULRunner to power the application. The same XULRunner that is already available for Windows, Mac and Linux. Longtime XULRunner fans should be happy to hear of a Mozilla project building directly on XULRunner. Besides the additional focus, look for improvements to the Mozilla platform related to mobile devices. Mozilla prides itself on building applications that look and feel native, so we shouldn’t be surprised to see new support and APIs for mobile devices and applications.

Fennec project documents call out Nokia’s n800/n810 (Maemo) and Windows Mobile as targeted platforms. The Maemo XULRunner builds already exist and are (almost) built nightly. Windows Mobile XULRunner builds are very close as well.

Getting XULRunner ported to mobile platforms has the obvious benefit of allowing anyone to build mobile applications using the Mozilla platform. So, if you have experience building XULRunner applications on the desktop, get ready to start exploring the world of mobile development! So if you have a supported device, start hacking! Antonio Gomes has already been doing some great work porting Prism to Maemo.

XULRunner 1.9 Final

As promised, XULRunner 1.9 has gone gold. The final release of the runtimes, SDKs and source tarball are now available. Release notes can be found here.

Even though I have mentioned it before, it’s worth repeating:

Another great addition for XULRunner developers – Microsoft symbol and source server support. Look here for information on Mozilla’s symbol and source server support. Just use http://symbols.mozilla.org/xulrunner instead of the Firefox URL. This is a huge deal for helping developers debug problems using the non-debug releases of XULRunner runtimes and SDKs.

If you haven’t tried using XULRunner yet, now is a great time to start. Use markup/JS/CSS to build real desktop applications using native OS look-n-feel, with complete access to custom and OS binary functionality.

Yay XULRunner!

Here We Go!

Mozilla just opened the new source repository (mozilla-central) meaning the next release features will start landing. David Baron posted about landing new CSS selectors. Robert O’Callahan posted about some kick-ass SVG-based CSS effects used to style HTML. This totally rocks and will help push SVG into more of a leading role on the Web.

Look for more cool features, big and small, to start landing with increasing frequency. Some will help chrome developers while others are focused on web developers.

XULRunner 1.9 RC2

A while ago I posted about getting XULRunner builds to coincide with Firefox milestones. Work has been moving ahead on the goal. In fact, we have XULRunner 1.9 RC2 binary runtimes and SDKs available for testing. If you use XULRunner, or want to use XULRunner, you should grab these builds and give them a spin. Let us know (file bugs) if you see something wrong.

Another great addition for XULRunner developers – Microsoft symbol and source server support. Look here for information on Mozilla’s symbol and source server support. Just use http://symbols.mozilla.org/xulrunner instead of the Firefox URL. This is a huge deal for helping developers debug problems using the non-debug releases of XULRunner runtimes and SDKs.

If you haven’t tried using XULRunner yet, now is a great time to start. Use markup/JS/CSS to build real desktop applications using native OS look-n-feel, with complete access to custom and OS binary functionality.

Look for more cool XULRunner developer support coming soon.