lundi 23 mars 2015

How do you separate view from logic in a Winform application?


I know there are patterns like MVC to separate view from logic, however, I am not sure how much common or serious it is in Winform applications.


I usually start with a Form and gradually add UI components to my project, then for the events of components, (click, textchanged...) I call my functions, or directly write my logic there!


I know that is a bad habit, but I don't know what is actually the best way to start such a project, I mean to separate Forms, buttons, Events... from the logic? Should I do it for any project?! Does MVC the only solution?


I would like to receive some guidelines about it.





Aucun commentaire:

Enregistrer un commentaire