MVC in wxPython HELP!

M

meonimarco

Hi to all.
I woud implement MVC with wxPython. Is it possible? Is there anyone
that have experience in this?
The only correct example according to Observer Pattern that i found on
web is not the formal implementation of MVC (is Document/View) and is
implemented with gtk...
How can i translate this gtk example in wx?
Does exist a tutorial, a archive of example or anything about MVC in
wx?
Thanks all!
Sorry for my "italian" english!

The gtk example that i talk about in my previous message is here:
http://www.pyj.it/sorgenti/2004/01/doc-view.zip
 
D

Diez B. Roggisch

Hi to all.
I woud implement MVC with wxPython. Is it possible? Is there anyone
that have experience in this?
The only correct example according to Observer Pattern that i found on
web is not the formal implementation of MVC (is Document/View) and is
implemented with gtk...
How can i translate this gtk example in wx?
Does exist a tutorial, a archive of example or anything about MVC in
wx?
Thanks all!
Sorry for my "italian" english!

The problem here is that MVC is not a "thing" (or class or whatever) that
can demonstrated once and for all, but a design concept for
GUI-applications.

You can do MVC in _all_ toolkits, and html, and even ncurses. Some toolkits
have "support" built-in in the way that their more complex widgets - like
tables or treeviews - expect a so-called model. That means that instead of
having e.g. a table-row-object that you add to a table and that you fill,
the table will query your model with an interface like this:

class TableModel:
def __len__(self):
....

def column_count(self):
....

def get_value(self, row, column):
....


I have very limited experience with wx - but short googling reveals e.g.

wx.lib.mvctree

Note the (Basic)TreeModel

Basically, you should try and look for wx(Python)-examples that use tree or
list widgets.

Regards,

Diez
 
S

Scott David Daniels

Hi to all.
I woud implement MVC with wxPython. Is it possible? Is there anyone
that have experience in this?
The only correct example according to Observer Pattern that i found on
web is not the formal implementation of MVC (is Document/View) and is
implemented with gtk...
How can i translate this gtk example in wx?
Does exist a tutorial, a archive of example or anything about MVC in
wx?
Thanks all!
Sorry for my "italian" english!

The gtk example that i talk about in my previous message is here:
http://www.pyj.it/sorgenti/2004/01/doc-view.zip
Can I just suggest you search in Google Groups for the message by
"has" labelled "Re: MVC programming with python (newbie) - please help".
Dated: 7 Jan 2006 07:03:04 -0800. It is one of the nicest short
descriptions of the MVC pattern and why it works.

The link I have is huge, but:
http://groups.google.com/group/comp.lang.python/browse_thread/
thread/eb0be1531e010273/
9b80e79d4706200d?tvc=2&q=MVC+daniels#9b80e79d4706200d

I've inserted returns at two points in the url directly after slashes,
drop tose returns and the associated spaces.

--Scott David Daniels
(e-mail address removed)
 
H

has

If folk wish to post that spiel anywhere else, be my guest. Public
domain and all that.

has
 
B

bwaha

Can I just suggest you search in Google Groups for the message by
"has" labelled "Re: MVC programming with python (newbie) - please help".
Dated: 7 Jan 2006 07:03:04 -0800. It is one of the nicest short
descriptions of the MVC pattern and why it works.

I'll second that !!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top