.NET vs MVBA

Hi all,

Sorry for the naive questions, if they have already been answered on the forum, I am unable to find answers to this question.

If they are answered already, please point me to the thread.

I would like to know a few things about .NET and MVBA.

1. when i develop a .NET addin, does my application run faster than a similar mvba program doing the same thing?

2. If not faster, how can i speed up the program, if it has a lot of number crunching and loops.

3. What are the other advantages of .NET VS MVBA?

4. If i use the "app.CadInputQueue.SendKeyinCommand("xxxx"), is this the fastest way to accomplish a task, since these are tried and tested functions, compared to what one may create on their own.

Thank you

Parents
  • Hi,

    in essence I agree with Jon, so just a few more notes:

    Unknown said:
    does my application run faster

    Where VBA/COM API is used, the speed will probably be pretty the same (which means it's slow comparing to C++ compiled to native code). In other tasks you can reach much better performance in NET, because NET provides higher flexibility and libraries, so you can better optimize your code.

    I assume NET vs VBA comparison will change in a next version of MicroStation, which will provide a new NET API derived from MicroStationAPI and not VBA/COM.

    Unknown said:
    how can i speed up the program

    Well, C++ is the safe way how, it allows to reach great performance. But in fact many NET applications are terribly slow not because of NET, but because developers didn't understand specific features of NET. There is no general rule, but at least you:

    • Should ensure you use a proper and efficient alghorithm.
    • If possible, you use asynchronous or even better multithread code. (cannot be done in VBA)
    • You don't use wrong approach (e.g. to allocate too many very small amount of memory, copy big arrays or objects by value etc.). (quite limited in VBA)
    • Use profiler to identify bottlenecks (don't know if a profiler exist for VBA, but more tools available for NET)

    Unknown said:
    What are the other advantages of .NET VS MVBA?

    • [general] As Jon wrote, plenty of libraries both standard NET Framework and 3rd party.
    • [general] Much better development tools (debuger, profiler etc.).
    • [general] In general safer and less buggy code (and also tools to check code quality and metrics).
    • [MicroStation] Possibility to create command tables, so add-in behaves like real MicroStation application.
    • [MicroStation] Possibility to use WinForms to create Tool Settings dialog content and other "MicroStation like" dialogs.

    ... and there will be much more in the next version of MicroStation.

    Unknown said:
    If i use the "app.CadInputQueue.SendKeyinCommand("xxxx")

    Agree with Jon, never use this approach. There are some situations when API is not available, so the only way is to use the input queue, but it has to be exceptional.

    With regards,

      Jan

    Answer Verified By: theGreg 

  • Thank you so much for your fast response.

    These are just the answers i needed, with a little explanation to back them up.

    Thanks again

Reply Children
No Data