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

Glenn Puchtel gpuchtel at gplicity.com
Thu Aug 12 03:03:31 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".

	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). 

	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.

	If possible, maybe you can show some examples of how your
approach is better, which maybe it is but until I (and most likely
others) see some contrast and comparisons it is not fair to suggest your
approach is more 'elegant' than that of Agent++ or SNMP4J without
backing it up or showing us the error of our OO ways.

	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 ... :-)

Regards,
Glenn Puchtel 

-----Original Message-----
From: agentpp-bounces at agentpp.org [mailto:agentpp-bounces at agentpp.org]
On Behalf Of Marek Malowidzki
Sent: Wednesday, August 11, 2004 4:00 AM
To: agentpp at agentpp.org
Subject: [AGENT++] SNMP classes design (SNMP++, SNMP4J, SNMP++.NET)

Hi,

I reviewed the class diagram for SNMP4J and have a question about it.
Similarly to SNMP++, a single "PDU Bag" class is used to include all
possible PDU types. For example, there is no such a class like GetPdu,
SetPdu, etc. I am curious, why you have decided to follow the SNMP++
approach when designing the Java API. I think that it would be, from the
OO
design point of view, a lot more elegant to assign functionality to
related
classes.

Best regards,

Marek

PS. Originally, for SNMP++.NET, I intended to implement a separate class
for
each PDU type. However, taking into account that the package is
addressed
mainly to SNMP++ developers, and taking into account SNMP4J (you are
creating a kind of standard!), I have decided to also apply this
approach as
people are getting used to it. (Although I personally do not like this
approach.)

_______________________________________________
AGENTPP mailing list
AGENTPP at agentpp.org
http://agentpp.org/mailman/listinfo/agentpp





More information about the AGENTPP mailing list