S
Sid Price
Hello,
I have struggled with this question for many years and have so far not come
up with what I consider a good answer. Consider one is designing a windows
forms based application using vb.net. The main form of the application has a
number of sets of controls that provide the GUI for particular application
functions. One can design a class hierarchy that reflects the functions of
the various sets of controls and hides the logic of the processing from the
rest of the application. To achieve this the main form either has to
intercept and pass-off events to the various objects encapsulating the logic
of the controls or pass references to the controls to the classes and let
them handle the events directly.
I find both of these methods create too tight a dependency between the main
form and the logic of each control set. Is there a better way? Is there a
way to continue using the forms' editor to create the layout of the form and
have the controls encapsulated in the processing classes?
Any suggestions or pointers to reading materials would be much appreciated,
Sid.
I have struggled with this question for many years and have so far not come
up with what I consider a good answer. Consider one is designing a windows
forms based application using vb.net. The main form of the application has a
number of sets of controls that provide the GUI for particular application
functions. One can design a class hierarchy that reflects the functions of
the various sets of controls and hides the logic of the processing from the
rest of the application. To achieve this the main form either has to
intercept and pass-off events to the various objects encapsulating the logic
of the controls or pass references to the controls to the classes and let
them handle the events directly.
I find both of these methods create too tight a dependency between the main
form and the logic of each control set. Is there a better way? Is there a
way to continue using the forms' editor to create the layout of the form and
have the controls encapsulated in the processing classes?
Any suggestions or pointers to reading materials would be much appreciated,
Sid.