..Computers Today

 

Home

May 16-31, 2001                                                                    MASTER FILE 


Computers Today, May 16-31, 2001

Master File
Country Buzz
Chief Guest
Front End
Hands On
Telecom
The Net
Networking
Marvels
Tech Trends
Read Right
Columns
Circuit

Search

Previous Issue

Computers Today, May 1-15, 2001

CHANNELS

Politics
Business
The Arts
People
About Us
What's New

 

 


MASTER FILE
Can C# Match Java?

Microsoft is projecting its new, proprietary, Java-like programming language, C#, as Java-killer. On the blackboard, the beta-version language looks feature-perfect -a giant step forward on C/C++, and easy on developers' terms. But are programmers shifting from Java to C#? Brace yourself for the next big war.

By K. Jayadev

Microsoft, it seems, has finally found its thunder. Not through court settlements or marketing battles, but through technical expertise. As a lawsuit-free remedy to the technical requirements for the company's Java-thirsty potential audience, Microsoft has released (Beta version only) its new language called C# (read 'see sharp'). And, as customary, has mobilised its PR machinery into full gear to apprise the market about the uniqueness of C#, "which runs on any device" and by Microsoft's open standards is considered to be "open".

Turbo-charging the C
How to Install and Compile C#

Last fortnight Orlando Ayala, Microsoft vice president for worldwide sales, during his whistle-stop tour of the country, spoke solely about C# and the .Net platforms, and the immediate result was the training leader NIIT Ltd calling C# the 'Technology of the Year'. But will it have the same result on the developers' community? Does this mean Java is turning obsolete? Are programmers already shifting from Java to C#?

The MS Gameplan

It's too premature to write off Java. C# is yet to evolve into a language that is adopted and taken up by the developers' community. But the hype that Microsoft is creating around its new language is worth taking note of. Microsoft launched the new Java-like software programming language to an industry standards group, hoping to succeed where rival and Java creator Sun Microsystems has failed. But the response at the moment is: "It is a riposte to Java."

C# is not a Java clone. We're building a platform that actually allows you to implement multiple programming languages and have them share a common set of APIs."
Anders Hejlsberg
Chief Designer of the C# programming language

If not capturing the entire chunk of the Java community, Microsoft hopes its new language will at least stanch the tide in that direction from C and C++, traditional strongholds of Microsoft with its Visual C and Visual C++ products. But matching Java will not prompt any shift in programmer ranks. Evan Quinn, former Java analyst at IDC, says, "If you're only an equivalent, you are both not ahead of Java and you're five years too late."

Sun Microsystems' Java, a programming language that has long been considered a threat to Microsoft, has already been endorsed by IBM, Oracle and dozens of others and is compatible with all types of computers and operating systems. Now, Microsoft is hoping to spread C# usage by enticing other technology vendors to create versions of C# that will run on multiple OSs and hardware.

Although the claim is made that C# would run on various devices and OSs, Swapan Datta, head of Sun Microsystems India Pvt. Ltd's education services, contends, "C# code is very similar to Java. What's missing, however, is the cross-platform capability of Java. C#/.Net runs only on Microsoft's Windows-based systems, while the Java Platform runs on Windows, Unix, Linux, Apple and IBM OSs, and dozens of other systems used by cell phones, PDAs and other client devices."

In spite of Java adaptability being very high, what prompted Microsoft to come out with C#? Especially, considering the fact that the company accepted Java and launched its own product called Visual J++, which helps programmers to write applications on the Java language, that could run on any Microsoft platform.

Answers Daniel Ingitaraj, marketing manager of Microsoft Corp. India Pvt. Ltd, "Everybody is aware of Sun's failed efforts to turn Java over to an industry standards body for fear of losing full control of the language they created. They instead chose to create a 'Java Community Process' that allows Java supporters to change and update the technology as needed. Our approach with C# is totally different. In developing C#, we have tried to address the needs of a certain class of developers who want simplicity and power in a managed environment. Additionally, we have tried to rectify what we perceive as some shortcomings in other modern languages in the design of C#. For instance, C# deals with problems like versioning and platform integration in elegant and innovative ways. Java was also based on C and C++, but made a series of tradeoffs that we believe may not be appropriate when developers are seeking maximum performance, functionality and integration."

Turbo-charging the C

"With C#, we were able to start with a clean sheet of paper. We did not have any backward compatibility requirements, and that certainly made things simpler. And not just from an implementation standpoint, but also from a usage standpoint," says Anders "Turbo Pascal, Delphi, C#" Hejlsberg, chief designer of the C# programming language, and a key participant in the development of the .Net Framework.

