3 ms·
I don't think the most tangible benefit of MVC is reuse, but rather code organization. In MVC, if you're looking for something, you know where to find it. That
by optimal 19y ago
I don't think the most tangible benefit of MVC is reuse, but rather code organization. In MVC, if you're looking for something, you know where to find it. That saves a lot of time. It's easy to write an application, but harder to maintain it.
Also, imagine an application with a Web view displaying a data set returned from a controller. Now the client/user wants an OS-native version of the app. That's simple, just build a native (OS-specific) window view and call the same controller for the data set (model). Or maybe an API is needed for external consumption. In that case a web service "view" can be built to return the same data set from the same controller. We're just swapping views here--it's plug-and-play.
It's a clear separation of responsibilities. I believe that used to be called "modular" programming. ;)