[Catalyst] A suitable method to redraw a page
jshirley at gmail.com
Wed Sep 24 02:26:39 BST 2008
On Tue, Sep 23, 2008 at 4:30 PM, Dermot <paikkos at googlemail.com> wrote:
> 2008/9/23 Mesdaq, Ali <amesdaq at websense.com>:
>>I think ajax would be your friend here.
> I think I'll try something like that. As the files and Cat App are on
> one server and the referrer is a different server, I will have the
> referrer call a local script and fire a request from there.
> The question then is what type of Controller to use. There seems to be
> 2 choices, REST and XMLRPC. I'll try plugin::XMLRPC.
Plugin::XMLRPC is -not- a controller, as such, you probably do want to use it.
Ajax is nothing more than an async request from a browser, with a
serialization format attached (but doesn't have to be, you can send
out html snippets just fine). If you want to use a DWIM approach and
fetch data REST will be the best bet. If you want html snippets,
don't use any of the plugins, just return the snippet of the page you
want to serve and code it in the JS.
If you use Catalyst::Controller::REST handles serialization based on
the Content-type header, with built-in support for JSON, YAML, XML and
quite a few other formats. It also isn't intrusive to your other code
(like a Plugin is).
More information about the Catalyst