How to implement user-independent applications?

What are the main methods to make most of my C # source code user interface independent?

For example, I would like to write my source code for the Winforms desktop, which I can connect to the asp.net web application or to the WPF application with very minor changes. That is, I will use the same source code regardless of the user interface technology to make it reliable.

I know the CSLA infrastructure can do this.

But if I do not use CSLA (it takes some time to learn the new structure, and currently I don’t have much time to spend on it), what should I take care to achieve this in my C # code?

Can you give me an example? I already use Business Objects and layering techniques in my applications. But even so, I saw that coding my code for new user interface technologies required a lot of coding.

Please do not give me any superficial answer.

+3
source share
5 answers

The best way to do independent UI coding is to separate the logic from the presentation. Take a look at the MVC pattern.

, . . , , .

+10

UI , , , . . , , MVC, MVP MVVM. , ; , .

. . . .

Edit:

? BO . , .

, .

, . :

- , . UI ; . . . . , .

-, . , , .

.

+4

, -, .. , . - desktop vs web .. - .

. , MVC .., , , . - .

+3
0

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


All Articles