<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Xulforge Blog &#187; amo</title>
	<atom:link href="http://xulforge.com/blog/tag/amo/feed/" rel="self" type="application/rss+xml" />
	<link>http://xulforge.com/blog</link>
	<description>Xulforge projects, code, and more</description>
	<lastBuildDate>Fri, 03 Feb 2012 21:02:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>All green!</title>
		<link>http://xulforge.com/blog/2012/02/all-green/</link>
		<comments>http://xulforge.com/blog/2012/02/all-green/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 21:02:25 +0000</pubDate>
		<dc:creator>jorge</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[amo]]></category>
		<category><![CDATA[editors]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[reviewers]]></category>

		<guid isPermaLink="false">http://xulforge.com/blog/?p=114</guid>
		<description><![CDATA[Today we reached a very significant milestone. This is a screenshot of the AMO Editors dashboard, which we use to track the status of the AMO review queues. For the first time since I can remember, we are all green! What does this mean? It means that all add-ons currently waiting in the queues have [...]]]></description>
			<content:encoded><![CDATA[<p>Today we reached a very significant milestone.</p>
<p><a href="http://xulforge.com/blog/wp-content/uploads/2012/02/Queue-Status.png"><img class="aligncenter size-full wp-image-115" title="Queue Status" src="http://xulforge.com/blog/wp-content/uploads/2012/02/Queue-Status.png" alt="Review queue status" width="975" height="157" /></a>This is a screenshot of the AMO Editors dashboard, which we use to track the status of the AMO review queues. For the first time since I can remember, we are all green!</p>
<p>What does this mean? It means that all add-ons currently waiting in the queues have been waiting for less than 5 days. Also noteworthy is the fact that all queues have a length in the low double digits and even one in the single digits! They are normally in the hundreds, so this is quite impressive.</p>
<p>All credit goes to our add-on review community, the <a href="https://wiki.mozilla.org/AMO:Editors">AMO Editors</a>. Their continuous dedication and <a href="http://blog.mozilla.com/addons/2011/12/22/amo-editors-new-years-challenge/">incredible competitiveness</a> have brought us to a point that we could only dream of. And now to clear the rest of the queues&#8230; <img src='http://xulforge.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><strong>Thank you!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://xulforge.com/blog/2012/02/all-green/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Keeping add-ons compatible in the rapid release process</title>
		<link>http://xulforge.com/blog/2011/08/keeping-add-ons-compatible-in-rapid-release/</link>
		<comments>http://xulforge.com/blog/2011/08/keeping-add-ons-compatible-in-rapid-release/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 20:35:11 +0000</pubDate>
		<dc:creator>jorge</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[add-on]]></category>
		<category><![CDATA[amo]]></category>
		<category><![CDATA[compatiblity]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[newsgroups]]></category>
		<category><![CDATA[rapid releases]]></category>

		<guid isPermaLink="false">http://xulforge.com/blog/?p=106</guid>
		<description><![CDATA[I began this discussion in the newsgroups today. Keeping add-ons compatible in the rapid release process. It is mostly aimed at Mozilla developers, but this should interest add-on developers just the same. We&#8217;re establishing a better system to communicate breaking changes, which should make it easier and quicker to identify what needs to be added [...]]]></description>
			<content:encoded><![CDATA[<p>I began this discussion in the newsgroups today. <a href="http://groups.google.com/group/mozilla.dev.planning/browse_thread/thread/dafd0bc59b587e27">Keeping add-ons compatible in the rapid release process</a>. It is mostly aimed at Mozilla developers, but this should interest add-on developers just the same. We&#8217;re establishing a better system to communicate breaking changes, which should make it easier and quicker to identify what needs to be added to the compatibility validator for the automatic version bumps.</p>
<p><a href="http://groups.google.com/group/mozilla.dev.planning/browse_thread/thread/dafd0bc59b587e27">Discuss!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://xulforge.com/blog/2011/08/keeping-add-ons-compatible-in-rapid-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Version numbers and add-on breakage</title>
		<link>http://xulforge.com/blog/2011/07/version-numbers-add-on-breakage/</link>
		<comments>http://xulforge.com/blog/2011/07/version-numbers-add-on-breakage/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 15:46:42 +0000</pubDate>
		<dc:creator>jorge</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[add-on]]></category>
		<category><![CDATA[amo]]></category>
		<category><![CDATA[jetpack]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://xulforge.com/blog/?p=99</guid>
		<description><![CDATA[Gerv started a fairly intense discussion about the new rapid release cycle, from the perspective of browser versions and their meaning. As expected, many have replied that the discussion is silly and version numbers are meaningless. This is true for most software developers, and it should be true for most web developers. In software, we [...]]]></description>
			<content:encoded><![CDATA[<p>Gerv started a <a href="http://weblogs.mozillazine.org/gerv/archives/2011/07/firefox_version_numbers_cognitive_disson.html">fairly intense discussion</a> about the new rapid release cycle, from the perspective of browser versions and their meaning. As expected, many have replied that the discussion is silly and version numbers are meaningless. This is true for most software developers, and it should be true for most web developers. In software, we have been learning that version numbers have been hijacked by marketing and we shouldn&#8217;t pay that much attention to them from the technical perspective. We have branches and revision ids for that anyway. On the web, what should matter are the features the browser offers, not the browser itself or its version. Browser and version detection are frowned upon, and most web devs worth their salt avoid it when possible.</p>
<p>People saying that this discussion is pointless neglect that Firefox is one more thing. It&#8217;s a <em>platform</em>, and most add-on developers rely on it. Version numbers matter to add-on developers because the add-on compatibility system relies on application version, not features. And since the features are pretty much every access point in the platform, doing feature detection is not realistic. So, if you&#8217;re an add-on developer and you want to keep your add-on up to date, you&#8217;ll have to test and increase its compatibility every six weeks, potentially having to make code changes.</p>
<p>On AMO, we have implemented a system where we automatically detect which add-ons are compatible with the latest Aurora version (the version that is between 12 and 6 weeks from release) and then upgrade those that do. All developers for the tested add-ons should get an email explaining their add-on was upgraded, and if not, why. This has been fairly successful, and we have a <a href="https://addons.mozilla.org/en-US/firefox/compatibility">high compatibility percentage</a> (relative to usage) at the moment (it&#8217;s even higher if you ignore the .NET Assistant, which could be compatible now). However, there are still many popular add-ons that aren&#8217;t compatible, specially those hosted elsewhere. And the burden on those who develop add-ons with binary components is pretty much constant, because they&#8217;ll have to update their add-ons every 6 weeks, with no exception.</p>
<p>So, while only a small percentage of add-on usage consists of add-ons that are incompatible (hovering something between 10% and 20%, I think), the probability that one of our add-on users has <em>at least</em> one incompatible add-on is even higher. And having to roll the dice every 6 weeks and see if your add-ons are compatible or not puts a great deal of stress and dissatisfaction on users. And like Colin Coghill comments in Gerv&#8217;s post:</p>
<blockquote><p>If add-ons break randomly every few weeks, effectively FF no longer has add-ons.</p></blockquote>
<p>Version numbers have a real impact on our users then, and they should be taken very seriously. Now, would the previous releases have worked as minor version increases? I think so, yes. The breaking compatibility changes have been fairly minor so far, with the exception of binary add-ons. Even if we hadn&#8217;t done any communication about it, I&#8217;m fairly sure that the problems would have gone mostly unnoticed, by both developers and users. Of course, that&#8217;s only because so far the changes have been minor. This shouldn&#8217;t be the case for every release, and that&#8217;s a big concern. For example, Firefox 7 will <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=645922">remove a couple of JSON parser functions</a> that are heavily used by add-on developers. We&#8217;ll see how that goes.</p>
<p>So, what are the alternatives? There are a number of proposals, with their own advantages and limitations. I personally think that going back to the initial idea or 3 month-long tracks (instead of 6 weeks) would be a major improvement. Nils Maier (author of DownThemAll!) has a very detailed proposal in the comments on Gerv&#8217;s blog (unfortunately, I can&#8217;t link to the comment directly), which consists of having planned minor and major releases, where major releases happen only twice a year. I like that one as well.</p>
<p>As usual, I expected this be a short post and then it grew into a monster. Oh well. I&#8217;ll close by saying that we&#8217;re working on a number of ideas to make this release cycle as smooth and stress-free as possible to add-on developers. Most releases will change nothing you care about, so you shouldn&#8217;t need to worry about it. I strongly recommend all of you to track the <a href="http://blog.mozilla.com/addons/">Add-ons Blog</a>, which is becoming an increasingly important source for updates. I also recommend that you give the <a href="https://addons.mozilla.org/en-US/developers/">Add-on SDK</a> a shot. If your add-on can be implemented using the SDK, it&#8217;s better for you that it is.</p>
]]></content:encoded>
			<wfw:commentRss>http://xulforge.com/blog/2011/07/version-numbers-add-on-breakage/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Back from Beijing</title>
		<link>http://xulforge.com/blog/2011/05/back-from-beijing/</link>
		<comments>http://xulforge.com/blog/2011/05/back-from-beijing/#comments</comments>
		<pubDate>Tue, 17 May 2011 23:49:48 +0000</pubDate>
		<dc:creator>jorge</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[amo]]></category>
		<category><![CDATA[editors]]></category>
		<category><![CDATA[jetpack]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[presentation]]></category>

		<guid isPermaLink="false">http://xulforge.com/blog/?p=93</guid>
		<description><![CDATA[I returned on Sunday from Beijing, where I presented at the Mozilla Developer Conference (warning: all-Mandarin page). Twice, in fact. I made a presentation about the Add-ons World (available here), and ended up stepping in for Paul Rouget, who couldn&#8217;t make it. His presentation on HTML 5 is really great and it didn&#8217;t take much [...]]]></description>
			<content:encoded><![CDATA[<p>I returned on Sunday from Beijing, where I presented at the <a href="http://mozilla.com.cn/event/29-2011mdc/">Mozilla Developer Conference</a> (warning: all-Mandarin page). Twice, in fact. I made a presentation about the Add-ons World (<a href="http://xulforge.com/mozilla/MDC2011/">available here</a>), and ended up stepping in for Paul Rouget, who couldn&#8217;t make it. His <a href="http://paulrouget.com/e/html5inthewild/">presentation on HTML 5</a> is really great and it didn&#8217;t take much effort on my part to talk about it. All of his demos are prerecorded, so the presentation is pretty much snafu-free, unlike my presentation or Myk&#8217;s, both of which had (minor) technical difficulties during the live demo. I tried following some of <a href="http://developer-evangelism.com/index.php">Chris Hellman&#8217;s</a> recommendations this time around, but I didn&#8217;t go as far as recording my demos. Oh, well.</p>
<p>My presentation is meant to be a starting point for those interested in add-on development. It contains many links on how to get started making extensions, GM scripts, SDK add-ons, Personas, Themes, and even mentions language packs, search engines and dictionaries. They include a trivial add-on that translates a string on a webpage, developed as a GM script, as an SDK add-on, and as an extension. Then I compare code complexity, flexibility, the security framework and other characteristics, trying to give developers a balanced view and good information on how to choose any of the above when building an add-on. Of course I can only gloss over the details during a 40-minute presentation; hence all the links. In the end of the presentation I briefly cover publishing on AMO, add-on monetization, and the plans for an add-on marketplace. I tried to personalize it a bit for the Chinese audience, so some things may not make as much sense.</p>
<p>The Q&amp;A session was surprising, in that the developers who asked questions were very knowledgeable in add-on development and had very specific questions. Some had very well-established products and demoed some really advanced add-ons. There&#8217;s such great add-on development happening in China that I wish we had a much better communication channel with developers over there. That&#8217;s something we need to work on.</p>
<p>Overall, the trip was excellent. The presentation went well, I got in touch with a number of developers in the area, and most importantly we had plenty of time to talk to the Mozilla Online team. I discussed our add-on performance initiative with them, which is specially relevant for them given that the default Firefox install for China includes about 10 add-ons preinstalled. A number of them also joined the AMO Editors team, which is actively <a href="http://blog.mozilla.com/addons/2011/05/04/join-us-help-reviewing-add-ons/">looking for new members</a>. I&#8217;m really happy because there are many add-ons that are only testable in China, by people who understand the language and local websites.</p>
<p>And, of course, the food and the sights we managed to squeeze into one day of touring around were all fantastic. I&#8217;d like to thank the Mozilla Online team again for the invitation and organizing this very successful event. Special thanks to 张羽 (Rachel Zhang) for taking care of us. I&#8217;m sure she feels like on holiday this week <img src='http://xulforge.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Random anecdote: I&#8217;m riding the subway by myself on the way to meet a friend who lives in Beijing, pointlessly trying to appear as if I do this all the time. Then some guy approaches me and starts speaking in what I assume was Mandarin, pointing to a cellphone he has in his hands. While I&#8217;m deciding how to react to this, I look at the phone and see a picture of me at the conference. Heh. It was just an attendant who was really happy to run into me in the subway. We managed to talk a little bit during the subway ride. Very friendly guy. So, there <img src='http://xulforge.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://xulforge.com/blog/2011/05/back-from-beijing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Testing add-on startup performance</title>
		<link>http://xulforge.com/blog/2011/04/testing-add-on-startup-performance/</link>
		<comments>http://xulforge.com/blog/2011/04/testing-add-on-startup-performance/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 02:04:22 +0000</pubDate>
		<dc:creator>jorge</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[amo]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[fire.fm]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[remotexulmanager]]></category>

		<guid isPermaLink="false">http://xulforge.com/blog/?p=88</guid>
		<description><![CDATA[Our add-on performance initiative is getting lots of attention for, lets say, various reasons. There have been objections about transparency and our testing methods, so I decided to add something valuable to the discussion and document my own testing process. I revisited my old add-on performance article and noticed that the contents of the Measuring [...]]]></description>
			<content:encoded><![CDATA[<p>Our <a href="http://blog.mozilla.com/addons/2011/04/01/improving-add-on-performance/">add-on performance initiative</a> is getting lots of attention for, lets say, <em>various reasons</em>. There have been objections about transparency and our testing methods, so I decided to add something valuable to the discussion and document my own testing process.</p>
<p>I revisited my old <a href="http://blog.mozilla.com/addons/2010/06/14/improve-extension-startup-performance/">add-on performance article</a> and noticed that the contents of the <a href="https://wiki.mozilla.org/Firefox/Projects/StartupPerformance/MeasuringStartup">Measuring Startup</a> wiki page have changed substantially since I originally linked to it. It now recommends installing an add-on  to measure startup performance. I haven&#8217;t tried it, but there are a few reasons I can think this is not the best approach. (<strong>Update:</strong> I&#8217;ve been informed that the add-on is only a display for data that is gathered and stored locally. You can make test runs and <em>then</em> install the add-on to look at the data. That dispels my previous doubts about this approach.) Regardless, I&#8217;m documenting the old testing method here, because it is the one I have been using for a while and is also very similar to the one implemented on our automated <a href="https://wiki.mozilla.org/Buildbot/Talos">Talos</a> testing framework.</p>
<p>I have been doing lots of add-on startup testing recently, mainly to double check if the results of the Talos tests are sound. We also correlate them to <a href="http://blog.mozilla.com/addons/2011/02/10/add-on-metadata-start-up-time/">real world usage data</a> that we have been collecting since early versions of Firefox 4. This data, manual testing and source code review are the main backup sources that give us a good confidence level in the results we display on our infamous performance page (it has been linked enough).</p>
<p>Here&#8217;s what I do.</p>
<h2>Setup</h2>
<ol>
<li>Create a new profile dedicated for testing add-on performance (I called it <em>startuptest</em>).</li>
<li>Download <a href="http://people.mozilla.com/~vladimir/misc/startup.html">this HTML page</a> and save it somewhere convenient. The page is blank if you open it directly. All it does is run some JS that extracts a timestamp after the # character in the URL, compares it against the timestamp when the script is run, and shows the difference on the page.</li>
<li>Set up a console command that opens Firefox in your testing profile and opens the downloaded file, with the current timestamp embedded after the # character. On my system (Mac OS), this command is the following:</li>
</ol>
<pre style="padding-left: 30px;">/Applications/Firefox.app/Contents/MacOS/firefox-bin -P startuptest -no-remote file:///Users/jorge/startup.html#`python -c 'import time; print int(time.time() * 1000);'`</pre>
<p style="padding-left: 30px;">The <a href="https://wiki.mozilla.org/index.php?title=Firefox/Projects/StartupPerformance/MeasuringStartup&amp;oldid=232309">old version</a> of the Measuring Startup page explains how to set this up on Windows.</p>
<h2>Testing</h2>
<ol>
<li>Locate the testing profile folder and delete all files in it, if there are any.</li>
<li>Open Firefox on this profile. You can use the console command or any other shortcut if you prefer.</li>
<li>Copy and paste the add-on listing page URL on the new profile and open the page.</li>
<li>Install the add-on using the install button and restart if necessary.</li>
<li>Optionally, set up the add-on in a realistic way. For example, if this is a Facebook add-on, it may make sense to log in to a Facebook account since otherwise most of the add-on&#8217;s functionality would be inactive.</li>
<li>Quit Firefox.</li>
<li>Run Firefox using the console command.</li>
<li>Note the result in the startup page.</li>
<li>Quit Firefox. I prefer using the Quit key shortcut, to interact with Firefox as little as possible.</li>
<li>Repeat steps 7-9. I discard the 2 first runs, which are normally much slower than the rest, and measure the 10 runs after that.</li>
</ol>
<h2>Interpreting results</h2>
<p>For your results to make any sense, it&#8217;s also necessary to make a test run without any add-ons installed, and use that as your baseline. It&#8217;s also a good idea to run all the tests consecutively to have some certainty that they are all running under similar conditions. I record and compare my results on a spreadsheet, like <a href="https://spreadsheets.google.com/ccc?key=0AhYIQk822ZJkdGdTdW16MTUyQm42SFBTbE81TW9zR0E&amp;hl=en&amp;authkey=CKa668gJ">this one where I tested both my add-ons</a>.</p>
<p>Looking at the results, Fire.fm has a somewhat noticeable impact on startup. This is not surprising because it is a complex add-on with a very complex overlay and startup processes. I documented on improving startup code in <a href="http://blog.mozilla.com/addons/2010/06/14/improve-extension-startup-performance/">my old blog post</a>, and we&#8217;re planning on greatly simplifying its overlay soon(ish). I doubt we&#8217;ll make the coveted 5%, but we&#8217;ll see. Remote XUL Manager is clearly simpler, and it shows how the results should not be taken at face value. Since all it does in the overlay is add a menu item that opens a separate window, it&#8217;s understandable that its impact is negligible. But does it really improve startup? No, of course not. This just means that the error margin is larger than its real performance impact.</p>
<p>The key takeaway here is that the results of manual tests shouldn&#8217;t be taken literally, but they&#8217;re still a good indicator of the performance impact of an add-on. Even if the error margin is not ideal (or even measurable under these conditions), you can still get a good idea of who&#8217;s fast and who&#8217;s slow. They have been very valuable to us when comparing them against Talos results.</p>
<h2>How does this compare to Talos?</h2>
<p>On one hand, these tests are influenced by how the testing system is set up. I have several applications open at all times, and I don&#8217;t close them all for testing. I do take care in not running anything heavy simultaneously, like Time Machine or MobileMe Sync. And then there&#8217;s clearly the fact that I have to spend some time setting things up and running the tests. The longer the tests take, the more likely it is that some other process affects the results.</p>
<p>On the other hand, it&#8217;s easier for me to recognize errors during testing. Many of the complaints we&#8217;ve received about the testing system is that it makes silly mistakes like trying to install an add-on from an incorrect URL, or trying to install an add-on that is not compatible with the Firefox version being tested. These are things that one can clearly see when testing manually, but they weren&#8217;t obvious when running the tests automatically. Those add-ons have been getting very good performance rankings because  they&#8217;re not really being loaded, so those results are not reliable.</p>
<p>Luckily, the people complaining about our testing are also filing bugs and talking to us directly, so we&#8217;re looking into the issues and trying to get them resolved as soon as possible. Special thanks to Wladimir and Nils, who have been very helpful filing and categorizing bugs. More details coming up in the Add-ons Blog.</p>
<p>As always, the developer community proves itself as an invaluable asset for Mozilla (well, you <em>are</em> Mozilla). Even if our discussions can become harsh and are generally very public, the outcome is almost always a set of improvements both in our technical and communication fronts. Getting things right take a lot of work and a lot of patience, and I hope we can quickly get to a place where we&#8217;re all satisfied.</p>
]]></content:encoded>
			<wfw:commentRss>http://xulforge.com/blog/2011/04/testing-add-on-startup-performance/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Firefox 4 Add-on Compatibility presentation</title>
		<link>http://xulforge.com/blog/2010/07/firefox-4-add-on-compatibility-presentation/</link>
		<comments>http://xulforge.com/blog/2010/07/firefox-4-add-on-compatibility-presentation/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 17:45:56 +0000</pubDate>
		<dc:creator>jorge</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[amo]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[presentation]]></category>

		<guid isPermaLink="false">http://xulforge.com/blog/?p=78</guid>
		<description><![CDATA[I&#8217;m presenting about Firefox 4 Add-on Compatibility at the Mozilla Summit a little later today. Here are the slides in PDF version for all of those interested. Firefox 4 for Add-on Developers For now, this is a pretty good reference if you want to start supporting the Firefox 4 betas in your add-ons. I&#8217;ll be [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m presenting about Firefox 4 Add-on Compatibility at the Mozilla Summit a little later today. Here are the slides in PDF version for all of those interested.</p>
<p><a href="http://xulforge.com/blog/wp-content/uploads/2010/07/Firefox-4-for-Add-on-Developers.pdf">Firefox 4 for Add-on Developers</a></p>
<p>For now, this is a pretty good reference if you want to start supporting the Firefox 4 betas in your add-ons. I&#8217;ll be elaborating on this subject through the following weeks, in the Add-ons Blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://xulforge.com/blog/2010/07/firefox-4-add-on-compatibility-presentation/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>XPI v2 &#8211; Making Extension Development Easier</title>
		<link>http://xulforge.com/blog/2010/03/xpi-v2-making-ext-dev-easier/</link>
		<comments>http://xulforge.com/blog/2010/03/xpi-v2-making-ext-dev-easier/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 18:16:19 +0000</pubDate>
		<dc:creator>jorge</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[add-on]]></category>
		<category><![CDATA[amo]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[idea]]></category>
		<category><![CDATA[jetpack]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[xulschool]]></category>

		<guid isPermaLink="false">http://xulforge.com/blog/2010/03/xpi-v2-making-extension-development-easier/</guid>
		<description><![CDATA[Note: this is just me throwing some ideas around. It is not an official proposal or spec. Having said that, I would like everyone that has interest in extension development to read this post and tell me what they think. I’ve been an extension developer for a long time, and I like to think that [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Note:</strong> this is just me throwing some ideas around. It is not an official proposal or spec. Having said that, I would like everyone that has interest in extension development to read this post and tell me what they think.</p>
<p>I’ve been an extension developer for a long time, and I like to think that developing extensions is actually quite easy. Maybe it has to do with my C++/Java background, where setting up a development environment is much more involved than using a text editor and zipping some files together.<br />
That doesn’t negate the fact that the Mozilla add-ons platform is old, and showing its age. There are a number of problems with it that make it hard to take the first steps into add-on development, and it’s amazing how little has been done to solve them over the past years. These are the top 3 in my mind:</p>
<ul style="list-style-type: disc;">
<li>Extensions can’t be installed or uninstalled without a browser restart.
<ul style="list-style-type: hyphen;">
<li>That’s <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=256509">bug 256509</a>. Can it be fixed? Probably, but it would take a major development effort.</li>
</ul>
</li>
<li>The documentation about extension development is incomplete or outdated.
<ul style="list-style-type: hyphen;">
<li>I’m working on this in the <a href="https://developer.mozilla.org/en/XUL_School">XUL School</a> project, to be finished soon.</li>
</ul>
</li>
<li>Getting started with a basic “hello world” extension is too much effort: install.rdf, chrome.manifest, chrome JAR, content, skin, locale, defaults, OMG!</li>
</ul>
<p>The last point is the one I want to tackle in this post. There’s a ridiculous amount of boilerplate, redundant coding to do even for the most basic of add-ons, specially if you’re making an extension that should be skinable and localizable. These are the specific problems I’ve identified:</p>
<ul style="list-style-type: disc;">
<li>There are two manifest files: install.rdf and chrome.manifest, in completely different formats.</li>
<li>They are both defined in relatively obscure formats. The install.rdf file is one of the very few places where RDF is still used in Firefox. Sticking to a dying format (at least in this context) is a very bad idea.</li>
<li>The default chrome structure (with content, locale, skin, etc.) is too bureaucratic and inflexible, and almost completely redundant. Most add-ons have exactly the same structure, and having to define it every single time is unnecessary.</li>
</ul>
<p>I think we can reimagine add-on packaging in way that simple tasks can be performed in the simplest of ways, and so that it can scale to be as fine-tuned as it is today. So here are my ideas.<strong>#1 Merge install.rdf and chrome.manifest into a single file.</strong> What format should be used? I think JSON is as good as any other, and Mozilla already includes a native and very fast JSON parser. This manifest file could also match the <a href="https://jetpack.mozillalabs.com/sdk/0.1/docs/#guide/packaging">package.json manifests</a> being used for Jetpacks. <em>package.json</em> is actually a pretty good name for the manifest file. Perhaps the same standard can be use for Jetpacks and other add-ons?</p>
<p><strong>#2 Default to the root extension directory for chrome URLs in order to minimize chrome.manifest declarations.</strong> This means that a hello world extension could have this structure:</p>
<ul>
<li> helloworld.xpi2
<ul>
<li>package.json</li>
<li>overlay.xul</li>
<li>overlay.js</li>
<li>overlay.dtd</li>
</ul>
</li>
</ul>
<p>And the manifest file would be something like:</p>
<pre>{
  id : “helloworld@xulforge.com”,
  name : “Hello World!”,  
  type: “2”
  compatibility :    
    { id : “{ec8030f7-c20a-464f-9b0e-13a3a9e97384}”,
      minVersion : “3.5”,
      maxVersion : “3.6.*”},     
  domain: “helloworldchrome”,
  overlays:      
    { source : “chrome://helloworldchrome/content/overlay.xul”,
      target : “chrome://browser/content/browser.xul”}
}</pre>
<p>(Note: ‘compatibility’ and ‘overlays’ can be arrays when there’s more than one item. And the ‘domain’ value is a general declaration of the chrome domain.)</p>
<p>In this new system, you would be able to have all of your chrome files in the root directory and have no need for chrome directives other than declaring your main overlay. Also, in your root directory you can have a <em>locale</em> or <em>skin</em> folder that the system would know how to handle without any changes to the manifest. If a file isn’t found in the <em>locale</em> or <em>skin</em> folder, then the system falls back to the root directory as a last resource. Of course it would still be possible to declare specific locations for content, locale and skin in the manifest, in order to allow the “old style” to be used.</p>
<p>What about other special locations?</p>
<ul style="list-style-type: disc;">
<li><em>platform</em> and <em>components</em> will continue to have their special meanings.</li>
<li>JSM files can be handled just the same as chrome files, except that they use <em>resource://</em> instead of <em>chrome://</em>.</li>
<li>The default preferences file should also be moved to the root and have a predetermined name, like <em>defaultPrefs.js</em>.</li>
</ul>
<p><strong>#3 Installing the package.</strong> When you install an XPI file, the file is unpacked in your profile directory. It is common (but not mandatory) practice for chrome files to be packed in a JAR file, which remains packed after installation. According to <a href="http://autonome.wordpress.com/2010/03/10/firefox-extensions-and-performance/#comment-706">recent discussions about add-on performance</a>, it’s more efficient to keep files packed together. Instead of requiring authors to use the internal JAR approach, I think it makes more sense to require authors *not* to use JARs, and then keep the packed XPI in the profile on installation. Files that need to be extracted, like the manifest (maybe) and binary components (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=533038#c3">according to this</a>) can be extracted upon installation. This way it’s up to the platform and not the developer to look after performance.That’s it. Given that this new packaging system would be backwards-incompatible with the current one, it might make sense to change the file extension to something like XPI2, in order to make a clearer distinction between the 2. However it should suffice to look for the manifest file in order to identify the system in use.<br />
How hard is this to implement? I think #1 and #3 are fairly simple to implement.  #2 is the one that may present a bigger challenge, since the chrome URL system is something that runs deep in the Mozilla code, and changing its file location rules could cause breakage or vulnerabilities in non-add-on code. It might also be possible to limit the scope of these changes to add-ons only, but again, that may require lots of work. I’d love to hear the opinions of those who work on this part of the platform.</p>
<p>Some may wonder how does Jetpack fit into this whole idea. Well, Jetpack is a different platform, and it may very well replace traditional add-ons in the long term, but <a href="http://blog.mozilla.com/addons/2010/01/11/add-ons-are-here-to-stay/">we’re still a long ways to go</a>. We shouldn’t see Jetpack as some kind of competition, but as a lesson in what we can do better. If we improve add-on packaging to be closer to Jetpack packaging (I think this would be), then it’s a win for both, because it’ll make it less painful for developers to choose and switch between either platform.</p>
<p>I’d love to hear what experienced developers (both add-on and platform) think about this. I think there’s a real gain for novice developers in this if we were to implement it. I intentionally left out some details for brevity, but I’ll be happy to discuss them in the comments. Thanks for reading.</p>
]]></content:encoded>
			<wfw:commentRss>http://xulforge.com/blog/2010/03/xpi-v2-making-ext-dev-easier/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>And now they wait&#8230;</title>
		<link>http://xulforge.com/blog/2010/01/and-now-they-wait/</link>
		<comments>http://xulforge.com/blog/2010/01/and-now-they-wait/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 17:05:39 +0000</pubDate>
		<dc:creator>jorge</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[amo]]></category>
		<category><![CDATA[editors]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[mozilla]]></category>

		<guid isPermaLink="false">http://xulforge.com/blog/?p=33</guid>
		<description><![CDATA[I guess giving 3 month&#8217;s advanced notice wasn&#8217;t enough for most add-on authors. I guess this is partly our fault, and we should stress enough how important it is for them to stay up to date with Firefox new, or at least the Add-ons Blog. On Thursday, the update queue had about 80 add-on updates [...]]]></description>
			<content:encoded><![CDATA[<p>I guess giving 3 month&#8217;s <a href="http://blog.mozilla.com/addons/2009/10/30/time-to-update-your-add-ons-for-3-6/">advanced</a> <a href="https://forums.addons.mozilla.org/viewtopic.php?f=10&amp;t=93">notice</a> wasn&#8217;t enough for most add-on authors. I guess this is partly our fault, and we should stress enough how important it is for them to stay up to date with Firefox new, or at least the <a href="http://blog.mozilla.com/addons/">Add-ons Blog</a>.</p>
<p>On Thursday, the update queue had about 80 add-on updates in line to be reviewed. This is a short as it&#8217;s been for a very long time. Today it stands close to 200 updates, and will continue to grow in the following couple of weeks. All authors are now rushing out updates because they just realized Firefox 3.6 is out.</p>
<p>Well, now it&#8217;s up to the editor team to catch up. It&#8217;ll take a while, I think. Authors that decided to update after the 3.6 release will now have to wait. It&#8217;s bad for everyone, and the result of bad communication. That&#8217;s something we&#8217;ll need to work on.</p>
]]></content:encoded>
			<wfw:commentRss>http://xulforge.com/blog/2010/01/and-now-they-wait/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Jetpack, Personas, and the future</title>
		<link>http://xulforge.com/blog/2010/01/jetpack-personas-and-the-future/</link>
		<comments>http://xulforge.com/blog/2010/01/jetpack-personas-and-the-future/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 18:50:53 +0000</pubDate>
		<dc:creator>jorge</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[amo]]></category>
		<category><![CDATA[editors]]></category>
		<category><![CDATA[jetpack]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[personas]]></category>

		<guid isPermaLink="false">http://xulforge.com/blog/?p=31</guid>
		<description><![CDATA[Mike Connor&#8217;s post on Jetpack and Personas has brought up lots of debate surrounding the future of the add-ons ecosystem. Extension developers are concerned about the future of XUL and the extensions they&#8217;ve spent so much time and effort on. Others are concerned about the future of the platform and its openness. I&#8217;d like to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://steelgryphon.com/blog/2010/01/09/on-personas-and-themes/">Mike  Connor&#8217;s post on Jetpack and Personas</a> has brought up lots of debate  surrounding the future of the add-ons ecosystem. Extension developers  are concerned about the future of XUL and the extensions they&#8217;ve spent  so much time and effort on. Others are concerned about the future of the  platform and its openness. I&#8217;d like to chime in as a veteran extension  developer and recent addition to MoCo. This is <strong>not</strong> an official statement, just my views on the situation.</p>
<p>First of all, let me be very clear about this: there is no short term  plan to eliminate the extension platform as we know it. XUL and XPCOM  run deep in Firefox. They <em>are</em> Firefox. Eliminating the  technologies that make extensions possible would require a rewrite of  pretty much everything in the platform, which is massive. I&#8217;m not saying  this couldn&#8217;t happen some time in the future (I don&#8217;t know, really),  but it isn&#8217;t something that can be accomplished within a few weeks, or  even a few months. It&#8217;s something that requires a great deal of planning  and the collaboration of the whole community. Extension developers  shouldn&#8217;t worry about their add-ons being obsolete overnight.</p>
<p>We should all look into the future, though. Not as something that  we&#8217;ll have to accept, but as something we can shape. Jetpack and  Personas are still experiments in many ways, and there&#8217;s much we can do  to make them what we want them to be. I personally doubt they will ever  reach the point where they will replace the current add-on options, but I  am confident that they can come very close, and that&#8217;s a big win for  everyone.</p>
<h2>Jetpack</h2>
<p>The goals of the Jetpack project are ambitious: no restarts for  install /  uninstall, a clean and more stable API, complete security,  and a much easier  development experience. They&#8217;re so ambitious that to  think all of these can be accomplished while preserving the flexibility  of the current platform would be naive at best.</p>
<p>There are no stable APIs. You can make higher abstractions that are  less likely to change. But they <em>will</em> change. Jetpack only makes  its add-ons dependent on its API, instead of the XUL/XPCOM platform. So,  instead of updating your add-on to the next Firefox version, you&#8217;ll  update it to the next version of Jetpack, which should happen much less  often. That is of course assuming there will be some sort of versioning  of the Jetpack API. If that&#8217;s not the case, well, then we have bigger  problems to be concerned about.</p>
<p>Jetpack, unlike XUL and XPCOM, is not a fully open system. It can&#8217;t  be. Not without sacrificing the security it&#8217;s meant to bring. As a  secure system, it should be closed by default, enabling through its API  only the features that are considered to be safe and necessary. This  limits add-on creativity to the API designers&#8217; imaginations, as opposed  to the developers&#8217;. On the other hand, in the current system extensions  can do pretty much anything. They can read, write and execute files.  They can change your preferences and access your saved passwords. They  can monitor your online activities and send information to third  parties. The only real protection between you and the extensions you  install is the review system that all of them have to go through in  order to be publicly listed on AMO. A group of reviewers (also known as  editors) make sure these extensions are safe to use and respect user  choice. Which one is better? To me, the answer is simple: if it&#8217;s  possible on Jetpack, use Jetpack. It&#8217;s simpler and safer. If it isn&#8217;t,  then fall back to extensions, where you have almost limitless control.</p>
<p>Jetpack add-ons <em>will</em> be easier to develop, and it <em>will</em> be possible to install and remove them without restarts. This is a huge  win for users and developers. Many, if not most add-ons will be easily  portable to this new platform, and they will benefit from it. It remains  to be seen, however, if highly complex (and extremely popular) add-ons  like AdBlock Plus, NoScript and Firebug will be able to live in the  Jetpack world. These extensions are strongly tied to the platform, and  their interactions would be very hard to translate into a general use  API. Maybe we can implement <code>jetpack.magic.doWhatNoScriptDoes</code> <img src='http://xulforge.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<h2>Personas</h2>
<p>Personas are not even close to being a replacement for themes.   Personas allow some very basic skinning using header and footer images   and setting font colors for the main toolbox. Surely they could be   extended to include images for the toolbar icons and some more advanced   customizations, but that&#8217;s not the case now, and even then they  wouldn&#8217;t be a complete replacement for themes. Themes can change the  appearance of the application in very significant ways, and this can&#8217;t  be accomplished without the complexity inherent in theme development.  So, theme developers, you&#8217;re not done yet either.</p>
<h2>The future</h2>
<p>I think the future for extensions and themes is still bright. Jetpack  and Personas have shown us how things can be different, and opening the  field for new development and competition is a win for all.</p>
<p>There&#8217;s much we can do to improve the &#8220;classic&#8221; add-on world, in the  area of documentation and tutorials, and even <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=256509">in the  platform itself</a>. We&#8217;re being shown how to improve. We should take  this as a call to action, and improve. Let&#8217;s work on the platforms that  will support the development of the future, but let&#8217;s not forget the  ones that are still active and thriving.</p>
<p>Let&#8217;s not forget how we got here.</p>
]]></content:encoded>
			<wfw:commentRss>http://xulforge.com/blog/2010/01/jetpack-personas-and-the-future/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wrapping loose variables and functions in Add-ons</title>
		<link>http://xulforge.com/blog/2009/08/wrapping-loose-variables-and-functions-in-add-ons/</link>
		<comments>http://xulforge.com/blog/2009/08/wrapping-loose-variables-and-functions-in-add-ons/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 23:33:13 +0000</pubDate>
		<dc:creator>jorge</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[amo]]></category>
		<category><![CDATA[editors]]></category>
		<category><![CDATA[mozilla]]></category>

		<guid isPermaLink="false">http://xulforge.com/blog/?p=17</guid>
		<description><![CDATA[We (AMO Editors) have traditionally rejected updates or nominations on add-ons that don&#8217;t follow the wrapping rule for variables and functions. This is an important rule IMO because the possible compatibility conflicts are very real and possibly damaging to user experience. Enforcing good user experience and code quality is part of our responsibility as editors, [...]]]></description>
			<content:encoded><![CDATA[<p>We (AMO Editors) have traditionally rejected updates or nominations on add-ons that don&#8217;t follow the wrapping rule for variables and functions. This is an important rule IMO because the possible compatibility conflicts are very real and possibly damaging to user experience. Enforcing good user experience and code quality is part of our responsibility as editors, so I think this rule should not be removed or lessened in any way.</p>
<p>This discussion came up due to a denied update for Text Formating Toolbar 0.1.4.11. I was requested to come up with a POC that demonstrates how name conflicts can cause problems, so I created this add-on, which conflicts with Text Formatting Toolbar using seemingly harmless code. Here&#8217;s the link:</p>
<p><a title="Name Conflict Extension" href="http://xulforge.com/blog/wp-content/uploads/2009/08/nameconflict.xpi">Name Conflict</a></p>
<p>If you install this with the Text Formatting Toolbar, you&#8217;ll notice that the bold, italics, code and color features are broken.</p>
<p>Here&#8217;s the code in my overlay:</p>
<pre>window.addEventListener(
  "load",
  function() {
    window.setTimeout(
      function () {
        formatItalics = "i";
        formatBold = "b";
        formatColor = "white";

        formatCode =
          function(aString) {
            if (typeof(aString) != "string") alert('Invalid Code!'); }
      },
      100);
  },
  true);</pre>
<p>As you can see, it&#8217;s fairly simple. The load event and setTimeout call are only used to make sure that it is the other extension and not this one the one that experiences the compatibility problems. <strong>If two add-ons use the same names in the global scope, then one is going to experience problems in one way or another.</strong> There&#8217;s nothing more to it.</p>
<p>Obviously I can intentionally create an add-on that causes conflicts with any other add-ons, but I hope you see past this and realize that the code I posted could very well be written by another author who is unaware of the rules we enforce. This is what we look after, and this is why we should reject global namespace pollution in almost all instances.</p>
]]></content:encoded>
			<wfw:commentRss>http://xulforge.com/blog/2009/08/wrapping-loose-variables-and-functions-in-add-ons/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
