Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've yet to find two proponents of "true" MVC who can agree what goes in the model and what goes in the controller.


1. https://folk.universitetetioslo.no/trygver/themes/mvc/mvc-in...

2. Controllers, like views and model(s) are roles, not components. These roles can be filled by the same objects.

3. So people not agreeing where things go is perfectly compatible with MVC, and thinking that's a problem is a symptom of not understanding MVC.

4. I personally try to put as much as possible (and a bit more) into the model. Hexagonal for the win! Naked objects are also pretty nice, though I tend not to be quite that radical.

¯\_(ツ)_/¯


If the M the V and the C are roles with not fixed functionality or purpose (given that you apparently can put anything you want in them) then what _is_ MVC?


The roles are distinct and have fixed functionality and purpose.

They just don't have to correspond to specific and distinct components.

This is all explained in detail in the documentation, which is really helpful for understanding MVC.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: