[AGENT++] SNMP classes design (SNMP++, SNMP4J, SNMP++.NET)

Marek Malowidzki malowidz at wil.waw.pl
Thu Aug 12 09:33:59 CEST 2004


> Hi Marek,
>
> My two cents (for what its worth) is that GetPdu and SetPdu by
> their declarations are verbs and therefore I'm more inclined to think of
> them as methods rather than classes.  Is that what you are suggesting?
> If it is, that is not what you said.  A C++ class (or any class for that
> matter) is a type, not an action.  To quote Scott Meyers: "Class design
> is type design".

I definitely meant the classes.

> Maybe I don't understand the GetPdu and SetPdu classes you
> propose but I do not see the 'elegance' you imply in them.  Also,
> implementing a separate class for each PDU type is very un-object
> oriented indeed.  At a minimum these class should be derived from some
> sort of base Pdu class (type).

Well, I think it *is* very object-oriented, of course, with some inheritance
hierarchy, as you mentioned. My post was maybe not detailed enough.

> Again, maybe I simply don't understand what you are suggesting
> because there is little for me to digest from your posting (other than
> you are simply making a claim) and since you elected to send it to
> everyone who subscribes to this mailing list I'm sure you won't mind
> some feedback, even if that feedback is not in agreement with what you
> are saying.
>
> Finally, please don't misconstrue my response.  Although I don't
> use C# I'm sure the C# community appreciates your efforts and
> contributions you have so graciously made.  Rather, I'm simply saying
> (or suggesting) that one elaborate more prior to posting messages that
> could be considered "throwing stones", which maybe one could say I'm
> doing myself ... :-)

That's ok, I understand there is always some tradeoff involved in every
design decision. Please see my other reply to Frank's post for more details
(sent a while ago).

Marek




More information about the AGENTPP mailing list