When I heard the .NET and C# announcements at Microsofts Professional Developers Conference in Orlando this past July, I (like every other sentient being in the universe) thought it was just a new marketing ploy. After careful investigation, however, I have found that one piece of Microsoft .NET is probably the most significant development since sliced bread. Microsoft .NET isnt newits a combination of existing things put together in a new way. Microsoft .NET consists of ideas from the AS/400, C++, Visual Basic (VB), Active Server Pages (ASP), and Java: Microsoft .NET is going to fundamentally change the way you write code.
History Lesson
Before you can understand just how important this platform is, a little background is in order. Java is a cross-platform language that has everyone, including IBM, really excited about Write Once, Run Anywhere (WORA). But so far Java has failed to deliver on the desktop. Instead, Java has found a home on the server. Sun Microsystems will not submit Java to a standards body, and this makes IBM and other Java licensees pretty ticked. There are, also, not a lot of Java programmers, but there are plenty of RPG, COBOL, C, VB, Fortran, Pascal, and various other programmers. These programmers dont want to learn a new language; nor do IS departments want to spend time and money getting these programmers up to speed on a new language. These factors have contributed to slow Java adoption.
A New Face to a New Language?
The C# language is a great development, but, again, a programmer is going to have to learn this new language to use it. C# may help C++ programmers (then again Java looks a lot like C++ already), but C# is a loser for the rest of us. However, there is something important underneath C#: the Common Language Runtime (CLR). The CLR is what allows Microsoft .NET to run the C# language. CLR is sort of like the Java Virtual Machine (JVM) of Microsoft .NET. So what? you say. Java already has a JVM. That, my friends, is precisely the point. Javas JVM runs only Java byte code, whereas CLR is language neutral!
How Does It Work?
The way it works is like this: A programmer writes code in a language and passes it through a compiler that outputs Microsoft Intermediate Language (MSIL). MSIL is platform- and language-agnostic. When a program attempts to run MSIL, it is compiled by a Just-In-Time (JIT) compiler into native code. This isnt byte code in a JVM, its compiled code targeted to the capabilities of the processor. Microsoft calls this managed code. Sounds like machine interface (MI) on the AS/400, doesnt it?
Here is where things start to get interesting. Using VB, I can make an object. Then I can have a programmer make an instance of my object and add extensions to it. However, that programmer could instance my object from any languagehe now has a choice. Right now, VB, C++, C#, and ECMAScript are supported, by Microsoft, on Microsoft .NET. Twenty companies are currently porting or are finished porting languages to CLR. These languages include Eiffel, Mercury, Scheme, Java, Python, and Perl. And this statement
isnt just talk; these languages were demonstrated at the Professional Developers Conference. Fujitsu Software just finished porting COBOL and is using it to author ASP in the ASP+ environment. Who would have thought: active COBOL. To see this oddity, surf to msdn.microsoft.com/library/techart/pdc_cobol.htm.
I spoke with Eduardo Ross of ASNA, and he stated that they are going to offer support for CLR in an upcoming release of ASNA Visual RPG (AVR). ASNA is buzzing with excitement about CLR and Microsoft .NET initiatives. AVR support means that you will be able to code ASP in RPG instead of VBScript or JavaScript. Even more exciting is that you will be able to mix and match languages or pick the language appropriate to the job at hand. There are some problems that cannot be expressed easily in C or RPG. I once replaced a 60,000-line RBasic program with a 500-line Prolog program that built its logic dynamically from an SQL database of rules. The point: You pick the language for the job.
Prolog is a logic programming language good for complex decision-making programs that need the ability to dynamically inference based on incoming data and conditions. C is good for manipulating data at byte level and for doing system work. RPG is great for doing business logic and reporting. Therefore, you need to pick the language that will best solve the business problem. CLR allows you to do this. Using CLR, I can make an expert system object with a logic programming language like Mercury and then let an RPG programmer instance that object, extend it, or create new objects based on it with RPG. Then a VB programmer can use the new objects created by the RPG programmer. The point is that you do not have to learn a new language; you can use the skills and languages in your organization.
Looking into the Future
Heres one last thought. A Microsoft spokesman confirmed for me that Microsoft has released both the CLR and the C# specifications to ECMAs TC39 language committee. Any vendor can now make a CLR implementation for its environment. Imagine if IBM chose to implement CLR on the AS/400, I could be writing VB objects that run on both Windows boxes and the AS/400. Now that would be really cool. Never mind cross- platform, I want cross-language!
LATEST COMMENTS
MC Press Online