NAME
XUL::App - Nifty XUL apps in a XUL::App
VERSION
This document describes XUL::App 0.01 released on Jun 22, 2008.
SYNOPSIS
$ xulapp app --name YSearchAll
$ cd YSearchAll
$ xulapp view --name Overlay --type overlay
# Edit lib/YSearchAll/App.pm to add the following lines:
package YSearchAll::App;
our $VERSION = '0.01';
use XUL::App::Schema;
use XUL::App schema {
+ xulfile 'overlay.xul' =>
+ generated from 'YSearchAll::View::Overlay',
+ includes qw( xulapp/jquery.js overlay.js ),
+ overlays 'chrome://browser/content/browser.xul';
+
xpifile 'ysearchall.xpi' =>
name is 'YSearchAll',
# Add and edit js/ysearchall.js manually
$ xulapp overlay -p dev11
$ xulapp bundle . # generate XPI ready for deployment
DESCRIPTION
XUL::App is a nifty Firefox extension development framework based on
Perl. It has a lot of parallels with Jifty.
This framework has the following highlights:
* Jifty love on the Firefox extension development land.
* Building a realworld Firefox extension can be much easier than
GreaseMonkey hacks.
* Use 100% Perl to specify XUL layout via Template::Declare, no XML
pain.
* The resulting XPI file contains 0% Perl and could run everywhere
(Win32, Mac, Linux, and etc). It's a compiler-style framework.
Currently the module is in alpha stage and we're in severe lack of
documentation. But you can get a lot of information from the slides that
I used in the talk:
http://agentzh.org/misc/slides/xulapp/xulapp.xul (a JS-enabled Firefox is required to view these slides)
If you're having problems in displaying the slides given above, please
try out the PowerPoint (PPT) version below:
http://agentzh.org/misc/slides/xulapp.ppt
or the PDF version:
http://agentzh.org/misc/slides/xulapp.pdf
CAVEATS
* Because XUL::App wites to your ~/.mozilla/firefox directory
directly, it's always recommended to backup that directory to
somewhere else to prevent unexpected corruption occurring to your
Firefox profiles.
* After applying Firefox updates or using a new Firefox profile, it's
required to restart Firefox one more time to load your extensions.
So please don't fire bug report regarding that.
* Only Firefox 2.0.0.* and Firefox 3.0 on Linux has been tested
against this framework. So you're warned when you're going to do
XUL::App hacking on other platforms like Windows.
(BTW, I'm very willing to apply patches for other platforms.)
SOURCE CONTROL
You can always get the latest source of XUL::App from the following SVN
repository:
http://svn.openfoundry.org/xulapp/trunk/
There's very little POD docs, please read README and the slides for
details.
I really need help in improving this module's docs, tests, and
implementation. If you find this thing useful and feel like contributing
to it, please write to me and get a commit bit! ;)
SAMPLES
* SearchAll is a real-world Firefox extension that is built upon
XUL::App, which can serve as a big demo for the usage of the
framework:
L
* ExportReader: A Firefox extension to dump entries from Google Reader
to JSON:
L
* A helloworld sample extension is given in my XUL::App talk's slides:
L
INSTALLATION
perl Makefile.PL
make
sudo make install
BUGS
Sadly XUL::App does not run on Win32 yet. I've only tested it on Ubuntu
Linux so far. If you have any problems or would love to help, please let
me know ;)
SEE ALSO
Jifty.
AUTHOR
Agent Zhang
COPYRIGHT
Copyright 2007 by Yahoo! China Inc. (http://cn.yahoo.com)
LICENSE
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.