The application I'm working on is a WinForms application written almost entirely in Visual C ++ around 2003 .. NET was chosen before I arrived on the scene due to the user interface creation structure, but the vast majority of the code was developed in unmanaged land. Part of this was absolutely necessary - we do real-time image processing on some very large datasets, use some Intel image processing libraries that need pointers to image buffers, and we really are in 1% of cases where performance is critical.
The application itself was a large executable file formed by linking the user interface code with several static libraries, each of which corresponds to a functional subsystem - data collection, image processing, and the like. Since I joined, I split a couple of these subsystems into DLLs by writing managed wrappers that we reuse in other applications, but the main application still consists of statically linked libraries.
My colleague and I very much distinguish between the question of whether further development should be emphasized uncontrollable or controlled. Except for the case I mentioned, there are no performance requirements that dictate unmanaged code. We are strongly committed to .NET, so the cross-platform issue is not a problem. I am of the opinion that we should approve of the governed, unless dictated otherwise.
Last month, my colleague developed a set of classes that controlled the subsystem; instead of embedding them as ref classes and adding some events to the .NET interface, he wrote a couple of Observer implementations, using gcroot to store handles for managed clients, and allowed himself to remain in unmanaged land. This seems to me wrong, simply because why write what you can get for free? But I wonder if I'm too hard.
Any thoughts?
source
share