次の方法で共有


Whats a controller anyway?

A friend pointed me to this great article about MVC:  https://c2.com/cgi/wiki?WhatsaControllerAnyway

The central claim is that MVC had a very clear definition in SmallTalk, which was changed by either NextSTEP or Ivar Jacobsen depending whom you talk to.  In trying to describe M/V/VM I've focused on the SmallTalk definition, which has confused some people using Cocoa.  The discussion has been good though, because it is clarified to me what is different about M/V/VM from either on them.

It is common in MVC to use the Observer pattern so the View does not corrupt the Model with unnecessary view concepts.  The Controller and View however talk to each other "directly" and generally have two way knowledge.  M/V/VM uses data-binding to implement the Observer pattern not only between Model and View, but between Model and ViewModel (and optionally between ViewModel and Model).

Yes, I know I have to write an example....stay tuned.

Comments

  • Anonymous
    October 24, 2005
    Thanks. BTW my presentation from last week's NYC .NET Developer's Group MVC architectures is posted (<a href="http://blog.lab49.com/?p=151">here</a>). Thanks for continuing to mine this area; it is an important one, and will become moreso with the advent of Avalon.

    Cheers - Daniel
  • Anonymous
    January 13, 2009
    Jag talar ofta med kunder och partners som vill använda vedertagna designmönster för att separera ansvaret