On Thu, 10 Mar 2005 13:53:48 -0500, Steve Comrie <[EMAIL PROTECTED]> wrote:

> I converted their demo app -> 
> http://www.modernmethod.com/sajax/sajax-0.8/php/example_multiply.php to one 
> running on my code using C::A -> http://www.unobserved.org/misc/rs/

I wish I could see the code.  However
http://www.unobserved.org/misc/rs/ is done for me.

Interesting you posted about xmlhttp.  I've been using xmlhttp alot
lately using cgi-app.  Basically, the only thing I've done was make it
so I could pass an argument to the script and it would return XML
instead of using TT(template toolkit).

sub myrunmode {
  my $self = shift;
  my $params = {}

....

  return $self->process('mytemplate.tmpl', $params);
}

sub process {
  my($self, $mytemplate, $params) = @_;
  if($self->query->param('xml')) {
    use XML::Simple;
    my $xml = new XML::Simple (noAttr=>1);
    $self->header_props(-type=>"text/xml");
    return $xml->XMLout($params);
  } else {
    $self->tt_process($mytemplate, $params);
  }
}

Whats great about this is, for me at least, no code has to get changed
to use this and you can use something like REST to access your webapp.

Also another thing, with TT you usually need a TON of more data inside
the params hash.  Then you'd need with xmlhttp.  Basically because
with TT you're building a whole page, and with xml http you're
building a part or section of a page.  In my case I was also doing
worthless queries etc.  So beware of this.  In my case I created a
wrapper, using cgi-app, around modules that I would normally just
include into my application modules.

-- 
Jason Yates
[EMAIL PROTECTED]

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/cgiapp@lists.erlbaum.net/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to