Creating similar versions of apps with inheritance

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there,

Could someone give me the general overview of how I could go about this:

I am creating two applications that are based on virtually all the same
code. The main difference will be the 3rd party control that will be the
majority of the main form. Each version of my app will have a different
control with supporting code. My plan is to create a base main form with
method stubs that at the moment will be "overridable". I may in the future
convert the main form to an abastract form (must inherit).

I would then like to have a separate project for each version where the main
form is then inherited from the base form mentioned above. This way I can
create setup projects for each version. I just tried that but when I went to
add an inherited form, it could not find the base form in any of the
assemblies. Is this possible?

I guess the other way I could do it was to have all the forms in the same
project: base and inherited. Unless there is some way to manage all this I
think it may get messy trying to create multiple executables from the same
project. Wouldn't there be quite a bit of manual changes to project settings
each time I wanted to build the "other" application?

Another way of doing this would be to create separate solutions for each
version of the application (I didn't think of this until just now.) The more
I think of it, the more I like this idea.

I'm sure this has been done before so I'm just looking for the best gameplan.

Thanks,

Carlo.
 
Hi carlor,

I'd suggest to take a look on books about design patterns. There are design
patterns taht cover exactly what you need.
 
Hi there,

Thanks but I was just hoping to get a few sentences to lead me in the right
direction. I was at Chapters the other night but didn't see anything
appropriate. Can you make any suggestions?

Thanks,

Carlo.

Stoitcho Goutsev (100) said:
Hi carlor,

I'd suggest to take a look on books about design patterns. There are design
patterns taht cover exactly what you need.


--
HTH
Stoitcho Goutsev (100) [C# MVP]

carlor said:
Hi there,

Could someone give me the general overview of how I could go about this:

I am creating two applications that are based on virtually all the same
code. The main difference will be the 3rd party control that will be the
majority of the main form. Each version of my app will have a different
control with supporting code. My plan is to create a base main form with
method stubs that at the moment will be "overridable". I may in the future
convert the main form to an abastract form (must inherit).

I would then like to have a separate project for each version where the
main
form is then inherited from the base form mentioned above. This way I can
create setup projects for each version. I just tried that but when I went
to
add an inherited form, it could not find the base form in any of the
assemblies. Is this possible?

I guess the other way I could do it was to have all the forms in the same
project: base and inherited. Unless there is some way to manage all this I
think it may get messy trying to create multiple executables from the same
project. Wouldn't there be quite a bit of manual changes to project
settings
each time I wanted to build the "other" application?

Another way of doing this would be to create separate solutions for each
version of the application (I didn't think of this until just now.) The
more
I think of it, the more I like this idea.

I'm sure this has been done before so I'm just looking for the best
gameplan.

Thanks,

Carlo.
 
Back
Top