Click here to Skip to main content
15,888,313 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello Everyone,

I would like to share with you the following question I have in my mind about the migration procedure from the current code implemented in Visual Studio 6 to Visual Studio 201x.

The current VS6 application has a data layer based on OLE IDispatch interface.
This was to allow me to integrate Visual Basic 6 components into my main application and to exchange the data easily between these two languages.

Now come the time for migration and I would like to implement my application in c# under Visual Studio 2010.

All my current data are persist under compound files and under flat stream files.

I wonder if this is a good idea to duplicate the data layer to c# classes and via a translation method grab the data from the dispatch objects ?

What could you advise me about that strategy ?

Let's say I have the following set of ole automation objects:

Projects
  Project
     Workspaces
        Workspace
          ... 

All of them have a set of properties and methods.
They also have the IPersistStorage and IPersistStream interface available.

If I define c# classes let's say:

NetProjects
  NetProject
     NetWorkspaces
        NetWorkspace
          ...


They will have maybe after cleanup more or less the same amount of methods and properties.

How would it be better to transmit the data between the objects and the classes in an efficient way ?

Here were my ideas:

1. Keep the current automation data model for the implementation of my c# application. This will avoid data translation. The problem is about the implementation of these automation object in the unmanaged side. Would this have an impact on the performance ?

2. Create based on the direction we want to go an automation object or a class via a data layer c# library where the main data set is persisted in memory. This can invoke certainly some performance issues. What about file loading or saving operations?

3. Implement the c# classes in a library as an envelop to the current ole automation objects. Use these automation objects to invoke properties, methods and to stored the current loaded/created data set. This will open ways to replace later on the required c# classes with their new functionality and data formats.

What do you think about these possible ideas ? Do you see other alternatives to cover that issue in an efficient way ?

Thank you very in advance.
MiQi.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900