Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why use Model-view-controller? [closed]

Why should a developer pay attention to Model-view-controller for designing a GUI? And are there other elements that a developer should pay attention for designing a GUI?

like image 796
Johanna Avatar asked Feb 05 '26 00:02

Johanna


2 Answers

MVC will help you to separate the responsabilities of the GUI with respect of the business rules you want, maybe later you want to reuse some code or change it, having an MVC will help you.

Here are other architectures for GUI's from Martin Fowler.

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

Model-View-Presenter (MVP)

Humble View

And more.

like image 146
MexicanHacker Avatar answered Feb 07 '26 14:02

MexicanHacker


If you don't separate your model from your view, you will have great difficulty refactoring later when you find that you want to present the same information in a different way.

like image 38
Eric Wilson Avatar answered Feb 07 '26 13:02

Eric Wilson