"One of our key design goals was to make the C# language component-oriented, to add to the language itself all of the concepts that you need when you write components. The work that we've done with attributes-a feature used to add typed, extensible metadata to any object-is completely new. And C# is the first language to incorporate XML comment tags that can be used by the compiler to generate readable documentation directly from source code," he explains. Hejlsberg once was one of Borland's top-notch programmers (he even was on the "Turbo Pascal" 1.0 design team). Then Microsoft lured him away.

Hejlsberg joined Microsoft in 1996 and was promoted in 1999 to distinguished engineer, a title held by only 16 people at the Redmond software firm. Before his work on C# and the .Net Framework, Hejlsberg was an architect for the Visual J++ development system and the Windows Foundation Classes. Hejlsberg currently works on COM+ and Visual Studio 7. In Borland International, as principal engineer, he was the original author of Turbo Pascal, the ground-breaking development environment of the early 1980s, and chief architect of its successor, Delphi. Hejlsberg studied engineering at the Technical University of Denmark.

Evolution of C#

Despite Java being around for over seven years and taking five years to get accepted, a group of Microsoft geniuses banded together to form a proprietary, Java-like programming language. Though analysts call the move to be an attack on Sun, Microsoft terms this to be a need, which it thought to be addressed. Although it has many Java-like qualities, Microsoft executives say C# is not the firm's response to Java. But they also mention that it's impossible not to compare the two languages.

Complicating the feud between Microsoft and Sun Microsystems is a long-standing court battle over Microsoft's use of Java. Sun sued Microsoft in 1997, arguing that Microsoft made changes into Java's original code, which led developers to build Java software programs that operate only within Windows environment, hampering Java's goal of 'write once, run anywhere' program. Due to the long pending lawsuit with Sun over Java, Microsoft has not been able to update its Java products, the company claims.

But now it decided to answer and, in fact, silence its opponents and everybody else by this new language, which is a hybrid of C and C++, two of the most popular programming languages used by software developers to write applications for Windows. C# will offer features available in Java but not available in C or C++. These include better security and "garbage collection", which tidies up computer memory used in a program, Microsoft executives said. Garbage collection is one of Java's most popular features because it can greatly reduce the complexity of software development.

For the past two decades, C and C++ have been the most widely used languages for developing commercial and business software. While both languages provide the programmer with a tremendous amount of fine-grained control, this flexibility comes at a cost to productivity. Compared with a language such as Microsoft Visual Basic, equivalent C and C++ applications often take longer to develop. Due to the complexity and long cycle times associated with these languages, most of the C and C++ programmers have been searching for a language offering better balance between power and productivity. There are a number of languages today that raise productivity by sacrificing the flexibility that C and C++ programmers often require. Such solutions constrain the developer too much (for example, by omitting a mechanism for low-level code control) and provide least-common-denominator capabilities.

They don't easily interoperate with existing systems, and mesh well with current Web programming practices. The ideal solution for C and C++ programmers would be rapid development combined with the power to access all the functionality of the underlying platform. They want an environment that is completely in sync with emerging Web standards and one that provides easy integration with existing apps. Additionally, C and C++ developers would like the ability to code at a low level when and if the need arises.

C# is very similar to Java. What's missing, however, is the cross-platform capability of Java."
"Microsoft is finally waking up to the fact that computing has moved onto the network and is no longer based on the desktop."

Swapan Datta
Head, Education Services, Sun Microsystems India Pvt. Ltd

"The Microsoft solution to this problem is C#, a modern, object-oriented language that enables programmers to quickly build a wide range of applications for the new .Net platform, which provides tools and services that fully exploit both computing and communications needs," says Ingitaraj.

"What do people mean when they say Java? Do they mean Java, the language; Java, the syntax; or do they mean Java, the platform? People lump these different aspects together. We've taken an approach that says we want to be a multilingual platform," queries Andres Hejlsberg, the chief designer of C#. "We're going to build a platform that actually allows you to implement multiple programming languages and also have them share a common set of APIs (application programming interfaces). But we're not trying to tell you to forget everything you ever did. We're not saying, 'Now that there's only one language, there shall be no further innovations in this race.' We're saying that our industry advances by its flexibility. We want to build a platform where your preference for one language over another doesn't negate the whole value proposition. We want to create a platform where there can be innovation," says the Microsoft scientist. C# will be available as part of Microsoft's Visual Studio .Net suite of development tools later this year.

The announcement of C# raises another issue: Will Microsoft discontinue Visual J++, its own Java development tool? Microsoft has not updated the tool for many months due to the ongoing legal battle with Sun. C# technical documents posted to Microsoft's Web site today do not list Visual J++ as part of its Visual Studio development tool package. "Their JUMP (Java User Migration Path to .Net) programme certainly seems to signal that they are abandoning J++," points out Datta of Sun.

