[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Methods, data hiding, and friends



Hi,

I have some questions about the design of netconf data models and rpc
methods. I am going to go back to my comparison of programming
languages to describe the situation.

In SNMP, the small number of functions have direct access to any
variable anywhere in the MIB (scoped by a copntext of course). This is
very consistent with the apporoch used by assembly language, BASIC
(before structured BASIC was developed), C, and other procedural
languages. A major problem with the design of these languages was
side-effects; a given variable could be modified by one function, and
another function may not be aware when the data changed, and this led
to frequenetly-hard-to-locate bugs.

As object-oriented languages were developed, one desirable feature
that was included was data hiding. The actual implementation of the
data in an object was hidden behind methods. This offered the benefit
that an object implementation could change from an array to a linked
list or a hash table, and the consumer of the functionality proided by
the method call should never know the difference.

I view capabilities as similar to objects; they have some hidden data
associated with them, but the public interface is through a set of
special-RPC methods.

In O-O development, the software industry found a need to have things
like inheritance, private methods, and friend methods.

In netconf, a capability's method such as "create-vlan" may need to
manipulate the data elements of other capabilities, such as the
interface capability. Will methods of one capability be permitted to
directly modify the data of another capability, or will they be
constrained to utilize public and friend interface methods of the
other capabilities?


David Harrington
dharrington@huawei.com 
dbharrington@comcast.net
ietfdbh@comcast.net





--
to unsubscribe send a message to netconf-request@ops.ietf.org with
the word 'unsubscribe' in a single line as the message text body.
archive: <http://ops.ietf.org/lists/netconf/>