Ran Eilam > XUL-Node-0.06 > XUL::Node::Application

Download:
XUL-Node-0.06.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  5
Open  1
View/Report Bugs
Source  

NAME ^

XUL::Node::Application - base class for XUL-Node applications

SYNOPSYS ^

  # subclassing to create your own application
  package XUL::Node::Application::MyApp;
  use base 'XUL::Node::Application';
  sub start { Window(Label(value => 'Welcome to MyApp')) }

  # running the application from some handler in some server
  use XUL::Node::Application;
  XUL::Node::Application->create('MyApp')->start;

  # Firefox URL
  http://SERVER:PORT/start.xul?MyApp

DESCRIPTION ^

To create a XUL-Node application, subclass from this class and provide one template method: start(). It will be called when the application is started.

XUL::Node::Server::Session starts applications by calling the class method create($application_name), then creating a closure which calls start() on the application object. The closure is run by the change manager, which collects any changes to nodes so they can be passed to the client.

syntax highlighting: