Paul Hammant's Blog: Cozmos- CMS using webdav and Sitemesh
Cozmos project at CodehausKent Spillner started this, and I've been making some commits to it. http://cozmos.codehaus.org/ (click thru for screenshots)
The project is not eating its own dog food yet - its website is just a static page under simple DAV control. For good reasons - the version of Cozmos that we have presently is more like original wikis in that there is no authentication and anyone could change any page or upload arbitrary JSPs for server side execution (ouch).
It turns out that there are precious few lines of Java to code this. Well, it depends on SiteMesh which is a lot of lines of Java, but that does not count as its a provided library. It should be pretty easy for the PHP community to clone using PhpMesh. Similarly Ruby/Python with whatever decorating technologies fit.
webdav-servlet project at SourceForge
I've also been working (pairing one evening in San Francisco at the TW
office) with Stefan Groschupf on Webdav-servlet
which Cozmos uses instead of Slide. It was great fun to take a
slightly older code-base and together add some small modularity to it
and retrofit the first unit tests. We felt that webdav-servlet was
sufficiently complex enough to ignore preexisting web testing tools and
just use the excellent JMock with JUnit.
Cozmos, in one mode of operation uses webdav-servlet to store files on the file system without versioning. Its a really small codebase and quite neat.
What next?So given all of this stuff works (with limitations), what's next? Well the biggest thing would be to integrate Subversion like we did for that imperfect ThoughtWorks intranet in '03 (mentioned in a couple of prior blog postings). How would we do that?
mod_dav_svnThe Apache module 'mod_dav_svn' is flawed from the point of view - it does not communicate mime types on GETs like normal web server do. It might not matter though, if it is only used for writing content rather than read and write.
It could be that Cozmos could work for normal web traffic on a port 80 like normal traffic, and accept PUTs of changed/new content directly to an adjacent HTTPS (443) port that mod_dav_svn is listening on. The former would be without authentication, the latter with. This would be great for SeaMonkey as you can set this kind of duality in its publishing settings dialogs and it will remember it between publications. It won't work for Internet Explorer and MS Word as clients though, effectively killing them as viable clients.
If Cozmos' conditional Sitemesh decorator were used in conjunction with a proxying servlet (examples here and here amongst others), the thing could work. HTTP GET requests would be forwarded to the adjacent mod_dav_svn port. That server would have been configured to accept GETs without authentication, or a read-only Subversion account. All of the modifications to content, as previously mentioned would be pushed directly to the Subversion DAV server.