Posted Aug 31, 2009
Web Services API for Plone Alpha 3 Release
Details the release of the wsapi4plone.core package and the plans for future releases. The final report of the AtomPub for Plone Google Summer of Code project.
The web services API for Plone project was part of the Google Summer of Code (GSoC) project "Atom Publication Protocol (AtomPub) for Plone". The web services API for Plone (wsapi4plone.core) package is a Plone product that provides small, easy to learn XML-RPC interface to Plone content. The Parfait (wsapi4plone.parfait) package is a web services gateway interface (WSGI) middleware that enables AtomPub for Plone. The GSoC project goal was to provide an XML-RPC interface for Parfait that in turn would enable AtomPub requests and responses for Plone.
The project was unique for GSoC, in that there were two individuals working on the same project. Chelsea Bingiel and myself have been working towards the same goal but on different levels of the system. Chelsea had been working on Parfait, while I was working on the core package of the wsapi4plone. The end result is a functional AtomPub interface for Plone, as well as a Plone web services API.
The Google Summer of Code
The wsapi4plone wasn't built exclusively for the AtomPub GSoC project. In fact, Kevin Kalupson and I had been in a project planning phase before the GSoC project came to our attention. The initial goal was to create a small, easy to learn web services API for Plone. It was determined the best way to approach the problem was to use the tools available to us in Zope 2 and Plone. XML-RPC was determined to be the best tool for the job, because it works out-of-the-box in Zope 2.
The week before GSoC ended, WebLion invited Chelsea Bingiel to Penn State for a three day sprint on the AtomPub project. The goals of the sprint were to make HTTP GET, POST, PUT, and DELETE AtomPub requests and responses against a test instance of Plone. Chelsea had a lot of the ground work for the middleware created before the sprint, which made it very easy to attain these goals. The sprint was successful, AtomPub requests to create, update and receive objects from Plone work to spec.
Current state of the project
Version 0.1a3 of the wsapi4plone.core package was released last week. A few of the major improvements are:
- Bug fixes that came out of our AtomPub sprint. The biggest one was the way in which one sets up the parameters for the post_object and put_object calls.
- SchemaExtender fields now show up in the call results.
- Usage documentation for the XML-RPC calls has been created.
- Tests have been added and/or rewritten.
There are several other bugs, tasks and enhancements are ticketed in the WebLion Trac site that have been fixed or started, but lack tests. Any opinions, thoughts and comments on those tickets would be appreciated.
Thoughts about future releases
Items that will be in the next wsapi4plone.core release:
- Improve the documentation using Sphinx.
- Provide documentation for service adapters.
- Extract the the Archetypes service adapters out of wsapi4plone.core into wsapi4plone.services.archetypes.
- Create and document the wsapi4plone extensions components.
- Provide JSON responses for text/html requests on the calls.
Additional related tasks:
- Provide a python testing framework for packages using the wsapi4plone calls outside of Plone.
- Tighten up existing wsapi4plone.* package integration using automated tests and a buildbot setup.
- Think about using Funkload to see how fast (or slow) the API calls are.
Progress is being made
The wsapi4plone.parfait package is functional and has produced more than satisfactory results, but it is far from complete (the nature of open source projects). The AtomPub specification has some incompatibilities with Plone (e.g. AtomPub is inherently flat, folder hierarchy is something that needed a work around). There are still a few challenges to overcome, but the package is looking good for a summer's worth of coding.
Since the wsapi4plone.core package's first demonstration at the Plone Symposium East 2009 it has come a long way, but it is still in an alpha state. There is a lot of work yet to be done, but the time and effort spent on this project will open up Plone to a world of new possibilities.
Sally Kleinfeldt is right on, things are looking up.
