Design Question

  • Thread starter Thread starter Ian
  • Start date Start date
I

Ian

I am trying to implement the MVC design in my winform app. I have few
questions about it. First when I am binding a dataset to a control what I
do know is have the controller class invoke an event in the UI by passing it
the dataset from the data layer. I then bind the dataset in the UI, is this
the right way? I also create some controls at runtime and I pass the
groupbox control to the controller class and i add the new controls. Is
this good design? I guess I am having trouble with seperating to the UI and
Controller classes.

Thanks
 
Hello,

Thanks for posting in the group.

Based on my experience, I feel MFC should be a good resource for you to
refer to. The document view structure of MFC is a good reference. We could
maintain a relationship between data layer and UI in controller class. UI
and data layer should have pointer to each other also. So UI could get its
corresponding data layer and vice versa. In this way, they could implement
the business logic easily in the program. Let's keep any eye out here to
see whether there are some other suggestions from the community. :)

For the second question, I am not sure of why and how you create controls
at runtime. Perhaps explaining more background info may help community
members understand the scenario better.

Does that answer your question?

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! ¨C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top