WebDAV

Preliminary Points

  • WebDAV can be used to manage

    • source resources (aka Webware entities: psp, cheetah templates, servlet source files, graphic assets, etc.)

    • logical resources (i.e., Application objects; e.g., Purchase Order, Article, Author, Buyer, Album, Artist, etc.) using the REST (representation state transfer) Web Architecture.

  • The application of DAV semantics to source resources is fairly generalizable, which means an out-of-the-box implementation in WebKit will work for just about any use case

  • But the application of DAV semantics to logical resources is not very generalizable, so WebKit's DAV implementation needs to be as easily customizable and extensible as possible

  • There is a core of DAV requirements that can be implemented independently of specific application semantics:

    • Request and Response handling, including XML and HTTP header parsing and creation

    • Some parts of property management, including a storage interface, which may well be able to leverage WebKit's Session Store interface and/or MiddleKit

    • Some parts of lock management, including lock token creation

  • One of the most important use cases for DAV in Webware is MS Web Folders used to provide basic, generic CMS facilities for Webware sites

  • Another important use case is management of source resources

  • Given the variety of applications of DAV semantics in the various use case contexts, it's important to have maximal flexibility in the way WebKit goes about ManagingTheURISpace.

  • One obvious place to begin an implementation is to write a custom databinding between DAV HTTP Requests and XML entity bodies and Python structs (classes or dicts or some other custom data structure); SAX is likely to be the fastest solution, and the least memory consumptive, but it basically means writing a state machine, and that can get hairy, though the DAV XML isn't too bad. For DAV XML response construction, DOM makes good sense. -- initially, anyway, during prototyping, it won't matter very much; the important thing to get right is the in-memory representation of the XML entity bodies in DAV Requests (and Responses).