|
-
December 16th, 2011, 12:52 PM
#3
Re: How to merge the same method of different classes in the clean way
 Originally Posted by Danielc
Hi everybody..
I'm developing an application using Qt, but I need some advices regarding sharing class members.
I am working with some collections (QHash) of project-specific structs and I created a polymorphic class to manage those collections. A derived class also manage some UI components (shared through pointers or references) so it can automatically represent those structs in the UI..
I agree with others who have commented on this.
Unless you're developing a spreadsheet, word processor, or similar program where the user interface is an integral part of the business logic, you shouldn't design programs this way, where your business logic is tightly coupled with the user interface and how it works. Even in those programs I mentioned, spreadsheets, word processors, etc. they have business logic that is not tied to the user interface.
Where is the "backend" portion of the program, the part that actually does the real work, regardless of what the UI looks like? If you're not already familiar with the "Model-View-controller" pattern, I suggest you get familiar with it.
http://en.wikipedia.org/wiki/Model%E...0%93controller
Regards,
Paul McKenzie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|