|
eWay Ltd eBusiness Solutions |
||
|
Update 5 Apr 2001: language compatiblity for VB restored.
Update 14 Mar 2001: .NET to support Linux (silicon.com)! Cross compilation for Windows and Linux is already available with Borland's Delphi, but this is the first time it's been talked about from Microsoft. Microsoft's .NET FutureBeta1 of the .NET framework and the Visual Studio .NET development toolset appeared in late 2000 amid a flurry of marketing hype. It's easy to dismiss product announcements as overenthusiastic marketing, but from a look at the product beta, this is not the case here. (To get the beta, updates and the final product when it comes out, the best thing to do is get an MSDN Subscription.) After studying .NET in more detail, we were stunned by the scale and scope of the changes in the new architecture, which amount to a complete redevelopment of the Microsoft development architecture. .NET - A Total RewriteLessons from JavaSince Microsoft have been prevented from developing their Java toolset
further, they have gone a step further.. Portability and Just-in-Time compilationThe .NET compilers take whatever source code language is being used and compile to a new assembler-like pseudocode called Microsoft Intermediate Language (MSIL). This is platform-neutral, and a final Just-in-time compilation step (part of the Common Language Runtime ) translates the intermediate language into code for the target processor. Although .NET applications are initially portable only in a limited sense (across Win32 platforms including Windows2000, NT4, WindowsME/98 and possibly even Windows95), in the future this means that .NET executables can be deployed across WindowsCE platforms including non-Intel/x86 processors, and we assume the next generation Win64 operating systems (now in Beta known as XP [previously Whistler]). In theory a simple .NET application will work on any environment for which a
.NET Common Language Runtime (CLR) engine exists. In this respect
the CLR plays a similar role to the Java Virtual Machine. [In fact it is a
mystery to many why MS never did this before, since their popular development
tool Visual Basic for years only compiled to a pseudo-code which was interpreted
by the runtime, it was always a shame the runtime was not developed for other
platforms.] Garbage collectionGarbage collection is used instead of COM reference counting: The .NET framework has a garbage collector, as per Java, whose job is to clean up objects which are no longer in use. This is in contrast to the COM way of doing things which was to maintain a count of references to each object, and release the object when the count returned to zero. This had the following problems:
The garbage collector solves these problems and is even capable of cleaning up circular object references. A side effect of this change is that Destructors ( Terminate events in VB) may not be called when you expect (not called as soon as you release an object reference), so you may want to have an explicit Close method for objects currently do a lot of work in their destructor. Object Oriented Features
See below for more VB changes. .NET framework librariesWith the upgrade to .NET, languages such as Visual Basic .NET will no longer be intrinsically inferior to Java in terms of the actual language and runtime features, the object oriented features and runtime architecture are indeed similar. However, the power of a language also comes from the standard libraries supplied, and Java has been strong here from the beginning in its built in support for threading and sockets, and now even more so with the enterprise Java features. With .NET, MS are supplying enhanced Server objects for Message Queuing, Scheduling, Exception
handling, Event logging, Performance Counter, Directory Watcher and many
more. With Windows2000 Server and .NET libraries we are a step nearer the Object Oriented operating system envisaged by Redmond a number of years ago. What, no COM?COM is replaced by the new Common Language Runtime. [!!] COM is the long-standing Microsoft mechanism for communication between
programming objects, the Microsoft equivalent of CORBA. Some of the reasons for this change are due to the fundamental architecture changes described above (Lessons from Java), garbage collection instead of reference counting and so on. CLR deployment improvementThe CLR eliminates many COM problems with regard to language interoperability, application deployment, and component versioning: 'COM has gained a reputation for being fragile and hard to deploy because it requires registry entries for things like ProgIDs, CLSIDs, IIDs, and type libraries.' (MSDN). Instead, object references and vtables are resolved as part of the new Just-in-time compilation step. This allows side-by-side deployment of different versions of the same component and drag and drop deployment (as per Java, no need to explicitly register components). It is even possible to configure client components to be either tied to particular component versions or to automatically pick up the latest available version of a component. This will solve a lot of development problems for component developers: previously (currently) the COM insistence on an immutable interface based on a class id made rapid application development of component-based systems difficult since the component interfaces are constantly changing during this type of development. Workarounds to resolve this (such as VB Binary Compatibility compilation) had their own problems since repeated compilation created long chains of interface forwarding in the registry (as effectively each compilation creates a new interface and maps the old interface onto the new one). For more detail on this topic, see MSDN Magazine article. Interoperability improvementsInteroperability is inherent to .NET since all languages compile to the same MSIL pseudocode. Beneficial side-effects of this are:
Web ServicesSOAP (Simple Object Access Protocol) is intended to become the vendor-neutral standard for doing Remote Procedure Calls over HTTP: the idea is that by packaging up methods and results in XML, Servers can talk to each other in an independent language with no knowledge required of which operating system is being used on each server. Bill Gates' vision here is for intelligent agents to collate information from different sources for the internet user. You can try out Web Services today with the SOAP toolkit for VisualStudio6: this allows any COM interface to be exposed over HTTP [with the restriction that only native COM datatypes can be used]. The configuration tool creates all the code required to expose an interface: the request and the results are sent packaged as XML, however this is transparent to both client and server application if using the toolkit interfaces. In the VS6 version there is a little client work to do to set up the call, .NET should be even more transparent. WindowsDNA Upgrade NotesThe .NET internet solution is an upgrade of the main Windows DNA architecture, ie ASP for presentation, VB business objects. ASP+ASP is now compiled with fuller language features - once again, a step closer
to Java and the currently superior JSP architecture. How this actually works is as follows:
This incurs an overhead in the size of transmissions and a certain amount of server processing, but saves a lot on the actual programming side since the forms are no longer stateless and you no longer have to write your own code to keep track of the users status. [And obviously the mechanism is not dependent on sessions, so no scalability problem to upgrade to a server farm.] Pocket Internet BrowsersWith the Mobile Web forms library different mobile devices can be targeted
from the same page (including WML for WAP devices and HTML3.2 for Pocket
Internet Explorer on WindowsCE for example). Visual Basic notes for .NET FutureMost of the features below are really features of the .NET common language runtime rather than VB itself, such as the object oriented features and modern (ie Java-like) language features:
The IDE and debugger is also language neutral, so multiple components written in different source code languages can be debugged from the same IDE. Language ChangesThe following features are dropped:
Data Type changesFundamental to the .NET interoperability are a common set of data types across all .NET languages. These changes apply to VB:
|
|||
|
Tools: Leave a message - Send-to-a-friend - Report a Problem Copyright © 1999-2000 eWay Ltd, all Rights Reserved - see Terms and Conditions. |