I knew the theoretical background of the MVC-Pattern.
I used it with C++ years ago.
So I am quite familiar with it.
About wxPython I read
<http://www.wiki.wxpython.org/ModelViewController/>
This is a python-specific description/tutorial about the MVC-pattern.
But it doesn't use wx-classes (except in the UI-layer).
My apologies if that last one got copied to your email. Google Groups web interface seems to do that automatically and I don’t always notice the checkbox.
The questions is, should I use the wx-way for MVC, or should I
implement it myself like the first description in the wxPyWiki
explained?
I would go with using pure-python for everything except the UI layer.
It’s a good rule of thumb to use the the python-way for thigns that are supported in both C++ wx and python itself.
One of the reasons to do MVC is to keep GUI-logic completely independent of the rest of the app, so that you could swap out another GUI, pure text API, Web API, etc. In that case, you don’t want to be relying on anything from wx outside of the GUI itself.
IMHO, MVC “frameworks” don’t really give you much over rolling your own, application-specific structure – particularly in Python.
-HTH,
-Chris
What do you prefere in your productive daily work?
–
You received this message because you are subscribed to the Google Groups “wxPython-users” group.
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
The questions is, should I use the wx-way for MVC, or should I
implement it myself like the first description in the wxPyWiki
explained?
I would go with using pure-python for everything except the UI layer.
1) It's a good rule of thumb to use the the python-way for thigns that
are supported in both C++ wx and python itself.
2) One of the reasons to do MVC is to keep GUI-logic completely
independent of the rest of the app, so that you could swap out another
GUI, pure text API, Web API, etc. In that case, you don't want to be
relying on anything from wx outside of the GUI itself.
3) IMHO, MVC "frameworks" don't really give you much over rolling your
own, application-specific structure -- particularly in Python.
And to throw yet another log on the fire, wx's docview framework was ported to Python code so it is more or less a pure python implementation of that pattern. See wx.lib.docview and wx.lib.pydocview for a bit of extra pythonification on top of docview. Personally the pattern has never gelled with me like some of the others do, but it's there if anybody wants to use it.