考虑到父子双赢的表单,我们应该在父表单中放入多少代码?

发布于 2024-08-29 07:26:45 字数 141 浏览 2 评论 0原文

考虑我们有 2 个数据输入获胜表单:form1(父级)和该父级的 form 2 子级。

众所周知,我们可以简单地声明虚拟方法,以便将来可以被任何子级覆盖。

我的问题是如何构建父表单方法的蓝图?我的意思是每个方法都应该是虚拟的?或者什么?

Consider we have 2 data entry win forms : form1 (parent) and form 2 child of that parent.

As all we know, we can simply declare virtual methods in order to be overridden by any child in future.

my question is how to construct blueprint of the parent form methods? I mean every method should be virtual? or what?

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

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

发布评论

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

评论(1

久而酒知 2024-09-05 07:26:45

我觉得如果你有这样的想法,说明你缺乏正确的设计蓝图。

一个好的、可维护的软件由设计文档和许多其他支持文档组成。如果您认为可以从头开始,而不关心实际需要的内容,那么它将变得混乱并且需要大量的重构。

设计一个软件有多种风格。我不确定您选择了哪种方法。

父母应该包含它需要的一切;任何使它坚固的东西。孩子们继承了这些品质。父母不是根据孩子的要求进行编码的。

也许有时必须打扰父母,但仅限一两次。

I feel that if you're thinking this way, you lack a proper design blueprint.

A good and maintainable software consists of design document and many other supporting ones. If you think that you can start from scratch with putting little mind in what is actually required, then it will be chaos and need lot of re-factoring.

There are various styles to design a piece of software. I'm not sure which methodology you have chosen.

A parent should contain whatever it needs; whatever makes it stand robust. The children inherit those qualities. A parent is not coded on the basis what is required by children.

There maybe instances when parent must be disturbed, but then keep it to once or twice only.

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