There is a small application on WPF, even at the cooking stage :) Part of the GUI is ready. When I did, I did not think about the templates, but I began to think about old age and how to ease it for myself. Now everything works like this: There are windows, and objects for their work are stored in their objects of their classes (temporary variables, constants, all logic is also in them). Under which template is it better to customize the project? (in terms of complexity and future convenience) I consider mvc, mvp, mvvm. Perhaps one of these three is not a pattern for a destkopnogo GUI at all, and I carried terrible nonsense. I will be glad to hear advice.
- oneThe question is not quite clear. WPF it is already ground under the MVVM pattern. - Carma
- @Carma: oddly enough, MVVM appeared after WPF and was not invented by Microsoft :) In fact, this is an adaptation of the good old MVC. - VladD
1 answer
All patterns are very abstract and are recommendations. Each application is unique and it is difficult to take into account all aspects when designing, especially their expansion. Therefore, all the patterns that you have specified are only skeletons for the program. For WPF, you must use MVVM. Take out the objects of the model (see an example , very useful). Further If in event handlers there is something complicated or voluminous, for example, algorithms, class hierarchy, state switching, constraints, etc., i.e. some business logic will appear, then it is true that it is necessary to use additional new templates in your application. I advise you to read, or at least see the book . What exactly - you need to understand what your application will do, how it will be expanded. The main thing is not to overdo it, see the article
- +1, MVVM is the path of a true Jedi. - VladD