[Qt-interest] Designing Qt applications
Jason H
scorp1us at yahoo.com
Tue Aug 24 14:31:34 CEST 2010
Design Patterns in Qt?
________________________________
From: Markus Franke <Franke.M at sebakmt.com>
To: Jason H <scorp1us at yahoo.com>
Cc: qt-interest at trolltech.com
Sent: Tue, August 24, 2010 2:52:11 AM
Subject: Re: Re: [Qt-interest] Designing Qt applications
Thanks for the detailed answer.
As I am writing my GUI code by hand and not using anything like Qt Designer or
Qt Quick I sometimes find it hard to identify the borders/interfaces between the
view and the controller. I will also have a look at QtTest.
I think [1] would be a good literature to learn something about design patterns
with Qt. Can anybody recommend this book maybe?
Best regards,
Markus
[1]
http://www.amazon.com/Introduction-Design-Patterns-Qt/dp/0131879057/ref=sr_1_1?ie=UTF8&s=books&qid=1282630870&sr=8-1
Jason H <scorp1us at yahoo.com> schrieb am 23.08.2010 20:26:18:
> Well, it should come naturally.
>
> Basically, you want a MVC-style approach (NOT MFC!). The MVC approach
> will naturally be reinforced by your use of QtTest. And/or QtQuick. And
> or QtWebKit.
>
> So you want your application logic separated from your UI
> (controller/view separation). While it is a requirement that they
> interact, the business logic functions should be reusuable if you go with
> a conventional Qt GUI, them migrate to QtQuick, and/or QtWebKit. QtTest
> will come in and hook into your business logic so you can unit test your
> business logic as well.
>
> This means, in C++ terms, your UI slots should be calling static methods
> of a class. Or, less optimally but equally valid, a regular class (if you
> have to maintain state information). Then your UI is completely
> replaceable, be it local, web, or QML driven.
>
> As for the M (model) part, that is likely to be the same because it is
> determined by your application's data structure.
>
>
> From: Markus Franke <Franke.M at sebakmt.com>
> To: qt-interest at trolltech.com
> Sent: Mon, August 23, 2010 8:50:52 AM
> Subject: [Qt-interest] Designing Qt applications
>
>
> Dear all,
>
> is there any document on the web which deals with Qt application design
> in general?
>
> I have been working with Qt for almost 2 years now and I know how to get
> things working.
> However, especially the separation of GUI code and application logic is
> sometimes not so easy to handle. Usually there are different ways which
> one can follow but I am pretty much sure that there must be also a
> prefered way how to do. ;-)
>
> Thanks for any comments on this,
> Markus
>
>
> "Disclaimer: This message is intended only for the use of the individual
> or entity to
> which it is addressed and may contain information which is privileged,
> confidential, proprietary,
> or exempt from disclosure under applicable law. If you are not the
> intended recipient or the person
> responsible for delivering the message to the intended recipient, you are
> strictly prohibited from
> disclosing, distributing, copying, or in any way using this message. If
> you have received this
> communication in error, please notify the sender and destroy and delete
> any copies you may have
> received."
"Disclaimer: This message is intended only for the use of the individual or
entity to
which it is addressed and may contain information which is privileged,
confidential, proprietary,
or exempt from disclosure under applicable law. If you are not the intended
recipient or the person
responsible for delivering the message to the intended recipient, you are
strictly prohibited from
disclosing, distributing, copying, or in any way using this message. If you have
received this
communication in error, please notify the sender and destroy and delete any
copies you may have
received."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100824/c6304b8f/attachment.html
More information about the Qt-interest-old
mailing list