[pygtk] PyGTK code structure
Gabriele Lanaro
gabriele.lanaro at gmail.com
Sat May 16 06:51:16 WST 2009
I'm not a programmer in real life (I'm a student of chemistry) so, don't listen to me too much :)
I found myself very well with the mvc pattern (hand maded) in pygtk, but there are 2 frameworks for this pattern, if you are interested:
http://apps.sourceforge.net/trac/pygtkmvc/wiki
gtkmvc has also nice tutorials, even if I don't use it, I found its documentation really useful.
there is also kiwi:
https://launchpad.net/kiwi
but I don't know it.
Personally, I organize my code in this way:
I take two big classes, MainController and MainView,
and other classes (various models), that have their events.
The two big classes are splitted in subcontrollers and subviews, possibly the subviews are splitted in
* input views (with the relative subcontroller attached)
*merely display subviews(connected with the models)
The controllers simply modifies the models and automatically all the views are updated.
On Sat, 16 May 2009 00:19:49 +0200
Jesus Rodriguez <foxandxss a gmail.com> wrote:
> Hello there :)
>
> I have a little question about PyGTK programming. I am a Windows developer
> using .NET. Well, I Use MVP (a MVC variation) for the code structure, that
> is, for separating the view from the business logic using an intermediate
> presenter (a kind of controller).
>
> I remember that many years ago, PyGTK wasn't MVC friendly. ¿What is it like
> now?
>
> How do you people make the code structure of your PyGTK application?
>
> I remember that my PyGTK was hell :P
>
>
> Thanks in advance for your help.
>
--
Gabriele Lanaro <gabriele.lanaro a gmail.com>
More information about the pygtk
mailing list