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

He is correct, but I doubt there is much confusion. The term MVC is used mainly to illustrate the separation of concerns, which is, IMO, the number one task for any framework.

Also, as far as I recall, the MVC pattern does not require communication between the models and the views, although it certainly allows it.

Looking at it from another perspective, MVC is a huge buzzword nowadays. It's simply not worth it to be conceptually correct for such a little gain.



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.




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

Search: