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

Here are the definitions as I know them:

MVC - MVC is separated, Models can notify Views.

Model1 - mixing all code in one place, often seen in first PHP apps

Model2 - separation between Model and View, I think Struts started it. Rails made it prettier.

Yes, the gain from correcting the confusion may be small. However, the topic of JavaScript MVC is going to be huge soon, good to know the differences.



MVC - MVC is separated, Models can notify Views.

I don't think the ability for models to directly notify views can be considered a strict requirement. NextStep/Cocoa followed the MVC pattern closely without having this ability for a long time. (It was added as "key-value observing" in Mac OS X 10.3.)

Without direct notifications from models to views, it's up to the controllers to notify each other of model updates. Personally I find this pattern preferable to having models doing uninhibited notification broadcasting on their own.


Model1 started by everybody (including Servlet, pre-JSP) Model2 started by Servlet + JSP.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: