Sadek Drobi’s Blog

November 22, 2006

OBSEV: Model View Presenter w/Command (DataGrid)

Filed under: Architecture, MVP — Sadache @ 4:21 pm

This weekent went fast, i didnt really have time to work on a sample code . Here i post a sketch, a class and a sequence diagram, showing an example of Model View Presenter with a command pattern implementation , for a datagrid.

The initBinder method on the binderObject subscribes it to the deffirent events of the datagrid.

then treatement can be added for the deffirent events.

DataBinders with xml mappping can be provided, so that reflexion can be used to map model to the dataBinderObject at run time.

i promise more explaination about benefits of applying such a pattern, and the more sophisticated Demo.

for now i ll let you view the diagrams, feel free to comment!

Class Diagram:

Sequence Diagram :

4 Comments »

  1. Hi Sadek,

    I was interested to know whether you have built any sample code for the above class diagram?

    Would be great to see it.

    Cheers,
    David

    Comment by David Walden — October 11, 2007 @ 8:16 am

  2. Hello Sadek

    I’m with David… sure would be nice to see source code, if you ever got around to make some :)

    Regards,Asger

    Comment by Asger — October 13, 2007 @ 11:22 am

  3. Unfortunaitly, I guess I wont have the time to extract a simple working example out of the client’s production code. But here is a link to a good implementation of the pattern for .net: http://stormwind-trac.cvsdude.com/NMVP
    sorry for not being able to help you more :(

    Comment by sadek — October 13, 2007 @ 11:48 am

  4. Sadek,

    That’s a shame. Even a simple example would be helpful… :-)

    Can’t find much in the way of documentation or source code at the link you provided.

    David

    Comment by David Walden — October 13, 2007 @ 1:29 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress