Hi to all.
I woud implement MVC with wxPython. Is it possible?
Does exist a tutorial, a archive of example or anything about this?
Thanks to all!
Marco Meoni
···
--
Mail address: meonimarco@gmail.com
Web site: www.marcomeoni.net
Hi to all.
I woud implement MVC with wxPython. Is it possible?
Does exist a tutorial, a archive of example or anything about this?
Thanks to all!
Marco Meoni
--
Mail address: meonimarco@gmail.com
Web site: www.marcomeoni.net
Hi Marco,
MVC is great BUT IMHO you should not try it from the start... do a little bit of small wxpython, get to know the toolkit, look at the Demo, it provides lots of code and demonstrates how to use the widgets... then, only then move to more complex things like MVC.
Of course you can implement MVC using wxPython, after all MVC is an architecture pattern. My advice is to go one step forward and read about MVP (Model-View-Presenter) especially "Presenter First" variation. I found it better altho I ended up applying it the wrong way (I put too much code in the view).
My MVP applied to wxPython is like this:
Model - holds the data and provides methods to manipulate that data
Presenter - connects things together, and in my app does a little bit of information preprocessing for the View.
View - dumb class that takes a GUI layout and sets its data to reflect the model.
Interactor - takes care of all the event bindings and maybe does a little bit of data preprocessing for the Presenter
wxPython code is present ONLY in the View and the Interactor and both of them are pretty simple from a programming point of view: the View just receives some data and puts it in the widgets, the Interactor just reacts on events and notifies the Presenter that some user interaction happened.
Peter.
P.S. this kind of questions are better served by the wxPython-users list (more people can see it)
On Mon, 26 Dec 2005 18:15:10 +0200, Marco Meoni <meonimarco@gmail.com> wrote:
Hi to all.
I woud implement MVC with wxPython. Is it possible?
Does exist a tutorial, a archive of example or anything about this?
where can i find your MVP implementation or example about this? Thanks
for the anwer.
Marco.
Peter Damoc ha scritto:
mail address: meonimarco@gmail.com
web site: www.marcomeoni.net
On Mon, 26 Dec
2005 18:15:10 +0200, Marco Meoni wrote:
Hi Marco,
MVC is great BUT IMHO you should not try it from the start… do a
little bit of small wxpython, get to know the toolkit, look at the
Demo, it provides lots of code and demonstrates how to use the
widgets… then, only then move to more complex things like MVC.
Of course you can implement MVC using wxPython, after all MVC is an
architecture pattern. My advice is to go one step forward and read
about MVP (Model-View-Presenter) especially “Presenter First”
variation. I found it better altho I ended up applying it the wrong
way (I put too much code in the view).
My MVP applied to wxPython is like this:
Model - holds the data and provides methods to manipulate that data
Presenter - connects things together, and in my app does a little bit
of information preprocessing for the View.
View - dumb class that takes a GUI layout and sets its data to reflect
the model.
Interactor - takes care of all the event bindings and maybe does a
little bit of data preprocessing for the Presenter
wxPython code is present ONLY in the View and the Interactor and both
of them are pretty simple from a programming point of view: the View
just receives some data and puts it in the widgets, the Interactor
just reacts on events and notifies the Presenter that some user
interaction happened.
Peter.
P.S. this kind of questions are better served by the wxPython-users
list (more people can see it)To unsubscribe, e-mail: For additional commands, e-mail:
meonimarco@gmail.com
Hi to all.
I woud implement MVC with wxPython. Is it possible?
Does exist a tutorial, a archive of example or anything about this?
wxPython-dev-unsubscribe@lists.wxwidgets.org
wxPython-dev-help@lists.wxwidgets.org