[wxpython-dev] Google SoC Project - MVC

Robin Dunn robin at alldunn.com
Fri May 30 11:48:43 PDT 2008


Kevin Ollivier wrote:
> Hi Peter,
> 
> On May 29, 2008, at 1:57 AM, Peter Damoc wrote:
> 
>> Hi Keith,
>>
>> My suggestion is to investigate Cells technology (pycells and Trellis) 
>> integration with wxPython
> 
> Definitely worth taking a look at, but I think a better approach would 
> be to simply allow wxPython controls to take a model and controller, and 
> use them when set. This way we're not trying to re-invent wxPython or 
> trying to get fundamentally different frameworks with different design 
> philosophies and target audiences to try and play nice together. We're 
> just extending it to be MVC-friendly. We can use something like 
> wx.lib.pubsub to send notifications when either the model or the view 
> changes, and the controller sets up listeners for these events and 
> handles any changes that needs made. 

I'm not sure how to go about implementing this, but some thoughts I've 
had about MVC in wxPython are that it would be nice to be able to have 
some sort of modular controller and/or model.  In other words, each 
widget involved in the view would have an associated component that 
would automatically integrate itself into a composite controller or 
model of some sort.  Then there would be a standard but flexible way to 
hook that to the application's model.  This would allow the app model to 
be whatever it needs to be for the app or the programmer's preferences, 
and just use a flexible but well defined interface for communicating 
with the rest of the system, which was all built automatically based on 
how the UI is put together.


-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!



More information about the wxpython-dev mailing list