Content area
Over the years, engineers engaged in developing applications to control test and measurement (T&M) equipment used a variety of languages and development environments. Often, it is the comfort level of engineers doing the programming that determines which programming language they choose -- rather than overall value, productivity, ease of use, scalability or capabilities.
[Graph Not Transcribed]
[Graph Not Transcribed]
Adapting the Visual Studio.NET environment as a standard could enable programmers to work with an open software standard when installing, managing and growing their environment. There are additional tools that can help them solve specific problems, while remaining in the open software standard environment. The following is an explanation of the.NET platform:
In a nutshell
Two major parts of the new.NET platform are important to writing Windows-based applications. The first is the.NET Framework comprising the Common Language Runtime (CLR) and the Framework Class Library (FCL), and the second is the Visual Studio.NET development environment. (See figure 1).
The Common Language Runtime (CLR) is a runtime that is usable by all the different.NET programming languages. It is designed to simplify development and is object oriented, which means that classes and inheritance are fully supported -- even across languages. A class written in VB.NET can be inherited from it in another language such as Managed C++ or C# and vice-versa.
One of the new features of the CLR is that all.NET objects are garbage collected. Programmers will not have to deal with stray pointers, memory leaks and missing object releases. This has traditionally been time-consuming for software development teams and is the source of many defects.
Design Goals
The second main part of the.NET Framework is the Framework Class Library (FCL). This library is a large set of new classes, types and objects that Microsoft developed over the last four years. It creates easy-to-use objects that handle a lot of the low-level work you would otherwise have to write yourself if you are using earlier programming languages. Another benefit of the FCL is that it unifies all of the application programming models. (see Figure 2). In the past, you had to learn different APIs depending on what language you used. The consistent API available in any.NET language is factored and extensible, because most of the framework allows you to inherit from it and to make changes if you do not like what the base classes are doing.
Languages
Because the.NET Platform is language neutral, all.NET languages are first class players. This means you can use components built from different languages in whatever.NET language you are using. Thus, you will be able to leverage your existing skills instead of learning another language and development environment. The language neutrality of the framework enables consumers of.NET components to use all the components in any language. Microsoft is providing Visual Basic, C++, C#, and J#. Third-parties are creating.NET languages for FORTRAN, Perl, Pascal, Python, COBOL and others.
Visual Basic.NET
There are some enhancements to the Visual Basic (VB) language, many of which have been requested by the VB users. VB.NET is a peer language to C#.NET and C++ -- it has all the advantages of the.NET Framework while retaining VB syntax. VB.NET supports object-oriented programming with new features such as implementation inheritance, overloading, parametrized constructors and overloading. It includes true structured exceptions, optional stricter type checking and a single form of assignment.
The VB runtime (named msvbvm60.dll) is replaced by the Common Language Runtime (CLR) and every feature of the.NET Framework is directly available to VB.NET programmers.
C# language
C# is a brand new language developed for.NET, and it's the first component-oriented language in the C/C++ family. C# has its properties, methods, events, attributes and XML documentation all in one place. There are no header files and no IDL files. It can be embedded in ASP.NET pages. It was built to simplify C++, but preserve its heritage. Use of legacy C/C++/COM code can be accomplished through P/Invoke and COM Interop. There are millions of lines of C# in.NET Framework.
C++ language
Microsoft added 14 new keywords to the language that make up the managed extensions for C++ (MC++), but it is still C++. Nothing was taken away. In fact, you can still compile native applications (those that don't use.NET) using VC 7.0. MC++ enables you to mix native C++ and managed code, which allows you to gradually migrate code to.Net instead of porting the entire code base. This ability gives you full access to the.NET Framework Class Library in your C++ application.
Interactive development environment
The biggest change in the development environments is that all of Microsoft's.NET languages can be used within the same Interactive Development Environment (IDE). In fact, a number of non-Microsoft languages integrate into the VS.NET IDE. The new environment closely resembles the Visual Basic development environment, so most VB programmers will be immediately comfortable. The IDE is fully extensible and programmable, and it has a new feature called dynamic help. The IDE knows what language keyword or component you are working on and changes the dynamic help pane accordingly. Debugging with different languages is done in the same debugger. Remote debugging is also easier. This was possible in C++ but non-trivial, and it was not possible in VB6. You can debug multiple programs using multiple languages on multiple machines, all at the same time.
Extensible and programmable IDE
Microsoft has opened up the IDE and published an API so tool vendors can integrate their languages into the environment, making it possible to have many non-Microsoft created programming languages in one IDE. Opening up the IDE also allows vendors to develop tools that are targeted specifically at the T&M programmer. Agilent Technologies, for instance, has created a T&M Programmers Toolkit for Visual Studio.NET. It is a series of tools and API's that are part of the.NET programming environment.
[Graph Not Transcribed]
[Graph Not Transcribed]
In conclusion, developers who choose to work within the.NET Framework to create and test new products will be able to focus their creativity on T&M solutions and leverage a development platform created by Microsoft engineers over the last five years. By adopting this framework, the T&M community can immediately access a wealth of innovations, secure its investment and accelerate design and test productivity. It is expected that engineers will experience up to a 50 percent decrease in time spent programming instruments and displaying data by working within the.NET home base.
Ken Colasuonno is a software project manager at Agilent Technologies and is responsible for the development of the company's T&M Programmers Toolkit.
One of the new features of the CLR is that all.NET objects are garbage collected. Programmers will not have to deal with stray pointers or memory leaks.
Copyright Kerrwil Publications Limited Jun 2003