在我的表示层中构建 WinForms
在我们公司,我们正在开发一个具有大量 winform 的应用程序,这些 winform 都在相同的 UI 层、命名空间和程序集中创建。有没有一种不错的方法/设计模式来构建这一层?
我们的 UI 层与业务层进行通信,业务层由多个命名空间组成,例如business.calculation 和business.logistics。这个结构也可以用在UI层吗? 在同一个 winform 项目中创建 100 多个 winform 感觉不太合适。
干杯!
At our company we are developing an application that has a large number of winforms that are all created in the same UI layer, namespace and assembly. Is there a decent way / design pattern to structure this layer?
Our UI layer communicates with the business layer wich consists of mutiple namespace like business.calculation and business.logistics. Can this structure also be used in the UI layer?
It just doesn't feel right to create 100+ winforms in the same winform project.
Cheers!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的。随着应用程序的增长,良好的结构将有助于保持理智。您将面临一些挑战:
例如,您可能会考虑将表单分组到命名空间中,例如:
business.library.ui --常见的、可重用的UI组件可能会放在这里
business.calculation.ui——与计算相关的UI,取决于库UI。business.logistics.ui——
与物流业务领域相关的UI,取决于库和计算UI
Yes. A good structure will help keep your sanity as the applcation grows. You'll have some challenges:
For example, you might consider grouping the forms into namespaces like:
business.library.ui -- common, reusable UI components might go here
business.calculation.ui -- UI related to the calculation, which depends on the library UI
business.logistics.ui -- UI related to the logistics business area, which depends on the library and calculation UI
我发现根据组成整个应用程序的子系统构建命名空间,然后根据用例组织 UI 的命名空间会更容易。
I find it easier to structure my namespaces according to the subsystems that make up the whole application, then organise the namespaces for the UI according to use cases.