You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by "Pill, Juergen" <Ju...@softwareag.com> on 2001/03/08 10:08:01 UTC

RE: cvs commit: jakarta-slide/src/webdav/client/src/org/apache/we bdav/lib/methods WebdavMethodBase.java

Hello remy,

OK, I understand your concern. 
I have added this factory method, to prevent all WebDav clients to implement
a long if-else-if cascade.

What do you think when separating the two layers to remove the factory
method in the http part, and move it as a static service function to the
WebDav specific layer?



Best regards

Juergen Pill

 -----Original Message-----
From: 	Remy Maucherat [mailto:remm@apache.org] 
Sent:	Wednesday, March 07, 2001 7:24 PM
To:	slide-dev@jakarta.apache.org
Subject:	Re: cvs commit:
jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods
WebdavMethodBase.java

Hi Juergen,

>   +    /**
>   +     * Factory method to return a method object based on the
methodName.
>   +     * If the method name is not known, null is returned
>   +     */
>   +    public static WebdavMethod factory(String methodName) {
>   +        WebdavMethod result = null;
>   +        if (methodName.equalsIgnoreCase("COPY")){
>   +            result = new CopyMethod();
>   +        }
>   +        else if(methodName.equalsIgnoreCase("DELETE")){
>   +            result = new DeleteMethod();
>   +        }

<snip>

>   +        return result;
>   +    }

I'm a bit worried that this could limitate pluggability.
For example, I plan to separate the HTTP/1.1 client library and the HTTP/1.1
methods (GET, PUT, ...) from the WebDAV specific parts (the XML resp base,
and all the methods), and perhaps eventually contribute the HTTP library
core to the "commons" subproject (which is a repository for shared code -
http://husted.com/about/commons/).

That patch would prevent that, since it would tie the HTTP parts and the
WebDAV specific stuff together.

Remy

Re: cvs commit: jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods WebdavMethodBase.java

Posted by Remy Maucherat <re...@apache.org>.
> Hello remy,
>
> OK, I understand your concern.
> I have added this factory method, to prevent all WebDav clients to
implement
> a long if-else-if cascade.
>
> What do you think when separating the two layers to remove the factory
> method in the http part, and move it as a static service function to the
> WebDav specific layer?

Yes. Another problem is that it hard codes the handlers for each method. For
example, it's no longer possible to provide an alternative implementation
for any of the methods.

Remy


Re: Guide me

Posted by Remy Maucherat <re...@apache.org>.
> Hi all,
>    i want to implement a content management system for
> my organisation. i would like to know how much of it
> has been implementd and what has been left. how much
> part will i have to implement on my own

You can get a rough estimate by doing :
Features advertised on the front mage - features still listed on the status
page.

Remy


Guide me

Posted by Apoorv Gupta <ap...@yahoo.com>.
Hi all,
   i want to implement a content management system for
my organisation. i would like to know how much of it
has been implementd and what has been left. how much
part will i have to implement on my own

THanks in advance
apoorv
   


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/