Navigation:  Programming Cookbook > Creating GUI Applications > Model View Presenter Overview >

Component-based Architecture

Previous pageReturn to chapter overviewNext page

Each MVP triad can be thought of as a "component". As such, it can later be reused to build other composite components, which can then be reused to build other components... and so on.

In fact, this combined block of three elements, model, view and presenter is very similar to a component in a more traditional component-based architecture such as ActiveX or Java Beans. The added advantage of MVP, however, is that the individual parts making up the component can also be interchanged. This provides another level of pluggability (and therefore reuse) compared with these alternative architectures.

Rearranging the M, V and P elements allows you to create a proliferation of new components simply by plugging together the elements in different ways.The number of possible combinations is limited merely by the expectations of "type" between the elements, something which is discussed below.