Re: NNTP design - factory pattern

From: Doc O'Leary (droleary.usenet_at_2005.subsume.com)
Date: 01/08/05


Date: Fri, 07 Jan 2005 20:49:01 -0600

In article <xp9fw8gunssz.dlg@dont-listen.net>,
 Adie <usenet@dont-listen.net> wrote:

> My question is, as the NNTP protocol is already written, and set in stone,
> should I base my OOD around the NNTP rules or should I abstract away from
> it to what it's actually doing (if you know what I mean).

In my mind, the message transport layer is essentially independent of
the messages themselves. Once you have it, it really doesn't matter if
it came via NNTP, SMTP, IRC, or anything else. It's possible one
protocol will provide information the other's don't, but that, too,
would benefit from abstraction. For example, I'd like to be able to
gather all "Development" related messages regardless of their source
group/server/protocol. So while you will have to implement the
nitty-gritty of NNTP to get messages into your system, at that point
there is really very little reason you should restrict their used based
on their source.

> Also, when responses return from the server, they could be error messages,
> no response, articles, lists of groups etc... I'd obviously like some
> behaviour to recognise what they are and encapsulate them into whatever
> type of object they should be, so might a factory fit this scenerio and if
> so how might it look?

I'm not sure I understand your question. It almost sounds like you want
to use one raw object to make all the requests instead of using an
object that abstracts the operation. That is, I expect you would do
something like send a Group class an allGroups message to get a list of
groups.

> (Using C#)

You have my sympathy.



Relevant Pages

  • Re: [nntp going down in the history books with aol!] was Re: News Reader Question
    ... nntp aka news, gopher, archie, plain text telnet ... plain static html sites are almost dead. ... offering access to the Usenet Netnews service. ... server and can easily switch between multiple lists at will. ...
    (Ubuntu)
  • Re: [opensuse] Is this list obsolete?
    ... With the new NNTP based support forums, ... a link for subscribing to email lists anymore? ... For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx ...
    (SuSE)
  • Re: [OT] misc.test LARTed by Google
    ... | mirrored to Usenet. ... message from "The Google Groups Team". ... "Yes:) gmane is just a NNTP frontend for the Google mailing lists." ...
    (news.software.readers)
  • Re: setup fedora-list in mail client. pls help
    ... The Mozilla suite handles HTTP, NNTP, and mail, at least. ... Gmane provides a news feed that you can access using NNTP and HTTP. ... I read messages from the public lists. ...
    (Fedora)
  • Re: Thoth 2: the return of Thoth
    ... Andrew, I never ever realized the groups were also accessible by nntp. ... Haven't turned on the e-mail gateway for many of the lists as I ... eMailman, LLC - Andrew Starr, President ...
    (comp.sys.mac.apps)