0

We have a legacy application with, among other things, the ability to create instances classes within VB6 DLLs dynamically and call methods with varying signatures.

We have no way of accessing the legacy application's code and no way of removing it from production right now.

Our requirement is to build small plugin-type applications that would be called by the legacy application. These applications have historically been written in VB6 but there is a push to create newer ones in .NET while reusing existing VB6 code where feasible, using encapsulation to hide the VB6 implementation which will eventually be replaced.

So far I've discovered that the .NET applications can be created without issue by making them COM visible with some boiler plate code.

The things I can control are the parameters being passed into the new applications and their signatures.

I would like any new applications to bypass the boilerplate, the architecture becoming:

Legacy app > new .NET application > new DLLs

One possibility I've come up with is to have the legacy application pass the assembly and class name as a parameter and a json/xml object containing the parameters that the target class would need as another parameter. The new application would then instantiate DLLs as needed using reflection.

The alternative would be to create the .NET applications in a similar way to the VB6 ones, with a parameterless constructor and a method serving as an entry point.

To draw a picture, imagine the legacy application as a datagrid, containing maybe a row id and the target apps needing the row id to do whatever they need to do.

How does this design sound? With longevity in mind, the .NET applications will be designed with reusability in mind from the start. I'm slightly worried that if / when the legacy application is phased out we'll be left with a poor architecture as a result of how things need to be done now.

Also, am I missing anything obvious here?

migrated from stackoverflow.com Jul 25 '15 at 19:42

This question came from our site for professional and enthusiast programmers.

  • 1
    @legomaker It's best not to recommend sites in comments, since that leads to cross-posting. Prefer flagging for moderator attention when a migration seems appropriate. However, this does look like a potentially good Programmers question to me, so flag away. – Ixrec Jul 22 '15 at 1:09
  • @Ixrec: I flagged it before posting the comment. Yeah, I can understand how this might lead to cross posting especially by new users. Thanks for the heads up. – bobbyalex Jul 22 '15 at 1:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.