Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #38039 > unrolled thread
| Started by | Steve Simmons <square.steve@gmail.com> |
|---|---|
| First post | 2013-02-01 15:24 +0100 |
| Last post | 2013-02-01 15:24 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
Best approach to OO Style (only slightly off topic)? Steve Simmons <square.steve@gmail.com> - 2013-02-01 15:24 +0100
| From | Steve Simmons <square.steve@gmail.com> |
|---|---|
| Date | 2013-02-01 15:24 +0100 |
| Subject | Best approach to OO Style (only slightly off topic)? |
| Message-ID | <mailman.1277.1359728687.2939.python-list@python.org> |
I'm relatively new to OO (and Python and QT ) and I am learning as I go along. As I slowly come up to speed, I have some questions about the best approach to program/module structure so I'm looking for some pointers (URL's or replies). I have copied some code from 'Rapid GUI Programming with Python and Qt' (Great book!) and am now modifying/extending it with my own. The original code (Image Changer - Chp 6) is a single class that contains code for both UI creation/management and functional code. I have created a second class for my own code and I'm on the brink of adding calls from one class to the other and vice-versa. At this point, I began to wonder what a 'correctly structured' OO program should look like. Should I separate GUI logic from 'business' logic? Should everything be in one class? Should my main() be carrying the high level logic? Anyinput most welcome. I looked briefly at the MVC model which answers my question at a high level but itrepresents another learning curve that I'm reluctant to add to my current challenge. Steve
Back to top | Article view | comp.lang.python
csiph-web