written by Sumbera, S., Nov. 2002
1. MDL myths and misconceptions
let's look on what you may hear, read or get impression, but the real situation may be more or less other. |
The C language MDL use is original language from which nowadays popular
languages like C++, Java, JScript, C# has been derived. The C syntax is easy,
not verbose and straightforward. Learning C language is good investment for
serious developer adept.
MDL is not object oriented language but still you may write if you want
structures encapsulation attributes and functions of your objects. Through event
driven programming you may overload default behavior of events similarly to
virtual functions in C++.
MDL is mainly API of thousands functions. With MicroStation v8 you need not to
relay on MDL interpreted code running in box of MicroStation, but rather you may
develop in you favourite language (VC++, Delphi, C#,Visual Basic, VBA).
To learn whole MDL API is nearly impossible, however to learn how to program
and debug in MDL, how to compile and link application, how to use commands,
events, dialog boxes etc is moderate difficult. Important things are pointers.
MDL is compiled into optimized pseudo code. The MDL interpreter is not a
source level interpreter that uses tokens, such as the user command interpreter.
And finally most of the MDL API resides in native code. MDL application runs in
address space of MicroStation, thus calling any MDL API function doesn't cost
time consuming context switching. In the execution time of any well written MDL
application the speed is excellent. However for time-critical operation you have
free choice to use transparently native code along with the interpreted MDL
application.
Well, the command line debugger for interpreted MDL is not as comfortable as
you would expect even it offer all necessary operations. However there is
workaround. You may use for instance excellent Microsoft’s Visual Studio
debugger if you decide to write your application in native code.
Originally it is true, but as you will find latter you may use Visual
Studio IDE to write there MDL applications with intellisenese, function browser,
keyword highlight, undo-redo features etc. Or any other code editor (a lot of
MDL programmers use CodeWright). Going further and writing MDL as native code
you may use Visual Studio debugger.
Developing user interface in MDL API is less difficult then developing user interface in Win32 API for Windows for instance. Moreover MDL provide items which have no equivalent in windows controls such as levels or color picker. Again you are free to use any other GUI framework such as MFC, ATL or .NET if you feel you deserve more (and you should ;)
This misunderstanding may come from press. There is no oMDL (objective MDL).
JMDL (Java MDL) is hybrid language between Java and C++ but doesn’t provide all
API as MDL do (or the API is not well documented).
No, you may write easily small and simple application in MDL.
Bentley made big improvement to MDL by adding strong support for native code
compilation of MDL application. This step means that you may get out of the
MicroStation box and use anything available on Windows platform.
mail comments to stanislav@sumbera.com