创建新的 Firefox 附加组件:XUL 还是 Jetpack?
如果您今天要开始开发新的 Firefox 附加组件,您还会使用 XUL/JS 还是会开始使用新的附加框架 Jetpack?
创建附加组件的 XUL 方式将继续存在于 Firefox 4 上,但 Jetpack 显然正在发展壮大,我想它将成为未来创建附加组件的唯一方式。
是否已经开始考虑切换/迁移到 Jetpack 了?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
JetPack 和 XUL 并不相互排斥。 JetPack 是一组 API,您可以将其与附加组件一起提供,这些附加组件经过 Mozilla 测试并保证可以正常工作。我建议你从 JetPack 开始,如果你需要做一些更强大的事情,你可以开始添加 XUL 和其他 JS 文件来完成你所需要的。 JetPack 的设计更加简单,但您也可以毫无问题地进入更可怕的扩展开发世界。
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.
我还不知道 Jetpack,但两年前我使用 XUL 为 Firefox 编写了一个大型扩展,这真的非常非常痛苦。
我认为 Jetpack 必须更好、更简单,值得一试。
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.
这取决于您的附加组件的大小和范围。如果您认为它相当简单,那么我会从 XUL 开始,只有当您碰壁并发现自己说“一定有更好的方法!”时才切换到框架。
我没有使用过 Jetpack,但我确实同意这里其他人的观点,即 XUL 并不总是令人愉快。令人惊讶的是,文档经常缺少一些明显关键的信息。 Jetpack 可能会帮你解决这个问题。或者,您可以帮助改进文档。 :)
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. :)