开发者

Considering parent-child win forms, how much code should we put in the parent form?

开发者 https://www.devze.com 2022-12-28 03:10 出处:网络
Consider we have 2 data entry win forms : form1 (parent) and form 2 child of that parent. As all we know, we can simply declar开发者_运维百科e virtual methods in order to be overridden by any child i

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

As all we know, we can simply declar开发者_运维百科e 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消