dimanche 8 octobre 2023

Which design pattern does MVC pattern leverage to protect model from client of view? (Head First Design Pattern)

There’s a great design pattern that allows you to adapt an interface to provide only a subset. Can you think of it?

On the Head First Design Pattern, book's implementation of MVC pattern gave the view full access to the model, so the author added that it can be fixed by restricting the view's access to only subset of the model.

But they didn't mention which pattern it is.

I don't think it is the Facade pattern, in that it merely provides a simplified interface to the underneath classes, still allowing the client to directly access them.

Aucun commentaire:

Enregistrer un commentaire