Introduction to .NET

By the time this book hits the streets, you likely will have heard about a new technology coming from Microsoft called Microsoft .NET (.NET for short). The question in a lot of developer’s minds is “How does .NET interact with COM+?” Well, the bad news is that .NET has very little to do with COM. Microsoft has decided in many ways to abandon the existing COM architecture for developing components and is investing instead in a brand new technology called .NET. That does not mean that COM+ is dead; in fact, for the first version of .NET, if you are planning on using COM+ services, it makes a lot more sense to develop COM+ components than .NET components. Also, the current versions of the OS and the upcoming version, Windows XP, are all built to use COM+ natively. It will be a couple of years before the COM+ services are changed to .NET services.

However, Microsoft is making it possible to use .NET components in COM+ through a COM callable wrapper. The idea is that the .NET execution engine, the software responsible for loading and executing .NET components, will also act as a COM server. Thus, .NET components will use the same principles as MTS in which the calls to them from COM clients will go through yet another impostor object that will do the job of translating calls from COM (now referred to as unmanaged space) to .NET (referred to as managed space). It is possible through wrappers for .NET components to make calls to COM components and for COM components to make calls to .NET components. In Chapter 11, you will learn the details of this brand new architecture and how to make the two architectures interoperate.

All the major compilers (VB included) have been rewritten to emit a high-level form of assembly language called Intermediate Language (or IL). This means that VB will no longer compile code to native code that the processor can understand. Instead, VB compiles code to IL, and a Just-in-Time compiler at runtime (or at deployment time) changes the IL code to native code. The concept is similar to the way Java programs execute. Because the compilers have been changed to emit IL, a number of features have been added or changed to conform to the IL specification. In many ways, VB.NET is a brand new language—with a lot of exciting enhancements. In Chapter 11 you will also learn about IL, the .NET architecture, and the new features in VB.NET.

Get COM+ Programming with Visual Basic now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.