The. NET Framework for Java Programmers---1 (good)

Source: Internet
Author: User
Tags exception handling execution garbage collection integer soap reference
The . NET Framework for Java programmers
Author:ashish Banerjee

Objective

After reading this article Java programmers should is able to decipher and de-jargonize I T with the proposed ECMA standard.

Target Audience

Java programmers and system architects.

Summary

This article outlines Microsoft ' s proposed standardization the. NET Framework in ECMA Forum as CLI (Common Language infrast Ructure) But the Microsoft documentation refer this as CLR (Common Language Runtime). The CLR and JVM are compared with respect to market forces which the CLR definition. Components of CLR are examined followed by details of Microsoft ' s implementation of the CLR as the. NET Framework.
All along. NET framework are compared with Java architecture.
The material is derived from author ' own experience with Java since early 1996, Microsoft ' s MSDN site and standard Docume NTS from sites like ECMA and w3c.org. OverviewThe. NET framework is the Microsoft's answer to Java commune ' s objections to \ windonization\ "of Java.
Microsoft introduces a new language C #, designed by the Visual J + + team. But in the process it has do away with DCOM and also have changed it ' s flagship language visual Basic.
In a nutshell,. NET constitutes presently of three compiled languages C #, vb.net and C + +, a Java like runtime virtual Mach INE environment, five execution containers hosting this runtime, Namely:ASP.NET, Windows Shell, VBA scripting Host for Fice Suite, Visual Forms container and IE (Internet Explorer). Much like Java it contains a rich set of APIs and Lib.
Enhancements over Java framework include the use of SOAP (simple Object Access Protocol) for remoting. Version and security scoping using concept of application Assembly (described later). A Common Type System is introduced for making mixed language programming. For example a VB component can inherit from a C # class.
In longer term Java and. NET would converge and therefore an overview to the new framework is presented to here Java Prog Rammer ' s perspective. comparing CLR with JVMThe. NET framework ' s Common Language Runtime (CLR) is much similar to Java Virtual Machine (JVM), in terms of garbage Coll Ection, security, just in time compilation (JIT).
However, the fundamental difference arises from the variance in perception to the Sun ' s Java design team headed by James G Osling and that of Microsoft ' s C # designers Spear headed by Anders Hejlsberg
Sun viewed the Internet as an heterogeneous network consisting of multiple operating. Thus Sun had to the GUI as the least common factor, supportable from all such platform. This is also the major reason of Java ' s failure in client side applications. Java has been successful only in server side where there is no great the need for GUI.
Has failed at client side desktop application Arena, Sun are now targeting Java to server side applications market, whic H is dominated by Unix and Linux flavors have approximately 60% of the server market, the rest 40% rests with Windows NT .
But This view is conducive to Microsoft which holds about 90% of client side desktop. Microsoft wanted to provide a window centric Internet development platform. Thus It added a few Window specific features in it's Java implementation, similar to what it had do with it ' s C + + IM Plementation. This is along with Microsoft's refusal to support Java RMI, which competed with it floundering, remoting technology called M, resulted A's suite. Microsoft lost the "late" and had to pay USD million to Sun as settlement amount. This antagonist attitude made Microsoft break away from Java and float it ' s own language called C #.
The C # team is carved out of the Microsoft J + + team, and it's effort finally led to the creation of the. NET Framework.
Microsoft intends to leverage it's desktop leadership, to shape the Internet applications development by introducing the. NET Framework. Thus the supported languages map the Windows GUI more closely in it's framework, much similar to C + + MFC and J + + WFC (wind oWS Foundation Classes). In spite of the platform independence Design claims, all the three supported, languages produce Windows. EXE code by defaul T.
Microsoft played the standardization game better than Sun. Microsoft, though being a USA based company proposed the C # an D Common Language Infrastructure (CLI), the back bone to the. NET framework, for Standardization with ECMA (European Computer Manufacturing Association) TC39 Technical Committee in October 2000. Ironically Sun also happens to is a member of this standing committee, which looks after computer languages related Rdization issues. http://www.ecma.ch.
Microsoft has also successfully standardized simple Object Access Protocol (SOAP) through the Consortium (http://www.w3c.org). SOAP is a XML and HTTP based remote object Access protocol. SOAP competes with Java ' s RMI and Microsoft ' s own DCOM. RMI has the limitation of being language specific, and DCOM had, limited acceptability outside the Windows community, this Was, despite the best of Microsoft's effort to port DCOM on Unix platforms.
CORBA, another remoting contender, which even has Internet specific transport namely-IIOP, are more or less dead, due to it ' s vendor non interoperability.
SOAP, by virtue of the HTTP transport can operate easily over firewalls and therefore can easily transident LAN and Internet. However, SOAP being XML based, burdens both client and server for XML parsing, which is relatively CPU intensive, compar Ed to binary protocols like RMI and DCOM.
Java platform views the Internet world as one language running on different operating systems (OS), whereas. NET Framewor K views to the world running in one OS with a programmers has choice of multiple languages. Therefore Java platform interpolates multiple operating systems, and. NET Framework interpolates Multiple.
Apparently from the above discussion market forces are largely responsible for the state-of-the-art rather than ical design considerations. Inside the Common Language RuntimeThe Common Language Runtime (CLR), is the Runtime environment of the. NET Framework, which manages the execution of code a ND provides services.
The Common Language Runtime (CLR), is also proposed for ECMA standard. However, the ECMA documents refer the CLR as Common Language infrastructure (CLI). It has five components namely:
    • Cts-common Type System
    • Cls-common Language Specification
    • Cil-common Intermediate Language
    • Jit-just in Time Compiler
    • Ves-virtual Execution System

Cli-common Language Infrastructure

The Common Language Infrastructure (CLI) provides a Language neutral platform for application development and deployment. CLI supports both Object oriented Paradigm (OOP) as OK as hooks for modeling procedural and structured.
CLI provides languages with a framework for security, garbage collection, exception handling and also provides a platform for language interoperability. For example C # objects can inherit from C + + classes and VB procedures can use the C # components.
Please note that the Microsoft documentations refer CLI as CLR (Common Language Runtime).
After reading through of the ECMA standard documents, like me, your'll probably develop the feeling that CLI are an attempt t O standardize the next generation Java framework for accommodating the older pre Internet era languages like VB and C + +.
The five components of the CLI is briefly described below.

Cts-common Type System

The Common Type System, support both Object oriented programming like Java as as and as procedural languages like ' C '. It deals with two kinds of entities:objects and Values. Values are the familiar atomic types like integers and chars. Objects are self defining entities containing both methods a nd variables.
Objects and Values can be categorized into the following hierarchy:
Types can be of two kinds Value Types and Reference Types. Value Types can further categorized into built-in (for example Integer Types and Float Type) and user defined-like E Num.
Reference type can is divided into three sub categories:self describing Reference Type, pointers and interfaces. Pointers can is sub divided into Function pointers, Managed and unmanaged Types.
Value Types can be converted to Reference Type, and this conversion is called Boxing of Values. De-referencing the Boxed Value Types from the referenced Type is called un-boxing.
Casting rules from A to another, for example conversion of chars to integer types are also defined within the Common Type System.
Common Type System also defines scope and assemblies. An assembly was a configured set of loadable code modules and other together Ty. A scope is a collection of grouped names of different kinds of values or reference types.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.