Hi Asiri,
Asiri Rathnayake wrote:
Hi Ludovic and all,
I have completed refactoring xwiki-webdav code base.
*Benefits:*
1. Code is easy to read & understand (still missing javadoc though).
2. Increased modularity.
3. Very easy to extend (Add new views, types etc).
*Features :*
1. True parent-child navigations is possible (wasn't possible before).
2. Add / Remove child pages into / from pages.
3. Edit Wiki content of pages.
4. Delete child pages / Attachments.
5. (Adding attachments is one step ahead - need 1.6 core)
6. Add / Remove pages into / from spaces.
7. Add / Remove spaces - partially done.
Ludovic, please have a look at the new code and let me know what you
think :)
The refactoring sounds nice. Documentation is a bit missing and I would
need to spend a little more time in the code to see if it's perfect, but
it sounds pretty nicely modular.
*Missing :*
1. Copy / Move operations.
I found Move especially necessary with some applications
that prefer to
create a collection then move it instead of simply doing a PUT
2. Locking & Versionning.
*Questions / Concerns :*
1. What should be the content-length of collection resources
(currrently 0)
I'm not sure what this is supposed to be. You should look at what a
typical file system based Webdav server does
2. Is it meaning full to have GET / HEAD methods on
collection
resources (as this would mean downloading a directory hierarchy, which
is not possible AFAIK)
I'm not sure what it would bring. If it's not necessary and does not
bring any visible benefit just drop it
3. LIBRARY_VIEW : I didn't implement this view
(yet) because i don't
understand how we can upload a directory hierarchy into a server as
mentioned on the design
<http://dev.xwiki.org/xwiki/bin/view/Design/WebDAVService>. Can
someone please explain what exactly 'uploading a directory' means ?
Maybe
it's uploading a full folder with files.. by drag and dropping it
for example. If the Windows and Mac clients don't send these commands,
drop it.
4. Deleting collection resources seems to present few complications :
i) Some clients (nautilus) uses a recursive delete procedure. Some
clients (dav explorer) does not allow deleting collection resources.
Let's forbit deleting collection resources but only allow deleting the
wiki.txt or attachments..
In any case postpone delete..
ii) If a page is deleted recursively, all child pages
are deleted
before the parent is removed :(
If clients do recursive deletes then maybe we should not allow delete at
all..
5. attachments / orphans views, should we allow pages
to be added /
deleted on this views ?
I think so unless there is a problem
*What's Next :*
I will start to write test cases for xwiki-webdav using jakarta slide
<http://jakarta.apache.org/slide/> for next week to come (but i don't
have much of an idea what it would be like).
Sounds good
It would be nice to have some comments on the current
code base and
possibly answers to above questions :)
I'll try looking more in details at the code..
Ludovic
Thanks.
- Asiri
--
Ludovic Dubost
Blog:
http://blog.ludovic.org/
XWiki:
http://www.xwiki.com
Skype: ldubost GTalk: ldubost