[Catalyst-dev] RFC: Catalyst::Engine::Embeddable / Catalyst::Model::EmbeddedCat

Daniel Ruoso daniel at ruoso.com
Thu Dec 6 18:22:42 GMT 2007


Hi,

I'm working towards the implementation of a Portlet[1] development
framework using Perl and Catalyst. My next steps are related to how to
implement the Container[2] application, which will handle a set of
portlets.

In this path, I'm planning to do that writing the container application
using Catalyst::Controller::SOAP, as to talk WSRP, and do a WSRP-HTTP[3]
mapping to talk to the "inner" application.

The thing is that I didn't want to lose the Catalyst features for any of
them, I'd like to have the Container application as a full-featured
catalyst application and the portlets as other full-featured
applications (including support to different dispatches and so on). That
way, I'm working on another paper[4] where I try to stablish how this
can be implemented in Catalyst. In the end I got the following idea:

      * Implement a new catalyst engine, which would simply provide an
        OO interface to the application, receiving a HTTP::Request
        object and returning a HTTP::Reponse object.
      * Implement a model class, which would map to one of this embedded
        applications.

This way, I would end with a Catalyst::Engine::Embeddable, which,
together with Catalyst::Model::EmbeddedCat (the names are just an idea)
would provide something like the following:

<DUMMY EXAMPLE CODE>
package MyApp::Model::Embedded;
use base qw(Catalyst::Model::EmbeddedCat);
__PACKAGE__->embed_application(Other::App::Name => 'OtherApp');
__PACKAGE__->embed_application(Yet::Another::App => 'YetAnotherApp');

#later in the code...

my $http_response =
  $c->model('Embedded::OtherApp')->handle_request($http_request);

my $http_response =
  $c->model('Embedded::YetAnotherApp')->handle_request($http_request);
</DUMMY EXAMPLE CODE>

So, before getting to work effectively on that, I'd like to hear your
ideas and critics...

daniel

[1] As described by the Web Services for Remote Portlets, WSRP.
[2] The container is the code that talks WSRP and manage a set of
Portlet applications.
[3] I wrote a paper explaining how this mapping works, available at:
http://people.debian.org/~ruoso/httpPortlet.pdf
[4] http://people.debian.org/~ruoso/catalystPortletContainer.pdf




More information about the Catalyst-dev mailing list