Why use Model-view-controller?

Why should a developer pay attention to the Model-view-controller for designing a graphical interface? And are there any other elements that a developer should turn to developing a graphical interface?

+3
source share
8 answers

MVC will help you separate the responsibility of the GUI from the business rules that you want, you may want to reuse some code later or change it if MVC helps you.

Here is another architecture for the GUI by Martin Fowler.

http://martinfowler.com/eaaDev/uiArchs.html

Model-View-Presenter (MVP)

Modest appearance

And further.

+4
source

, , , -.

+2

, , , , , MVC.

+2

MVC , - .

http://en.wikipedia.org/wiki/Model -view-controller

+1

Model View Controller :

    1. Data (Model) 
    2. User interface (View)
    3. Logic of the application (Controller)

. , , MVC .

, , - Object Relational Mapper. , - .

+1

MVC - . Model-View-Controller.

:

- , ?

-View-Controller (MVC) , , [Burbeck92]:

  • Model. , ( ), ( ).
  • . .
  • . , / .
0

, java, JavaFX -.

WPF Model-View-ViewModel,

  • -, -,
  • - , XAML
  • ViewModel: , . . , , .
0

Model-view-controller - , ; . , GUI- + , + . , . + ( + ). ( , , MVC - , ).

MVC is very common because it is usually easy to understand and support, and widely applicable. My advice is to learn this well and use it often. But I also warn that it becomes your "hammer" (when you have a hammer, everything starts to look like a nail). Familiarize yourself with other options and use them when necessary.

0
source

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


All Articles