DISCUSS: CPAN Namespace for AJAX

DISCUSS: CPAN Namespace for AJAX

am 03.08.2005 18:18:42 von lawrence

I have a module that is ready for release, it just needs a (better)
name. The working title has been "Pail" (Perl/Ajax Implementation
Layer) but that does not fill me with joy, as it is utterly opaque.

I have noticed that there appear to be *no* AJAX related modules in
CPAN (which I find difficult to believe), and the only module I have
found OUTSIDE of CPAN was Sajax.pm which is pretty deficient (not
using the "X" in AJAX being at the top of the list.)

Some ideas that I have had:

1) HTTP::AJAX::Pail

Keeps the "cutesy" name, but puts it into a namespace where it will at
least invite reading.

2) HTTP::AJAX::Class

My module is an object-oriented base-class, and as such deserves a
highly generic name. (Although it has two variants, one that provides
XML marshalling for return values, and one that allows arbitrary text
return).

A little detail about the functionality:

On the server side, you write a class

package My::Class;
use base 'HTTP::AJAX::Pail';

sub get_record {
my ($self, $paramhash) = @_ ;
return undef unless exists $paramhash->{record_num};
my $message = do_something($paramhash->{record_num});
return ( { record_num => $paramhash->{record_num} ,
record_text => $message } );
}

1;

In your javascript you do something roughly like:



There are some other details I'm glossing over right now, because they
seem to be outside the scope of the "What do I *CALL* this thing?"
discussion.

FYI (because you're dying to know) - the method=javascript is a
'magical' method that walks your derived class's symbol table, and
creates a javascript class, 'My_Class' with stub routines to build the
AJAX request and fire it off.

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - lawrenabae@abaluon.abaom s/aba/c/g
Computer software consists of only two components: ones and
zeros, in roughly equal proportions. All that is required is to
sort them into the correct order.

Re: DISCUSS: CPAN Namespace for AJAX

am 03.08.2005 21:58:13 von Robert Sedlacek

Lawrence Statton N1GAK/XE2 wrote

> I have noticed that there appear to be *no* AJAX related modules in
> CPAN (which I find difficult to believe), and the only module I have
> found OUTSIDE of CPAN was Sajax.pm which is pretty deficient (not
> using the "X" in AJAX being at the top of the list.)

Just on this one: Look for HTML::Prototype :)

greets, phay

--
thou shallst fear ..

Re: DISCUSS: CPAN Namespace for AJAX

am 04.08.2005 11:42:16 von Ron Savage

On Thu, 4 Aug 2005 05:58:13 +1000, Robert Sedlacek wrote:
> Lawrence Statton N1GAK/XE2 wrote

Hi Folks

Well, actually it's JavaScript::RPC::Server::CGI you want, even though the=
name
is /not/ buzz-word-compliant ;-0.

Re: DISCUSS: CPAN Namespace for AJAX

am 10.08.2005 14:03:18 von Robert Sedlacek

Ron Savage wrote
> Well, actually it's JavaScript::RPC::Server::CGI you want, even though
> the name is /not/ buzz-word-compliant ;-0.

What are you replying to? I was trying to say that there *is* already an
AJAX module, named HTML::Prototype.

p

btw: Your lines seem a bit long.

--
sapere aude.