POE::XUL

Framework for remote XUL application in POE
Download

POE::XUL Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Philip Gwyn
  • Publisher web site:
  • http://search.cpan.org/~gwyn/

POE::XUL Tags


POE::XUL Description

Framework for remote XUL application in POE POE::XUL is a Perl framework for remote XUL application in POE.SYNOPSIS use POE; use POE::Component::XUL; POE::Component::XUL->spawn( { apps => { Test => 'My::App', # .... } } ); $poe_kernel->run(); ########## package My::App; use POE; use POE::XUL::Node; use base qw( POE::XUL::Application ); ##### sub boot { my( $self, $event ) = @_; $self->{D} = Description( "do the following" ); Boot( "This is a test application" ); Window( HBox( $self->{D}, Button( label => "click me", Click => 'Click' ) ) ); $self->createHandler( 'other_state' ); } ##### sub Click { my( $self, $event ) = @_; $event->defer; $poe_kernel->yield( 'other_state', $event ); } sub other_state { my( $self, $event ) = @_; $self->{D}->textNode( 'You did it!' ); $self->{W}->firstChild->appendChild( $self->{B2} ); $event->handled; } ##### sub shutdown { my( $self, $SID ) = @_; $kernel->alias_remove( $self->{SID} ); }See also the examples in eg/.POE::XUL is a framework for creating remote XUL applications with POE. It includes a web server, a Javascript client library for Firefox and a widget toolkit in Perl.POE::XUL is pronounced similar to puzzle.At the heart of POE::XUL is the concept of mirror objects. That is, each XUL element exists as a Perl object (POE::XUL::Node) in the server and as a DOM object in the client. A ChangeManager on the server and the javascript client library are responsible for keeping the objects in sync. Note that while all element attribute changes in the server are mirrored in the client, only the most important attributes (value, selected, ...) are mirrored from the client to the server.POE::XUL currently uses a syncronous, event-based model for updates. This will be changed to an asyncronous, bidirectional model (aka comet) soon, I hope.XUL is only supported by browsers from the mozilla project (Firefox and xulrunner). While this limits POE::XUL's use for general web application, POE::XUL would make for some very powerful intranet apps.NOTE: POE::XUL should be considered beta quality. While I have applications based on POE::XUL in production, the documentation is probably incomplete and this API will probably change.POE::XUL is a fork of Ran Eilam's XUL::Node. POE::XUL permits multiple windows, multimode content and the async use of POE events during event handling. It also removes the use of the excesively slow Aspect and the heavy XML wire protocol. POE::XUL::Node's API is closer to that of a DOM element. XUL::Node's (IMHO) dangerous autoloading of XUL::Node::Application packages has been removed. Requirements: · Perl


POE::XUL Related Software