Hi Peter. Thanks again for your work in Model View Presenter.
I’m developing an application with GUI in wxPython. I would like to implement the MVP architecture.
My first action of today has been to create a GUI with wxGlade. This GUI has only the graphic rapresentation, doesn’t have any work to do.
On second time i have to create the interactors or not?
What’s the best way to create a MVP?
Sorry for my probably silly questions but this is my first project with pattern application…
Thanks again.
Sorry also for my horrible english!
···
2006/1/18, Peter Damoc peter@sigmacore.net:
Hello list,
I’ve just added an example of expanding an application written using MVP.
On the AlbumsWindow application from yesterday I’ve added the ability to
add new albums and to sort them ascending or descending.
take a look at the part 5 of :
http://wiki.wxpython.org/index.cgi/ModelViewPresenter
Comments are welcomed, fixes to my poor English even more
Peter.
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
–
Sbaush
view is the object that will display the data
interactor is the object that will delegate the interaction with the view to the presenter
"views" is a module name to hold the view, if with the project grow it becomes complex it could be splitted in different files and all the view files could be placed in a "views" directory.
same for "interactors"
Peter.
···
On Thu, 19 Jan 2006 12:04:35 +0200, Sbaush <sbaush@gmail.com> wrote:
Looking at your code i've a question.
The presenter start with:
class AlbumPresenter(object):
def __init__(self, albums, view, interactor):
self.albums = albums
self.view = view
interactor.Install(self, view)
self.isListening = True
self.initView()
view.start()
What is view and interactor? Why you can use its and not views and interactors?
Sbaush wrote:
another question...
why interactor, model and presenter are object? why have you did this
choice?
...
class AlbumPresenter(object):
Subclasses of object are the future, they allow "attribute" and "super"
stuff to work. "Old-Style" classes will be phased out, so most new
code should subclass object (if you have nothing else to subclass).
--Scott David Daniels
Scott.Daniels@Acm.Org
I have never used the object subclasses. I don’t know the real difference between “old” classes…
···
2006/1/25, Scott David Daniels <Scott.Daniels@acm.org >:
Sbaush wrote:
another question…
why interactor, model and presenter are object? why have you did this
choice?
…
class AlbumPresenter(object):
Subclasses of object are the future, they allow “attribute” and “super”
stuff to work. “Old-Style” classes will be phased out, so most new
code should subclass object (if you have nothing else to subclass).
–Scott David Daniels
Scott.Daniels@Acm.Org
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwidgets.org
–
Sbaush