About Program Framework Design

  • I have written a serial debug tool, it can send or write data by Serial Port, the main function is send or receive file in different protocol. Now I want to add Ethernet communication type, such as TCP-Server, TCP-Client, UDP. It is easy to implement this feature, but the program framework is very ugly, or no framework at all.

    I know I should design a abstract class which has series of interfaces: write(), read(), close(), open(), etc. However it has many other problems, such as signal/slot, status flag, QSerialPort, QTcpSocket and other minor details I do not know how to do.

    Ridiculous, it likes I know the destination, and I have a bike, but do not know the way, hope you know what I mean.

    What I need is a opensource program, or a little demo, which realize the separation of the underlying communication method from the upper application (best is the Qt program). It is a programming thought, and is very important, I need to learn it from opensource program or demo, then apply it in my this and future project.


  • Lifetime Qt Champion


    You can take a look at the KDE projects various core applications. They usually implement things nicely in that project.

Log in to reply