views:

78

answers:

3

If you were going to start developing a new Firefox add-on today, would you still use XUL/JS or would you start using Jetpack, the new add-on framework?

The XUL way of creating add-ons will continue to exist on Firefox 4 but Jetpack is clearly building steam and I imagine it will become the only way of creating add-ons in the future.

Is it already the time to start looking to switch/migrate to Jetpack?

+2  A: 

Hi there, I don't know yet Jetpack, but I coded a large extension for Firefox two years ago using XUL and it was really, really painfull.

I think Jetpack has to be better and simplier, and it's worth it to give it a try.

Guillaume Lebourgeois
Yes :) the learning curve to develop extensions in XUL is steep. I think simplifying the process is definitely the main idea behind Jetpack. I wonder what is the current status tough, is it limited in functionality compared to XUL? If it is worth to transition at this stage.
fms
I think it depends on your delays : if you want your extension usable within two weeks, use XUL. If you have all your time, and need it ready within 6 months, you should start with jetpack.
Guillaume Lebourgeois
+1  A: 

It depends on the size and scope of your add-on. If you believe it to be fairly simple, than I would start with XUL and only switch to the framework when you hit walls and find yourself saying "there must be a better way!"

I haven't used Jetpack, but I do agree with others here that XUL isn't always pleasant. It's amazing how often the documentation is missing some obviously key piece of information. Jetpack may smooth that over for you. Alternatively, you could help improve the documentation. :)

jeffamaphone
Yeah, the missing documentation is annoying. I have passed several hours searching for information only to find nothing. In the end I always finish looking for answers in the source code of extensions that do what I am looking for :)
fms
And then you update the MDC wiki, to leave it more useful than you found it, right? ;)
MatrixFrog
I did not know I could do that :) I will from now on
fms
I think you have it completely other way around ... first start with Jetpack and only when you cannot help it (and I think you won't hit this limit anytime soon), you can switch to XUL plugin. Also, there are tons of documentation on developer.mozilla.org and you have always Jetpack API documentation with cfx docs.
mcepl
+2  A: 

JetPack and XUL are not mutually exclusive. JetPack is a set of APIs that you can ship with an add-on that are tested by Mozilla and guaranteed to work. I'd suggest you start with JetPack, and if you need to do something more powerful, you can start adding XUL and other JS files to accomplish what you need. JetPack is designed to be simpler, but you can also step into the scarier world of extension development without issue.

sdwilsh
Yes, as I read more about Jetpack, I think this will be the approach. A combination of both, using some of the Jetpack APIs and complementing it with JS/XUL when I need functionality that is not provided yet.
fms