如何编写图形程序

发布于 2024-09-12 14:32:10 字数 281 浏览 0 评论 0原文

我学过C++和Qt4。我编写了一个包含 3000 行的图形程序,我发现保持代码简单、透明和结构良好确实很复杂。我喜欢设计模式等,因为它们确实有效并且有助于使代码更简单、更透明。现在我要编写另一个“更大”的应用程序,但我希望有一个清晰的代码,该代码易于编辑,并且添加一些增强功能等不会成为大问题。

我正在寻找一些指南,模式,手册或经验表明,由于业务逻辑和未来编辑中的测试(单元和集成),如何在图形应用程序中构建代码结构良好。

如果本手册针对 C++ 和 Qt 会更好,但这不是主要要求。

感谢您的提示。

I have learned C++ and Qt4. I wrote one graphical program with 3000 rows and I found out that there is really complicated to keep code simple, transparent and well-structured. I like design patterns etc. because they are really effective and helps to keep code simpler and more transparent. Now I am going to write another "bigger" application but I would like to have a clear code which will be easy to edit and won't be big problem to add some enhancement etc.

I am looking for some guide, pattern, manual or experience which says how to structure code in graphical applications to be well-structured due to testing ( unit and integration ) in business logic and future edits.

If this manual will be directed to C++ and Qt it will be better but it is not main requirement.

Thanks for your tips.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

海螺姑娘 2024-09-19 14:32:10

我强烈推荐这本书《Code Complete》; http://www.cc2e.com/

I would highly recommend the book, Code Complete; http://www.cc2e.com/

放低过去 2024-09-19 14:32:10

“C++ 编码标准:101 条规则、指南和最佳实践”。
作者:Herb Sutter、Andrei Alexandrescu

这是编码习惯的汇编。非常简短,非常简洁,非常精确,一点也不冗长。这本书对我来说和GoF的《设计模式》一样重要。

"C++ Coding Standards: 101 Rules, Guidelines, And Best Practices".
by Herb Sutter, Andrei Alexandrescu

It is a compilation of coding habits. Really brief, really concise, really precise, and not verbose at all. This book is as much important as GoF "Design Patterns" for me.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文