What is the structure of this refactoring?

I have an example with a bunch of logic in my GUI class (winforms). I am going to reorganize this so that there is no logic in gui, and a separate class adheres to all the logic.

What is this template? Say I had a form class called AddAddressForm, what would you call an associated file that contains logic? AddAddressMediator (not quite suitable for this template), if I were doing WPF, I would call it ViewModel (but it is not).

+3
source share
9 answers

It sounds like a model-view-controller without a part of the model.

+2
source

, . - Windows Forms, , , :

, - MyFormLogic, , ( , AddButtonClicked AllItems)

(Yay easy unit testing!), MyFormLogic , , . ( )

, , 1 , 1 , ( , - )

+2
+2

, Model-View-Presenter. asp.net, WinForm.

http://msdn.microsoft.com/en-us/magazine/cc188690.aspx

MVP 2 , , MVP.

+2

, , Conditonal Logic, , Factory.

2- , /, , , .

.

+1

Model-View-Controller (MVC). , , Address.

. , , ; ( ) .

+1

, , - Model-View-ViewModel, WPF. , ViewModel , View ViewModel. WPF, ; MVVM. - .

+1

Sounds like your main separation of concerns, breaking up presentation and functionality into different files. I’m not quite sure if this really falls under any template for a review, but it reminds me that web forms are lithium-bit with views and codes.

0
source

Source: https://habr.com/ru/post/1765744/


All Articles