<?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; xulforge</title>
	<atom:link href="http://xulforge.com/blog/tag/xulforge/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>My experience porting an add-on to Mobile Firefox</title>
		<link>http://xulforge.com/blog/2011/10/porting-an-add-on-to-mobile/</link>
		<comments>http://xulforge.com/blog/2011/10/porting-an-add-on-to-mobile/#comments</comments>
		<pubDate>Sat, 08 Oct 2011 00:44:47 +0000</pubDate>
		<dc:creator>jorge</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[add-on]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[remotexulmanager]]></category>
		<category><![CDATA[xulforge]]></category>

		<guid isPermaLink="false">http://xulforge.com/blog/?p=112</guid>
		<description><![CDATA[I&#8217;ve been meaning to experiment more with Mobile Firefox for a while, but I&#8217;ve had very little time to work on my own add-ons, which are the best source of real-world development experience for me. Since I had received a couple of requests to port Remote XUL Manager to mobile, and this is a fairly [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been meaning to experiment more with Mobile Firefox for a while, but I&#8217;ve had very little time to work on my own add-ons, which are the best source of real-world development experience for me. Since I had received a couple of requests to port <a href="https://addons.mozilla.org/en-US/firefox/addon/remote-xul-manager/">Remote XUL Manager</a> to mobile, and this is a fairly simple extension, I thought this would be the ideal learning experience.</p>
<p>Since I already had a working desktop extension, the amount of coding needed was <a href="https://github.com/jvillalobos/Remote-XUL-Manager/commit/e33f34e680224204abcb3c12e49828d145406be9">fairly small</a>. However, I did encounter several difficulties along the way, which I think are worth documenting. Here&#8217;s how it went.</p>
<h2>Documentation</h2>
<p>The first thing I looked for was documentation. It&#8217;s not hard to find the <a href="https://developer.mozilla.org/en/mobile">Mobile documentation</a> page if you know that the Mozilla Developer Network exists. That&#8217;s a good hub with useful tidbits, although it could use some cleanup and consolidation. Many of its useful links lead to the Mozilla wiki, outside of MDN, and they are written in the format you expect for the wiki, not MDN. The <a href="https://wiki.mozilla.org/Mobile/Fennec/Extensions">Fennec Extensions page</a> covers some of the basics, but it fails to say how to create a basic overlay. Something many developers need to know to get started is which chrome path is necessary to overlay. I believe it&#8217;s the same path as in Firefox, but I ended up not using an overlay at all.</p>
<h2>UI</h2>
<p>Figuring out the UI for my port was one of the most difficult steps. In Firefox I just add a menu item that opens the main management window. My extension also has a few extra windows for advanced features, but early on I decided not to support them in the mobile version.</p>
<p>The only UI area you really have available is the content, so I decided to create an <em>about:remotexul</em> XUL page. This requires registering a JS component instead of an overlay, and the component just tells Firefox to redirect <em>about:remotexul</em> to a XUL page in my chrome package. So, instead of clicking on a menu item, the user has to type this URL. Not terribly user-friendly, but not that bad either. I considered adding a button somewhere, but gave up almost immediately.</p>
<p>Which leads me to a few questions about mobile add-on development. Firstly, how can we expect add-ons to be built for mobile if there is no place for them in the UI? Do we only want add-ons that work silently in the content? And (more importantly IMO) are we applying the same philosophy for tablets? It seems that, at least in terms of add-ons and UI space, mobile phones and tablets are entirely different playgrounds.</p>
<p>My take on it is that we need an Add-on Bar for both. The panel on the right-hand side can afford one more button, and this button could toggle another panel where add-on buttons can live. A similar approach could be used for tablets, but in their case I think the toolbar could be enabled by default (provided it has buttons in it). Having no way to add UI is a gigantic obstacle in the way of add-on creation for mobile. The possibility of improving performance through more native UI toolkits is also a looming obstacle that we&#8217;ll need to tackle.</p>
<p>As a minor side note, I noticed some drawing oddities when panning my XUL document in the content area. I guess XUL content hasn&#8217;t been given enough attention on mobile, so if you want to take this same approach, you might want to consider using HTML instead.</p>
<h2>Testing environment</h2>
<p>Getting Mobile Firefox set up was much more difficult than I expected.</p>
<p>Since there&#8217;s a desktop emulator of Mobile Firefox and I didn&#8217;t have any supporting mobile devices at the moment, this was my only way to test. So I went to the main <a href="http://www.mozilla.org/en-US/mobile/">Mobile page</a> to download the emulator. Oddly enough, this page offered (and continues to offer) version 4.0.1, which is a few releases old by now. The &#8220;See all our channels&#8221; link takes you to the desktop Firefox channels page, and changing <em>firefox</em> for <em>mobile</em> in the URL leads to a 404.  So I downloaded 4.0.1, and one of the first things I tried was to check for updates. There were none.</p>
<p>Hmm, ok, so I needed to do a little hunting for the emulator. Luckily, the MDN page has a direct link to the <a href="https://ftp.mozilla.org/pub/mozilla.org/mobile/releases/">FTP site</a>, with all builds for all platforms. So I downloaded the Mobile Firefox 6 emulator for Mac OS. I fired it up and everything looks OK until I try to load a page. Any page turns up blank. So I go to the #mobile channel on IRC and ask around. I am told to use Linux instead&#8230; But I also got a useful <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=670763">bug link</a>. It turns out that the switch to multiple processes for Mobile Firefox broke the Mac OS build, and I guess it&#8217;s not such a big priority to get that sorted out. I suppose that this bug will get more attention once desktop Firefox goes multi-process for content.</p>
<p>At this point I realized I was going the <em>about:</em> page route for the UI, so I was able to test and debug most of the port in desktop Firefox. Then the Mozilla All Hands came along and I got a new Asus Android tablet for testing, so no more emulation for me <img src='http://xulforge.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>The build-install-test cycle was really slow for me, though, since the easiest way to get the extension installed is to upload it to some public URL and install it using InstallTrigger (a bit of JS magic used to install add-ons from HTML). If you can use the emulator in your system, though, file:// URLs work fine as a shortcut.</p>
<h2>Tools</h2>
<p>I also felt the lack of development tools, some of which are key to add-on development.</p>
<p>I commonly used the <a href="https://developer.mozilla.org/en/Toolkit_API/FUEL">FUEL library</a> in my add-ons. Since it isn&#8217;t supported on mobile, I had to get rid of that code. Luckily, it wasn&#8217;t much I needed to change. There is ongoing work to port Jetpack to mobile, so that will probably become the best set of libraries available for add-ons in the future. For now I&#8217;ll just plug to components directly.</p>
<p>DOM Inspector is another tool I use heavily. But, is it even possible to have something like DOMi on mobile? Maybe on the tablet version, but certainly not on a phone&#8230; However, I think there are ways around this. It should be possible to integrate DOMi into the emulator. You can have it open in a separate window and inspect the mobile UI from there. Another random idea I have is to wrap the Mobile Firefox emulator as an extension you can install in desktop Firefox, so you get the benefits of all development tools that are already part of Firefox. I&#8217;m not sure if that&#8217;s feasible, though.</p>
<h2>Conclusions</h2>
<p>There are still many rough edges when diving into mobile add-ons for Firefox, some of which I think are not hard to fix. But there are also hard problems to solve, and hard questions to ask: does it make sense to support such a wide variety of add-ons in a mobile phone browser? And what about tablets?</p>
<p>This is an almost exhaustive list of the problems I encountered while porting my add-on, so I hope it isn&#8217;t taken the wrong way. The truth is that most of my code worked without any modifications. It is very satisfying to be able to support even more users of my add-on, and to have one of the few desktop+mobile add-ons around. Plus, tinkering around with code, failing and then succeeding is just plain fun <img src='http://xulforge.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>Remote XUL Manager 1.1 is the first version that supports mobile, and it&#8217;s currently waiting to be reviewed (irony!). You can give it a try on <a href="https://addons.mozilla.org/en-US/firefox/addon/remote-xul-manager/versions/?page=1#version-1.1">this page</a>.</p>
<p>I&#8217;d love to hear what others have to say about trying to port add-ons to mobile. If you have any similar stories, please share them in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://xulforge.com/blog/2011/10/porting-an-add-on-to-mobile/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Introducing My Personas</title>
		<link>http://xulforge.com/blog/2009/05/introducing-my-personas/</link>
		<comments>http://xulforge.com/blog/2009/05/introducing-my-personas/#comments</comments>
		<pubDate>Thu, 28 May 2009 18:45:02 +0000</pubDate>
		<dc:creator>jorge</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[add-on]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[personas]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[xulforge]]></category>

		<guid isPermaLink="false">http://xulforge.com/blog/?p=11</guid>
		<description><![CDATA[For my first &#8220;official&#8221; Xulforge project, I decided to take on a relatively simple task, so that I could get the site and blog started quickly. This way at least I have some content to show for while I work on larger projects . This first project is My Personas. This project is a set [...]]]></description>
			<content:encoded><![CDATA[<p>For my first &#8220;official&#8221; Xulforge project, I decided to take on a relatively simple task, so that I could get the site and blog started quickly. This way at least I have some content to show for while I work on larger projects <img src='http://xulforge.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . This first project is <a title="My Personas project at Xulforge" href="http://xulforge.com/personas/">My Personas</a>.</p>
<p>This project is a set of skins for the <a href="http://www.getpersonas.com/">Personas</a> extension. Personas is a new approach to developing themes for Firefox and other Mozilla apps. Creating a skin is pretty simple: all you need is a header image and a footer image. Creating a good one is a little harder; you&#8217;ll need to fill a very, very large image area, while at the same time keeping in mind that only a tiny fraction of the image will be visible in the majority of browsers. Patterns and other artificial designs are probably easier, but mine are just extracts from my large photo collection, so it&#8217;s trickier.</p>
<p>I have a list of the skins I&#8217;ve created in the <a href="http://xulforge.com/personas/">project page</a>, with explanations on why I chose the pictures. So far my designs are doing pretty well, with a few hundred active daily users at this time. You can see the user counts in <a href="http://personas.services.mozilla.com/gallery/Designer/jorgev">my designer page</a>.</p>
<p>My skins were all created using <a href="http://www.gimp.org/">The Gimp</a>, and the pictures were taken with 2 different models of the Canon PowerShot (I upgraded recently). Artistic feedback is greatly appreciated.</p>
]]></content:encoded>
			<wfw:commentRss>http://xulforge.com/blog/2009/05/introducing-my-personas/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Getting started</title>
		<link>http://xulforge.com/blog/2009/05/getting-started/</link>
		<comments>http://xulforge.com/blog/2009/05/getting-started/#comments</comments>
		<pubDate>Thu, 14 May 2009 17:38:16 +0000</pubDate>
		<dc:creator>jorge</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[xulforge]]></category>

		<guid isPermaLink="false">http://xulforge.com/blog/?p=3</guid>
		<description><![CDATA[Hello, welcome to Xulforge. My name is Jorge Villalobos. I&#8217;m a software developer who has been working for the past couple of years with Mozilla technologies, particularly XUL and Firefox extensions. I co-developed the very successful Fire.fm extension with Jose Enrique Bolaños, and helped develop several other extensions during my tenure at Glaxstar. I particularly [...]]]></description>
			<content:encoded><![CDATA[<p>Hello, welcome to Xulforge.</p>
<p>My name is Jorge Villalobos. I&#8217;m a software developer who has been working for the past couple of years with Mozilla technologies, particularly XUL and Firefox extensions. I co-developed the very successful <a title="Fire.fm" href="http://firefm.sourceforge.net">Fire.fm</a> extension with Jose Enrique Bolaños, and helped develop several other extensions during my tenure at <a title="Glaxstar" href="http://glaxstar.com">Glaxstar</a>. I particularly enjoyed working on the <a title="eBay Sidebar for Firefox" href="https://addons.mozilla.org/en-US/firefox/addon/5202">eBay Companion</a>.</p>
<p>I quit Glaxstar to pursue my own projects and ideas, and this is the purpose of Xulforge. I&#8217;ll be focusing mostly on Firefox extensions, but occasionally I might try a few different things which will likely end up here as well. I also have a <a title="Jorge Villalobos - Blog" href="http://jvillalobos.blogspot.com">personal blog</a> which I&#8217;ll continue to use (and usually neglect) for more personal matters.</p>
<p>I&#8217;ll post again shortly, hopefully, with updates on the projects that I&#8217;ll be working on over here.</p>
]]></content:encoded>
			<wfw:commentRss>http://xulforge.com/blog/2009/05/getting-started/feed/</wfw:commentRss>
		<slash:comments>0</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! -->
