Re: NNTP design - factory pattern
From: Doc O'Leary (droleary.usenet_at_2005.subsume.com)
Date: 01/08/05
- Next message: frebe: "Re: What is an OODBMS?"
- Previous message: Ron Jeffries: "Re: how many bugs do you find and correct during TDD?"
- In reply to: Adie: "NNTP design - factory pattern"
- Next in thread: Marc Rohloff: "Re: NNTP design - factory pattern"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Next message: frebe: "Re: What is an OODBMS?"
- Previous message: Ron Jeffries: "Re: how many bugs do you find and correct during TDD?"
- In reply to: Adie: "NNTP design - factory pattern"
- Next in thread: Marc Rohloff: "Re: NNTP design - factory pattern"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|