A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
James Carman, President<br />Carman Consulting, Inc.
Originally posted by Stan James:
Rats, in this example I might make the application model and the dashboard model peers that can freely converse over some protocol, and the dashboard view stays nicely separated from the dashboard model. Was that just a poor example or are there no good examples that would force backwards dependencies here?
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Originally posted by Stan James:
Managing dependencies, turning them around when you have to, is a fun part of design. One man's opinion.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by James Carman:
The model does need to have a reference to the view in order to notify it, but it doesn't need to "know about" the view. The view should register itself (or some other object which knows how to update the view) as a listener on the model to receive events when the model changes. The model only knows about the listener type (an interface), not the specific type of the view (or the "other object").
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Originally posted by Stan James:
The next step is to wonder who OWNS that interface. If you bundle it up in the model PACKAGE, I'm all smiles.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Originally posted by Layne Lund:
That's basically what I did. I have an ConnectFourView interface that the model and controller use for these kinds of notifications. I'm glad to see that I might be on the right track here.
Layne
James Carman, President<br />Carman Consulting, Inc.
Originally posted by Stan James:
If the entire system is in your workspace you might care a lot less.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by James Carman:
I wouldn't necessarily call it ConnectFourView. Because, it doesn't have to be a view at all that's listening for changes to the model. If you have to call it something, call it ConnectFourModelListener. It doesn't really make a difference in code, but a model shouldn't have to know about a "view" class or interface. It's supposed to be the other way around.
That also depends on the size of the system. When systems get bigger, it becomes more important to manage package dependencies, so that the system remains flexible and maintainable, in my experience.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
I guess I've been abducted by space aliens. So unprofessional. They tried to probe me with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|