views:

313

answers:

1

Is the "Presenter First" MVP pattern the same as the "Passive View"? If not, how do they differ?

+3  A: 

Maybe i'm wrong, but from what i understand :

The mvp pattern used in presenter first approach is a slight variation around the passive view described by martin fowler. In some case, when the business object (or model) is too hard to map directly on the view, they use an adapter class between the presenter and the view. The adapter is responsible for translating a complex object into some trivial types used by the dumb final view.

Ex: The presenter have to deal with a PersonList model. The view is made of a grid. The Presenter pass the model object directly to the adapter (that take the role of the view) and the adapter translate it into cells, rows, columns and vice versa.

For a very simple object to map on a view, i think it's a pure passive view MVP pattern like fowler's one.

Fred