written by Sumbera, S., Nov. 2002
2. MDL Evolution
We will cover BRIEFLY MDL evolution - MicroCSL, MDL,JMDL, Native code and .NET |
![]() |
In this part we will outline the evolution of the family of programming languages based on C in MicroStation to which MDL belongs. knowing a continuity of this evolution will give you better acquaintance with nowadays MDL position, better orientation in language choice for your solution and gives you presumption of the trend in programming. This knowledge is important especially when developing languages are often improved, changed or raised as new “ultimate” platform. Following picture shows MicroStation C-based languages with added future prediction (dashed line). Next we will emphasize some important features of each language evolution step.
Genesis of C based languages under MicroStation
MicroCSL was pre-MDL development library containing link modules to be linked
with custom application. The library provided functions for direct manipulation
of graphics elements in a design file or cell library, element conversion
routines, database interface and some MicroStation system functions.
One of the advantages of this approach was fast native code primary used for
computationally intensive applications. On the other hand disadvantages covered
several limitations:
• Only sequencing MicroStation commands
• Out of process execution (separate task)
• Difficult multiple application interaction
• Not well integrated (look and feel) into MicroStation
• Element manipulation directly in design file, not in memory
• MicroCSL library is extra cost item
Fig. UNIX way of developing application in MicroCSL
In spite of above, MicroCSL was that time solid foundation
for MicroStation application projects which gave birth to many subsequent MDL
programs
MDL – “MicroStation Development Language” has been introduced in Microstation
v.4 in year 1991 as a solution for professional developing of application for
MicroStation.
Bentley intended to create leading development framework that would be powerful
enough to create either simple customization utilities as well as robust
commercial applications which perfectly fit into MicroStation system; i.e. has
the same look and feel and are tightly integrated with it. A tool that would
replace MicroCSL or UCM (User Commands), and that was MDL.
Another reason for MDL was platform independence of the code, that’s why
reference to any system dependent functions were mostly removed or replaced by
mdl function wrappers. However nowadays MicroStation target only Windows
platform.
Here is the list of MDL version released with corresponding MicroStation and its
major enhancements:
MDL version |
release year |
Description |
MDL v.4 |
1991 |
First MDL release for DOS, UNIX and Mac platforms covering all important features for complete MicroStation programming. A special library was provided for migrating code from MicroCSL to MDL. MDL provided External programming Communication interface for interoperability with native code or MicroCSL through message queue and shared memory . |
MDL v.5 |
1993 |
MicroStation v.5 supported DOS, Win,WinNT,Unix,Mac. MDL got new function for Dynamic Link Modules (DLM) and DDE functions (Dynamic Data Exchange) for interoperability with native code. |
MDL 95 |
1995 |
New functions like mdlBasic, mdlHView, mdlLicense,mdlRasterRef. new GUI features such as tool boxes, tool tips, added icons for list box and others. Added Shared libraries modules. |
MDL SE |
1997 |
GUI enhancements – added Tab item and combo box item. MicroStation SE was still multiplatform program |
MDL J |
1999 |
Only minor changes for MDL. MicroStation targeting only Windows platform |
MDL v.8 |
2001 |
Big step in MDL API, runtime and compiler, added new functions for mdlTree and mdlList dialog items. All MDL code may be compiled as native code. |
MicroStation /J came with Java and JMDL integration. Although Java adoption was logical in time of Java enchantment JMDL was step aside. JMDL is non standard language – something between C++ and Java, or Java with pointers. At that time, you could hear something about ECM – Engineering component model where JMDL had to play big role. Anyhow JMDL was used in MicroStation Geographics iSpatial where it was used in SDODGN API. Nowadays JMDL has no future and developers should concentrate on VBA and COM object introduced in MicroStation v8.
This is right direction of MDL in v8 of MicroStation. From version 5. of MDL you could write so called DLM (dynamic link modules) for MicroStation. Now in v8 this ability was rapidly improved so most of the MDL code can be directly compiled into DLL. Moreover you may debug native code in Visual Studio and write code for MicroStation in arbitrary language. Now MDL is MicroStation Development Library indeed set of API and not the special interpreted language.
.NET will be (or it is) next step in MicroStation development. I would say, if you are thinking towards the future, think in .NET. A first article describing .NET and MicroStation together can be found here (.NET and VBA interoperability in MicroStation)
Outlooks...
by Keith Bentley, 2001 on news group
Martin, Java does have a lot of advantages as a programming environment over C and C++ for many distributed computing problems. However, it does have its limitations, some of which you've mentioned below. JMDL is a set of Bentley-developed extensions to Java to overcome some of those limitations, particularly to make it easier to interface to existing non-Java code (JMDL adds structures and pointers, among other things, to Java).
If you've followed what's happened in the Java world over the past several years, you know that there's been a lot of turmoil about the directionof Java. Microsoft attempted to extend Java (for some of the same reasons we did) and Sun sued them for it. Rather than fight Sun over Java, Microsoft decided to create a "new Java", and you've probably heard of their new language called C#.
While Microsoft doesn't describe it that way, it's really a better-Java-than-Java. In fact, syntactically and conceptually, C# is very similar to JMDL in many respects. C# is just a part of a totally new software environment for Windows called .NET. It's a huge deal for Microsoft and therefore will become so for all Windows software developers everywhere. Of course .NET "changes everything", for us and for everyone else, but one thing it changes is the necessity for JMDL given the existence of C#, since C# solves many of our issues with Java.
I really can't say more than that for now, but at the developer conference last month we explained this and mentioned that we (Bentley) are not starting any new JMDL projects. However, we do have a lot of JMDL code inside MicroStation and we do use a lot of Java in our server applications.
So, undoubtedly you will ask "what programming environment should I use?". Unfortunately there's no one right answer, and I'll cop out with the usual "it depends" fallback. I can tell you that when we take an existing V7 MDL application and do any substantial work to it, we start by converting it to C++. That doesn't take much more than mechanical conversion and has some nice benefits which I won't go into since I see there's already a thread here about that.
One of the reasons for the emphasis on VBA, in addition to the obvious benefits of the ubiquity of VB, is that VB.NET will likely be a natural and powerful growth path. HTH, Keith
by Ambrosa Nov,2001, news group
Hi, this post I started to write a few days ago so some answers are already in air, but I will finish my thoughts I think the problem is a unique modern object oriented framework for MicroStation, not the language itself. I can't resist but I must compare the situation of MicroStation system with the Windows system.
Windows has C-based Win32 Api,
MicroStation has C-based MDL Api,
Windows has MFC for Win 32 API
MicroStation has no C++ classes.
Windows has Visual Basic which is able to call Win32 Api,
MicroStation has VBA, direct call to MDL API is normally not possible.( I mean mdl_ set of functions)
Windows has Visual J++, which is able to call Win32Api (J/Direct)
MicroStation has JMDL, which is able to call MDL shared libraries and DLL code (one direction jmdl_import, but if this jmdl_import is able to call mdl_ set of functions is the question)
Integration of Java into MicroStation was good decision.(note Java virtual machine is able to run in MicroStation 95 process or enywhere where is possible to call JNI functions like JNI_CreateJavaVM(..)) as MDL now convergates to native C/C++ Java is convergating to C# it looks like JMDL will convergate to something between C# and C++.NET but more C++.NET VBA will be naturally VB.NET I think Managed/Unmanaged C++.NET is the very very near future for MicroStation developers (next year actually).C++.NET allows integration of core MDL API, allows using .NET framework specially could be good for user interface and allows semaless calling of other .NET languages together with right garbage collector management.So the scenario could be like in C# or VB.NET is created user interface and called by the C++.NET which is used for interaction with MicroStation via mdl_ functions (or something similar) . (but why not to do all in C++.NET ? if it is just as simple as in C#) well these was just my opinions and visions Ambrosa
January 2001 issue of EAReport
MicroStation V8 also signals the full return of Bentley to the Microsoft fold. While V8 still supports applications written in C, C++, and Java, the company has dropped Java in favor of VBA and C#. With these APIs, “The entire functionality of the software is exposed to application developers,” said Keith Bentley. “And we only support Windows—no other operating systems.” Indeed, unlike earlier versions of MicroStation, V8 only runs on Intel Pentium-based or AMD Athlon-based systems running Windows NT, Windows 2000, or Windows 98 or ME. Bentley Systems, Incorporated will also build on top of Microsoft.NET. Look for .NET to become the infrastructure required by future products, much the same way that Windows replaced the need for software vendors to each write their own drivers for every piece of hardware. (For more background on Microsoft.NET, see the January 2001 issue of EAReport.) NOVEMBER, 2001
March 2003, newsgroup bentley.microstation.v8.mdl news:YPXjI$98CHA.1648@prdweb004.viecon.com
Gec,
All good questions and good observations. We have always tried to provide the
most productive development tools with MicroStation, and that always involves
trying to keep up with what's happening as the world changes around us.
Sometimes we like the changes and sometimes we don't, but we all have to adapt.
On the subject of platform, we have found through experience that in the market
we're in, the only profitable platform is Windows. You might not like all of
Microsoft's business practices, and I see that there are a lot of people who
like to point out any deficiency in their software, but our experience with the
stability of Windows as a development platform for MicroStation has been pretty
good. We run the same version on Windows 98, NT, 2000, and Windows XP. A few
places we have to have runtime checks for what platform we're on, but not that
many. Don't expect us to get back to supporting multiple platforms - the cost is
too high and the revenue too low.
MDL was originally developed with the idea of delivering a productive
development environment that could be used to support all of the platforms that
MicroStation ran on with the same source code. We did a lot of the hard work on
making the GUI portable across DOS, Windows, Mac, many flavors of
Unix, and even OS/2 so you didn't have to. In the process we developed a pretty
capable platform with access to basically every feature of MicroStation. MDL is
the workhorse of MicroStation, and it's going to be around for a long while yet.
In V8, since we no longer have the multiplatform concerns of years past, we have
made it easier to use all the features and builtin functions of MDL while
actually compiling your code with the Microsoft Visual C++ compiler and
debugging it using the Visual Studio development environment. That eliminates
two of the common complaints about MDL - the weakness of the command line
oriented debugger, and the inability to use C++. Now you can do both pretty
easily. There is no reason not to continue to use MDL, although you should
investigate using the C++ compilation option for your own benefit.
MicroCSL is dead. It's in V8 in an "unsupported" state, but I don't know of
anyone who is using it. We will be completely removing the supporting code
for V9.
User commands are also dead. UCM's are in V8 in an "unsupported" state, and some
UCM's do work, but there are many that can't work with the new V8 format. We
won't remove UCM's for V9 because there isn't a whole lot of code there, but we
won't be enhancing the code either.
MicroStation Basic is going to be supported at least through V9, but there are
no enhancements planned.
VBA will continue to be supported and enhanced at least through V9. If
Microsoft's .NET version of Visual Basic becomes embeddable in applications and
VBA no longer available (it's not up to us in that case), we'll at least have a
migration plan to the new environment. I think (but I can't promise) that VBA in
it's current state will be around at least another 5 years or so. After that you
might need to change over to Visual Basic.NET or something.
JMDL was and is a great development platform. I (and I know many other
developers both within Bentley and outside would agree) consider JMDL to be a
technical "tour de force" and found JMDL to be the most enjoyable and productive
programming environment I ever used. However, the friction between Microsoft and
Sun over Java has effectively killed Java (and thus JMDL) as a long-term
winner.We will probably supply the JMDL runtime only as an optional install in
V9, and we will remove all MicroStation dependencies on JMDL. Certainly I don't
recommend starting any new development in JMDL.
We are very actively investigating what can be done with Microsoft's .NET
development enviroment. Many of the features of the C# language look like the
Microsoft developers looked at the enhancements we made to Java to produce JMDL
(pointers, structures, the ability to easily call native code
to name a few). And of course they have unlimited resources to apply to the
development environment, the supporting libraries, and the GUI development
tools. It's too early to say more, but I think time spent learning about .NET
and C# will turn out to be time well spent.
HTH
Barry Bentley
barry.bentley@bentley.com
mail comments to stanislav@sumbera.com