Having WebDAV interface sounds very very cool, but under no circumstances should we introduce yet another direct database access layer.
At present, Wiki is a web based single tier application -- the code that modifies the databases is intermixed with the UI code that renders web pages.
The API has to duplicate some of the db access logic, together with various security validations, to provide useful services. This obviously results in a major architectural NO-NO: any change to db access logic has to be done in two places (usually more). Hence the delay with implementing commit through API -- the internal data commit code simply cannot be duplicated, but instead must be cleanly separated into the commit logic and the Web UI logic, so that the API can call the same code as UI.
It seems that you have (partially?) accomplished that separation and I hope we can commit it to the trunk.
Hopefully at some point in the distant future we will have a "business logic tier" that will be the only code that access databases, and all UIs/WebDav/etc will only interact with it, not db. The current API implementation might be considered a starting point, but it lacks in several important areas like commit and caching. We should probably discuss it during the hacking days.
--Yurik
On 6/14/07, Simetrical Simetrical+wikilist@gmail.com wrote:
On 6/14/07, Jack Bates ms419@freezone.co.uk wrote:
However the code is still very "proof of concept" - I'm still figuring out how the code will be finally organized. Unless I can contribute this interface to the MediaWiki project, I guess it should be organized as a MediaWiki extension? However I'm still getting familiar with how MediaWiki delegates requests to extensions. Most WebDAV clients demand hierarchical URLs and don't support query strings, so I currently use two additional PHP landing pages in the MediaWiki root directory:
- webdav.php handles WebDAV requests for articles like
webdav.php/<MediaWiki_Article_Name>
- deltav.php is responsible for DeltaV functionality. Its layout is
based on Subversion's, e.g. deltav.php/ver/<Revision_ID>, deltav.php/bc/<Revision_ID>, etc.
If I continue using this layout, I will spend some time cleaning and reorganizing the code. But before I do, I'd love some feedback from MediaWiki developers: Is this a reasonable design? What are the alternatives to and the consequences of introducing these two new landing pages?
It sounds like a reasonable approach for the external appearance. Unfortunately, it will require mod_rewrite or equivalent, in that the default behavior of HTTP servers would require that query strings be used, but from what you say (I'm not familiar with WebDAV) that might be unavoidable. It's akin to the query.php and api.php that we have now. Alternatively, perhaps you could talk with Yurik about modifying api.php so you could have api.php/WebDAV/ as your root, which would probably make more sense.
Eventually, I would like to move this project to the MediaWiki Subversion repository. Here is my SSH public key, signed with my GPG key: http://cgi.sfu.ca/~jdbates/tmp/freegeek/id_dsa.pub.gpg
My username is "jablko".
That should be possible to arrange immediately. Just e-mail Brion.
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l