Home > Presentation Patterns > Separated Presentation: A series on presentation patterns

Separated Presentation: A series on presentation patterns

We got a request for a post on the Model-View-Presenter (MVP) pattern sometime back. As always, I did some digging and realized that there were very few examples of MVP that described its implementation well enough for someone to  understand the subtleties of the pattern.

Subtle differences

Subtleties are the key issue with implementing presentation patterns.  When I say subtleties, I mean much more that the how, of the implementation, but the why as well. Why would you want to implement an MVP architecture as opposed to an MVC? What are the potential advantages and disadvantages? I ended up comparing and contrasting GUI architectures such as MVPMVCPresentation ModelSupervising Controller and Passive View. When I found an example of an MVP, I found myself coming back to Martin Fowler’s work on Enterprise Application Architectures to iron out my doubts on the implementation. Fowler has not only done an excellent job of describing the differences between presentation patterns, but ties in the history and evolution of GUIs as well.

Separation of concerns

Separated presentation is a key theme in all GUI architectures. Much of the discussion on GUIs concentrate on separating the presentation layer elements, such as presentation logic and user-interface widgets, from the rest of the application. This separation is useful in that dependencies between the presentation layer and the rest of the application can be managed, allowing more effective development and testing.  This is essential in Flash development because we deal with very rich GUIs that contain many complex UI widgets. Architecting the application to allow distributed modular development of the presentation layer can go a long way in streamlining the development workflow.

Walk-the-walk

This is the introductory post on a series of upcoming posts on presentation patterns where I take a mindful walk on the path carved out by Martin Fowler in his chapter on GUI Architectures. Mindful in the sense that I’m bringing a Flash and ActionScript mindset to the journey. This path has been traveled before, by Paul Williams. For contrast, I’ll be using the weather maps sample application from Chapter 12 in our book to provide a fresh set of examples on the following presentation patterns.

Share

No related posts.

Categories: Presentation Patterns
  1. john
    February 11, 2010 at 6:33 pm | #1

    Awesome looking forward to the series

  2. Curro
    February 12, 2010 at 8:19 am | #2

    Hi Bill Chandima,

    Sounds really interesting.
    Looking forward to next post

    Curro

  3. February 12, 2010 at 1:19 pm | #3

    Hi Curro & Roberto,

    This is Chandima’s series! I’m still working on a guided tour of the State…

    Cheers,
    Bill

  4. jadd
    February 13, 2010 at 4:05 am | #4

    Hi Bill Chandima,
    I’m always glad to see this blog updated and constantly with new informations. Thanks, Roberto.

  5. Pedr
    February 13, 2010 at 9:53 am | #5

    Hi Chandima,

    This is a very good subject. I often think that in our Flash / Flex apps, the view is the tier least discussed. All too often, a view becomes like a singularity where all the carefully laid rules break down, and separation of concerns get thrown out of the window — the view ends up as a bastard cocktail of mv and c, alongside more clearly defined application-wide model and controller (and service) tiers. I also think the Mediator is fundamental to any comparison of Presentation Patterns, though you didn’t mention it above. Will look foward to your next post.

    • Chandima Cumaranatunge
      February 13, 2010 at 11:53 am | #6

      Hi Pedr, I totally agree with your observations. I originally wanted to just compile a post on MVP and found myself really muddling through it with lots of unanswered questions. So, I’m digging really deep – going back to the roots, starting with the original MVC implementation in Smalltalk-80. Incidentally, Fowler doesn’t talk about mediators and presentation patterns in the same breath. However, the ‘Presenter’ in MVP, Passive View and others does some mediator type work. I’m looking forward to your critiques on the implementations.

  6. Curro
    February 14, 2010 at 6:41 am | #7

    Hi,
    Sorry about the mistake.

    Curro

  7. February 18, 2010 at 3:50 am | #8

    Looking forward to those series. Was reading some of those things and features of WPF at summer. Very interesting stuff.

  8. Pedr
    February 23, 2010 at 2:31 am | #9

    Hi Chandima,

    Not sure of you have seen this: http://www.jeremydmiller.com/ppatterns/%28X%281%29S%28ghrjyk45v0mvrkiht2fotw45%29%29/MainPage.ashx

    Some interesting bits and pieces.

  9. Chandima Cumaranatunge
    February 24, 2010 at 12:03 am | #10

    Thanks for the link Pedr. The TOC indicates good coverage of PPs. The Separated Presentation section does look quite good. I’ll have to give all of it a patient read!

  1. February 12, 2010 at 12:00 am | #1
  2. March 1, 2010 at 1:21 pm | #2

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>