Post #2074139
2026-05-06 10:17 UTC
Replies (1)
-
@crocodisle@woof.tech 2026-05-06 10:45
Is my conception a different pattern, or is MVC just that inconsistent in how it's conceptualized? If the controller is client-side, it's vulnerable to tampering, so it shouldn't make db queries, probably. Am I wrong about this? If the controller acts as a middleman between the view and model, then, by the pattern, I assume the model runs server side (since once again, vulnerable db code otherwise), but then all operations are running on the server, costing server resources that aren't related to requests for db information, which costs more money for the company paying for hosting. Why would non-sensitive business logic need to be executed server side if it can be executed client side? It's a waste of money if it isn't client side! If a controller is supposed to be an interface between the view and model, it seems rather unnecessary unless there is a specific business concern requiring the view model communication to be incredibly decoupled, a la the facade pattern. I could understand how in larger companies this might help with development, but it doesn't seem any better or worse than referencing one from the other, or having the view hold an instance of the model to operate on from a separation of concerns pov. The more I think about it from a decoupling pov, it seems nice, but perhaps hardly necessary for basic CRUD apps.