Paul DeCoursey wrote:

[snip]

> Yes the model knows nothing about the controller, but the model can
> only tell the view the data has changed.  Here is one scenario where
> the controller would need to know about the change as well.  If the
> view needs to change to a different view based on the new data.

Doesnt this problem arise due to your view being "dumb"(as you described 
it below) and not querying the model about its state?

> Because the view can only respond to data changes for the type of data
> it handles.  The controller changes between different types of views.

Hmm, ok. It sounds a bit strange to me, but thats ok, i'll think about 
it some more and hopefully I will understand a bit better.

>   In my app we have a basic ItemType and from that there are
> specialized types, like collection and asset. So from a collection we
> can ask the controller to get an item from the collection which could
> be an asset or another collection.  At this point we don't know what
> kind of item it is, we could but sadly we don't.  So the controller
> sends the query to the model and sets the view to a loading state. 
> When the data is received the controller is notified and resets to the
> correct view, then the view is notified. In this case the
> communication from the model to the controlled exists but the model
> technically does not know anything about it. It merely dispatches an
> event and doesn't care who listens to it.  Another reason my app needs
> this type of communication is because the controller often needs to
> request other types of data in response to the data received. I could
> have my view do this, but in my opinion the view should be dumb.  The
> view should just display information not manage it's retrieval.
> 

Thanks for taking time to provide the example.

[snip]

> In the Java Blueprints they have the view sending State Queries to the
> model, I don't like that because it adds intelligence to the view. 
> The view really needs to be for display only. But I do realize that
> this is really the Presentation-Abstraction-Control pattern that I use
> and describe to some extent.

[snip]

>>cheers,
> 
> Cheers was a great show, I still watch it from time to time in
> syndication.

Personally I was never a fan, I prefer Becker.

oompa-loompa,
   shaun

Reply via email to