Re: Questions about app design - OOP with python classes



adriancico@xxxxxxxxx a écrit :
On Mar 1, 9:45 pm, Bruno Desthuilliers
<bdesth.quelquech...@xxxxxxxxxxxxxxxxxxx> wrote:

I understand (I've been in wikipedia :-) ). Right now the Frame is the
controller as well
as the view.

Yeps. Note that this is a common "simplification" of the MVC - Microsoft labelled it "Document/View".

(snip)
My problem was that, altough I knew OOP basics, I didn't know how to
apply them exactly.

It mostly comes out of experience IMHO. But reading the GOF (I let you google for what this TLA refers to !-) may not be a bad idea - it's probably the best book about OO design I've read so far, even if lot of the described patterns make less sens in an highly dynamic language like Python.

Note that there's nothing Python-specific in your question. But since
comp.object is one of the worst places on earth to ask questions about OO...


I am developing in Python, so it made sense to me to post here. But
you are right, the question
is off-topic. Sorry for that.

Alas, the appropriate newsgroup (comp.object) has turned into one of the most unfriendly and sterile places I know on the net.
.



Relevant Pages

  • Re: Smallest/cheapest possible Python platform?
    ... controller in a battery-powered device and want to avoid writing in C ... Can you run Python on an Arduino? ...
    (comp.lang.python)
  • Re: Questions about app design - OOP with python classes
    ... that means that the main program logic is in the Frame ... Using the main frame as a mediator between the different widgets is a well-known design pattern, ... You may want to read about this pattern - but note that most litterature about design patterns is expressed in terms of statically typed languages, and that dynamic languages like Python usually don't need that much boilerplate and complication. ... What's your looking for IMHO is the "controller" part - the one that glue together the "view" (main frame and all it's widgets) and the "model" ...
    (comp.lang.python)
  • Re: How to organize Python files in a (relatively) big project
    ... too have often come up against the inconvenience of creating ... libraries that I want to reuse but that do not want to incorporate into ... I came up with this Python library addition to ... if not frame: return '' ...
    (comp.lang.python)
  • Re: Social problems of Python doc [was Re: Python docs disappointing]
    ... If Python had the tens of thousands of users, ... same model as Wikipedia. ... Firstly, in context, I wasn't talking to somebody who had made bug ... make good quality detailed bug reports. ...
    (comp.lang.python)
  • Re: Social problems of Python doc [was Re: Python docs disappointing]
    ... in Python. ... Have a look at the Wikipedia page for Python. ... opinions which are shallow and negative. ... Python developers learning Java for the first time will struggle to write ...
    (comp.lang.python)