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

Frank Fock fock at agentpp.com
Thu Aug 12 00:13:18 CEST 2004


Hi Marek,

May be it's a question of taste, but having different classes for different
PDU types does not seem to be very object oriented for me. It is much
easier to write generic tools for PDU processing when dealing with a
single (or a small set) PDU class.
SNMP v2 PDUs have been designed by the IETF to be of the same
format, so why should we use different classes for the different types?

If you want to add functionality for a special PDU type, you can write
an adapter class.

What kind of functionality do you want to include in a PDU class?

Best regards,
Frank

Marek Malowidzki wrote:

>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