[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
new Perl module for Atom servers
Derived from Isofarro's atomrest.pl server and drawing heavily on Benjamin
Trott's XML::Atom Perl module, I've written a subclass of the Perl module
XML::Atom::Server. The goal is not to implement a complete server, but
rather to provide a Perl module that others can subclass in order make a
server. It's like XML::Atom::Server, but it provides more prepackaged
functionality.
What I have now is:
* the XML::Atom::Server2 module
* for demonstration purposes, an rudimentary but functional
Atom server using the module
* a small set of unit tests for testing Atom servers
* a little bit of documentation
Here's how the new class might be used. An implementor would subclass
the XML::Atom::Server2 class and override methods, just like with
XML::Atom::Server. There are 7 methods that almost any implementation
would want to override. An implementor needs to provide a way to:
* tell if an entry with a given ID exists
* let us know if authentication is being used
* produce a @list of all entry IDs which exist
* given the ID of an entry, produce the body of that entry's content
* create a new entry
* update an entry with a new XML::Atom::Entry
* delete an entry
My goal is for the implementor to never have actually think about
whether a request was a GET or a POST or whether it was sent to this
or that URI (unless they want to). For more control, however, the
implementor
could override the basic HTTP method handlers.
So far I've only used the unit tests on my server, but I hope that they can
be easily adapted to test any Atom server, by changing a few config
variables.
This is a pre-alpha release (because it works for me, but no one else
has tried it yet); and I personally don't know much about
the Atom spec. Be warned!
-- bayle
(please don't respond to me at my hotmail email address; if you'd like to
email me, my username is bshanks, and you can email me at my username at
users dot sourceforge dot net)
_________________________________________________________________
Get reliable access on MSN 9 Dial-up. 3 months for the price of 1!
(Limited-time offer)
http://join.msn.com/?page=dept/dialup&pgmarket=en-us&ST=1/go/onm00200361ave/direct/01/