Is it bad practice to pass instances through several layers?
- by Puckl
In my program design, I often come to the point where I have to pass object instances through several classes. For example, if I have a controller that loads an audio file, and then passes it to a player, and the player passes it to the playerRunnable, which passes it again somewhere else etc. It looks kind of bad, but I don´t know how to avoid it. Or is it OK to do this?
EDIT: Maybe the player example is not the best because I could load the file later, but in other cases that does not work.