It's pretty straight-forward. If code affects the User Interface directly,
such as changing the value in a text box, responding to a Click event or
other UI event, etc, it should be part of the code for the UI (form). If it
does not, it should be part of the business layer/classes. Now, where it
might get a little confusing is, for example, when an event handler does
something to a business object. Here, you want to use the event handler to
call a business method. In practice, it becomes only slightly more complex,
but that's the basic principle. Let your business layer do all the
manipulation of business data and enforcement of business rules. Let the UI
layer provide an interface between the User and the business classes/layer.
--
HTH,
Kevin Spencer
Microsoft MVP
Professional Numbskull
This is, by definition, not that.
"randy1200" <ra*******@newsgroups.nospam> wrote in message
news:C8**********************************@microsof t.com...
I have a WinForm class that has accumulated a tremendous amount of logic
code. Can anyone point me toward a good article on factoring logic code
out
of a WinForm class?
Thanks,
--
Randy