Best approach to OO Style (only slightly off topic)?


S

Steve Simmons

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
 
Ad

Advertisements


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

Top