G
GMButler
When coding in any language in a pure object oriented
fashion, it is imperative that the language support
polymorphism, inheritance and encapsulation. How does
one completely encapsulate the data and behavior of a
VB.NET object such that the methods and properties are
executed or set by trapping messages that are sent as the
result of an event. No object should be directly
referenced from any other object (in other words, no
property of Object1 should be set from within Object2 or
no method of Object1 should be called from within
Object2). If I want to correct any object's bad behavior
(bug), I need only examine that object and no other. If I
want a property set for an object based upon some event
happening, I need only go to that object to discover what
messages(Collaborators in CRC parlance) it traps and the
methods it executes when that message is trapped. So, how
is this accomplished in VB.NET?
fashion, it is imperative that the language support
polymorphism, inheritance and encapsulation. How does
one completely encapsulate the data and behavior of a
VB.NET object such that the methods and properties are
executed or set by trapping messages that are sent as the
result of an event. No object should be directly
referenced from any other object (in other words, no
property of Object1 should be set from within Object2 or
no method of Object1 should be called from within
Object2). If I want to correct any object's bad behavior
(bug), I need only examine that object and no other. If I
want a property set for an object based upon some event
happening, I need only go to that object to discover what
messages(Collaborators in CRC parlance) it traps and the
methods it executes when that message is trapped. So, how
is this accomplished in VB.NET?