Re: Complex Windows Applications in C# -- how high is the bar?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Am Wed, 23 Jan 2008 13:15:41 -0500 schrieb Norm Powroz:

Hello Norm,

you have substantial new requirements to implement, so it should be clear
that you should rewrite the application from scratch. And it is absolutely
no question to use the .NET platform.

I faced the exact same problem one year ago: implement a bunch of new
functionality into our existing, large C++/MFC application, or rewrite the
whole stuff anew. I decided to to the latter, and the longer it takes, I
see that this decision was absolutely correct.

The difference is not so far a language question. I assume that any decent
C++ programmer can learn C# in days. It is more the paradigm-change that
you have to master, and which will take some time. When I look at code that
I wrote one year ago, I often immediately feel the need to rewrite it
again. It was "C++ style", and in .NET we do things differently. (I can't
go into more detail here - that would fill a book).

If you have to reimplement the data access layer, look into ADO.NET, and
compare that to the old ODBC-way....

With WinForms you can do everything you can do with MFC. Both use the
standard Windowws controls, not more, and not less. So, if your system can
handle the amount of windows in your old software, chances are that there
will be no problems with a reimplementation that uses WinForms.

WPF is different. It uses a radically different implementation model für
the GUI, as you sure know. I did some tests here and did not find any
significant problems, except that there is no DataGridView equivalent. We
do not need the fancy stuff WPF allows, but there are things that are
really nice. I like the new event model very much, as well as the new
property system. Both make solving certain problems in our software much
easier. So, WPF has advantages bsides a new GUI system.

And don't forget Silverlight. Even if our software is not intended to be
used over the net, with WPF we could easily provide that.

So, I am really happy to have decided to switch from unmanaged C++/MFC to
..NET/C#/Winformas. At the moment I consider to also use WPF-features. I
hope that next year I can say that this step was also correct. Good luck!

Paule








That is the theory. In practise, there are some considerations:

-




Whether to use "old style" C++/MFC/unmanaged etc or "new style"
C#/WinForms/WPF etc is easy






I think that there are many developers facing the same problem. Legacy
Software of some age written in C++ with MFC, ODBC etc. must be maintained.
Sooner or later management or developers ask whether it is better to
rewrite from scratch.

The decision is easy when you have substantialy new requirements to
implement, like mayor changes in the database structure, as you said. In
the long term you usualy save a lot of time when you rewrite the code.

.



Relevant Pages

  • Re: Questions about hiring .NET developer
    ... rewrite the program from scratch, ... This is the classic developer response to any ... It is the most fun for the devleoper, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Questions about hiring .NET developer
    ... rewrite the program from scratch, ... This is the classic developer response to any ... It is the most fun for the devleoper, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: [take22 0/4] kevent: Generic event handling mechanism.
    ... compared to kqueue in kernelspace, or just about what structure is being ... it was some kind of a joke to 'not rewrite *bsd from scratch ...
    (Linux-Kernel)
  • Re: Glossary vs. something else
    ... > JavaDoc or rewrite all of it from scratch. ... it becomes a lot clearer. ...
    (comp.lang.java.programmer)
  • Re: How much code is disputed by SCO?
    ... but would you rewrite the comment from scratch too? ... would you mess with it? ... >Once I understand the code completely, I rewrite it completely. ... >function or module would do since that defines the interface. ...
    (comp.unix.sco.misc)