commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xiaowei Jiang <xiao...@stratify.com>
Subject RE: HttpClient vs. Jigsaw vs. HTTPClient
Date Fri, 24 May 2002 06:27:37 GMT
Thanks for your information. Now I understood why I gave up on jigsaw client
about a month ago. They used some confusing class names, like HttpServer,
HttpBasicServer, HttpMuxServer are actually used to implement http client!
This coming together with the fame of jigsaw http server made me think that
it's only a server side thing. I spend some time playing with it. The
following is my oppinion on it:

Pros
1) I really like the design. I have to say it's superior to apache's
httpclient. It's extremely extensible without need to hack their source
code.

Cons
1) The client is tightly coupled with the jigsaw server. Trying to separate
out the client is not an easy thing. This is not a big issue if you don't
care about the size of distributable.

2) The main interface HttpManager doesn't follow redirects. Although you can
use their implementation of HttpURLConnection to do that, but you will lose
most of the functionality in HttpManger. However, adding another class on
top of HttpManager to support this should be easy.

3) It's still in a buggy stage. Maybe it's just because it follows the
standard too strictly. The reality is http servers do all kinds of wield
things. Strictly following the standard will only kill you. Even though it
has a setLenient method, it's not lenient enough. e.g. The cookie handling
failed for http://www.snapfish.com/ because one cookie doesn't have a value
set. Given its superior design, all such issues can be easily fixed without
touching their source code. But  you need lots of testing to identify all
the problems.

I really wish that there were a good http client in java available. But
unfortunately, none of them is good enough. I guess if you have enough time
to fix bugs in jigsaw client, that might be the choice in the long term.
Otherwise, apache's httpclient might be a better choice in the short term.

xiaowei


-----Original Message-----
From: Gunnlaugur Thor Briem [mailto:gthb@dimon.is]
Sent: Thursday, May 23, 2002 11:45 AM
To: Jakarta Commons Developers List
Subject: RE: HttpClient vs. Jigsaw vs. HTTPClient


Hi Xiaowei,

yes, there's definitely a client-side implementation,
just take a look!

API docs:

   http://jigsaw.w3.org/Doc/Programmer/api/index.html

Packages:

   org.w3c.www.http
   org.w3c.www.protocol.http
   org.w3c.www.protocol.http.auth
   org.w3c.www.protocol.http.cache
   org.w3c.www.protocol.http.cookies

Simple usage example (from API doc of class
org.w3c.jigsaw.protocol.http.HttpManager):

   HttpManager     manager = HttpManager.getManager() ;
   Request request = manager.createRequest() ;
   request.setMethod(HTTP.GET) ;
   request.setURL(new URL("http://www.w3.org/pub/WWW/"));
   Reply    reply = manager.runRequest(request) ;
   // Get the reply input stream that contains the actual data:
   InputStream in = reply.getInputStream() ;

CVSweb access:

   http://dev.w3.org/cvsweb/java/classes/org/w3c/www/http/
   http://dev.w3.org/cvsweb/java/classes/org/w3c/www/protocol/http/
   http://dev.w3.org/cvsweb/java/classes/org/w3c/www/protocol/http/auth/
   http://dev.w3.org/cvsweb/java/classes/org/w3c/www/protocol/http/cache/
   http://dev.w3.org/cvsweb/java/classes/org/w3c/www/protocol/http/cookies/

"Real" CVS access (anonymous, read-only of course):

   http://www.w3.org/Jigsaw/Team.html#help

Cheers,

	- Gulli


--
To unsubscribe, e-mail:
<mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:commons-dev-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message