An MVC Controversy: Java Design Patterns and Architecture, Part 9

Should your view talk directly to your model, or not? Some say yes, others say no. In fact, if you're writing a banking system, your model should not be exposed to the outside world; your controller needs to do all kinds of security checks on requests made by the view for data. At the other extreme, a single user interface widget might implement MVC itself, and then it would be very cumbersome to wrap all requests for data from the model in controller methods. It's best to choose the right approach for the right situation, and stick to it.




Next ...


The Singleton Pattern: Java Design Patterns and Architecture, Part 10