Microsoft has recently announced the JUMP to .Net, a set of independently developed technologies and service offerings that enables programmers to preserve, enhance and migrate Java language projects on to the Microsoft .Net Platform. "JUMP to .Net enables Microsoft Visual J++ customers and other programmers who use the Java language to take advantage of existing skills and code investments while fully exploiting the Microsoft platform today and into the future," Ingitaraj said while explaining the functions of JUMP.

War on the Desktop

"Developers now basically have two choices for network application and service development and deployment: the Java Platform and C#/.Net. The latter will not be completed for another two years, according to Microsoft, while the Java technology provides a complete, end-to-end Web services development platform which is already in use today. But even when C#/.Net is complete, it will still be an essentially closed and proprietary system that will always try to lock customers in to their offerings. Java uses open APIs and open standards developed by a community of major industry companies like IBM, Hewlett-Packard, Oracle, Compaq and Cisco," observes Datta of Sun.

The kind of impact and the acceptance levels that Java has been able to build is clearly evident by the number of programmers (estimates say 2.5 million developers are using Java worldwide) working on this language and platform. The number of applications that have emerged through this language is mind-boggling and has penetrated to every level of computing, including wireless and mobile phones (remember the launch of Java phones in Japan). Can C# create this level of acceptance among the user community? Later, says Microsoft. Now, it's busy pushing the language as the key component of its .Net platform.

Talking about the positioning of C# against Java, Ingitaraj says, "The new Web economy-where competitors are just one click away-is forcing businesses to respond to competitive threats faster than ever before. Developers are called upon to shorten cycle times and produce incremental revisions of a program, rather than a single monumental version. C# is designed with these considerations in mind. The language is designed to help developers do more with fewer lines of code and fewer opportunities for error. C# is closer to C++. A lot of Java, too, has close ties with C++, but if you look at its model, there were some parts removed. C# sacrifices fewer things. It is also the first language to introduce component-oriented properties and methods and events."

Interoperability is another key point, which Microsoft is trying to bank upon. Though Java is platform-independent (meaning that Java software can run on any hardware or operating system), Microsoft is talking about leveraging existing software. It claims to be providing greater interoperability (with existing C++ code, for example) without having to write "glue" code.

Replying to Microsoft's stress on leveraging the existing systems using C# (which is not possible on Java), Datta says, "We will have to look at this in two ways: First, the network is made up of a multitude of different system types. We know Microsoft doesn't care about running on different systems; they've always tried to make their market homogeneous rather than heterogeneous. The network, however, is by its very nature heterogeneous and that's why developers have found it better to use Java for building networked applications and services. Second, the Java technology has done a good job of connecting existing applications and data with new network-based applications. Java is by far the primary platform for application server systems, such as IBM's WebSphere, BEA and iPlanet. These application servers link pre-existing, legacy applications and their associated data with new Web services applications. That's one of the reasons why the use of J2EE skyrocketed last year. So, Java can do both things: integrate pre-existing applications and data, as well as run on different systems."

But Microsoft feels that there is a need to make lots of revisions to the code, which will lead to a change in the semantics of the existing programme. And C# includes versioning support in the language. "For example, method overriding must be explicit; it cannot happen inadvertently as in C++ or Java. This helps prevent coding errors and preserve versioning flexibility. A related feature is the native support for interfaces and interface inheritance. These features enable complex frameworks to be developed and evolved over time. A big difference between the two is also that C# right from the drawing board was targeted at the Net applications world. If you look at Java, Web services are an afterthought," points out Ingitaraj.

Sun appears to be least bothered about these aspects. It feels that the software community worldwide has understood Java's potential and its usage will continue to grow despite all the hype around C#. Quips Datta, "Microsoft is finally waking up to the fact that computing has moved onto the network and is no longer based on the desktop. They are scrambling to offer software that supports the new model. The fact that they are trying to make their offering look like Java must mean that they feel Java is worth emulating. I don't know if that's an attack or an imitation. We don't care. We are focussed on continuing to expand the capabilities of the Java technology."

Contd...

 

India Today Group Online

Top

Issue Contents    Write to us   Subscriptions  Syndication

INDIA TODAY | BUSINESS TODAY | INDIA TODAY PLUS
TEENS TODAY | THE NEWSPAPER TODAY | MUSIC TODAY | ART TODAY
SYNDICATIONS TODAY
| CARE TODAY

© Living Media India Ltd

Back Forward