[Pharo-project] [COTDC] 3 - HTTPClient

Sven Van Caekenberghe sven at beta9.be
Mon Feb 7 21:35:58 CET 2011

On 07 Feb 2011, at 20:23, Dmitri Zagidulin wrote:

> Actually, can somebody explain the troll-mode comment? Why is the
> HTTPClient an example of how not to write code? Should we not be using
> this package in production? What does the comment about  "hacker with
> telnet"-protocol mean?

Well have a look at, for example,

HTTPSocket class>>#httpGetDocument:args:accept:request:


HTTPSocket class>>#httpPostDocument:args:accept:request:

Apart from the fact that, externally, the interface is at the same time too big and too small, this is just an enormeous procedural piece of code, without any object oriented structuring at all, let alone reusability. Furthermore, although it works more or less, it is incomplete and bloated at the same time. Nobody dares to touch it.

But please, go have a look yourself ;-)


More information about the Pharo-project mailing list