|
Microsoft’s
.NET initiative aims to grab the hearts and minds of developers,
where it competes directly with Sun’s Java 2 Enterprise Edition
(J2EE). Developers working in the Microsoft world have welcomed
many of the changes brought about by the .NET framework. Prashant
L Rao finds that J2EE still scores in stability though .NET
is believed to lead on performance
A
line has been drawn in the sand and developers are being hustled
into two camps. On one side lies the Java camp where Sun and
its partners-in-JavaIBM, Oracle, BEA...practically every
software major except Microsoftare making their stand.
On the other shore is Microsoft with .NET. What does .NET
mean for developers and how does Microsoft intend to win them
over?
Just what is .NET?
It is a riddle wrapped in a mystery inside an enigma. When
Sir Winston Churchill made the above statement in a radio
broadcast, he was referring to Russia. However, the same statement
aptly fits .NET in terms of the confusion in peoples
minds regarding its true nature. Microsoft admits it jumped
the gun with .NET. For a while, everything coming out of Redmond
had a .NET sticker on it, whether or not it really fit into
Microsofts master plan to change the face of Windows
development and come out with a platform that would give J2EE
a run for its money. Today, the worlds largest software
vendor has finally got its act together and is very clear
that .NET will be its middleware, its development platform
for software developers writing business applications.
Common Language Runtime (CLR)Microsofts JVM
The .NET framework is a software layer to which developers
will write Windows applications, says Dilip Mistry,
.NET and developer evangelism director at Microsoft India.
As the framework is a huge piece of software, weighing in
at 21 MB, Microsoft is taking two routes to get it onto the
desktop. Initially, developers will ship the .NET framework
with their applications. Eventually, the framework will be
bundled with Windows.
Microsoft has taken a page out of Suns book, the Common
Language Runtime (CLR)a layer of software that sits
between an application and the OS/hardware is Microsofts
equivalent of Suns JVM (Java Virtual Machine, the runtime
middleware for Java).
A platform for business applications
There are no pointers in CLRwhich means that coders
writing OSs, office suites, games or even ERP applications
like SAP R/3 wont have much use for .NET. It will be
corporate IT departments, independent software vendors (ISVs)
and systems integrators (SIs) writing business applications
who stand to benefit from the framework. From now on, Windows
developers writing business applications will be writing to
the CLR and not to the OS. This wont apply to game developers
or mainstream application developers (office suites, ERP etc)
who will have to rely on DirectX, Open GL and programming
constructs such as pointers that bypass the CLR offering better
performance. For custom applications, CLR will make development
easier and more standardised across languages.
 |
| Dilip
Mistry says that Indian ISVs can be leaders and Microsoft
wants to give them the conviction and confidence to bid
for large enterprise projects on its technology |
.NET
in India
Microsoft has a .NET centre in Bangalore where it helps ISVs
port and stress-test their applications. It also undertakes
what Mistry calls deep developer training. Mistry
has a team of 18 evangelists, a majority of who are based
in Bangalore. Mistry says, Indian ISVs can be leaders.
We want to give them the conviction and confidence to bid
for large enterprise projects on Microsoft technology.
Ten Indian companies have dedicated CoEs (Centres of Excellence)
for .NET. Some software majors working on .NET are TCS, Wipro,
Satyam and Infy.
Microsoft India is aggressively wooing the big software housesInfosys,
Wipro and company. Bill Gatess visit to Bangalore recently
was just one more round in this dance. The company, however,
runs the risk of alienating its traditional partners in the
process. Industry pundits believe that the traditional Microsoft
camp might well start flirting with Java now that Microsoft
is going after the Tier 1 crowd. The big software players
will not choose between J2EE and .NET, they will work with
both platforms.
Mistry and his team kicked off their efforts in January 2001.
In the first wave, 18 companies created products and solutions
on .NET using Visual Studio.NET. 40 .NET projects have
been undertaken since the launch of Visual Studio.NET in Feb
2002, says Mistry. 40 percent of VB/VC programmers in
India are using VS.NET. However, 80 percent of the applications
created using VS.NET are still vanilla Windows applications
that dont make use of the .NET framework. Still, the
fact that over 5,000 Indian developers are registered on experience.Net,
a website set up by Mistrys team, is proof enough that
.NET is gaining momentum in the country. Mistrys team
has distributed 150,000 CD-ROMs with .NET SDKs on them in
the last two years.
Developers take
Karthikeyan E S, senior project manager at Aditi says, .NET
has classes for certain things that had to be written from
scratch earlierfor instance, to serialise and push a
component across the wire used to be a tough job. Now anybody
can serialise and persist objects. SQL Server has new classes
(adapters) that are better than OLE DB (the old way). Webforms
is a decent concept, there is a mechanism for creating a Web
Service, in security you now have scenario-based permissions.
Earlier you couldnt write a NT service in VB, you can
do that in VB.NET. The key disadvantage he feels is,
There is a lot of unlearning to do when you move from
Visual Basic to Visual Basic.NET. In VB.NET all the declarations
have changed. To rewrite existing VB code, a lot of rework
is involved.
Aditi has created PowerPortal, a product suite that lets you
do all organisational activities, including commerce and document
management through a single portal product, using .NET technologies
like Sharepoint, BizTalk, Exchange, VB.NET and WinForms.
Clarence Xavier, product manager, e-Banking at Logica says,
Earlier you had different tools from Microsoft for Internet
application developmentVisual Basic, Visual C++. In
.NET you have one single tool that lets you develop in any
language that .NET supports. You can move from one tool to
another without cross training. Earlier you had to modify
your content to suit each mobile device, now using mobile
controls this problem has been eliminated to a large extent.
If a new handset comes out, we have to create a configuration
file and the product works on it. In Visual Basic you couldnt
access the Windows APIs directly though it was possible in
VC++. In .NETs CLR, there are common libraries for both
languages. Its just a question of whether you need more
VB or VC++ programmers for a given job. In our case, it was
easy to make a Web service and transform our product, QA into
QA.NETan extension of QA for Internet banking. We have
exploited Web Services for offering features such as a loan
calculator that lets a customer use an Excel sheet and do
What if analysis, where this Web Service gets
information from the banks server for the loan period
and amount. Web Services in VB.NET exposes methods that a
client application such as Excel can call the application.
It
is very difficult to provide standard features to a bank,
so we put the business logic in a script file. This allows
users to change the business logic, doing away with the need
of having multiple versions of the same product. We decided
to have some script files written in VBScript for this purpose.
However, the MS Scripting engine can run other scripting languages
(JavaScript, JSP).
QA.NET will make use of this feature. The script file calls
the API, the business process flow is in VBScriptnow
you can mix and match other scripting languages, adds
Xavier.
Alerts are another new feature in .NET. If a customer
gives a standing instruction, you would like to be informed
if a cheque bounces or has been deposited. Earlier, an e-mail
would be sent when the core banking system informed the application
of the need to do so. E-mail is not the best way to communicate,
particularly if a customer is on the move. The other way is
to send a SMS. We decided to use .NET alertsthe service
provider knows how to reach the customer. Our application
takes to the service providers server using .NET APIs.
Tomorrow, if a new medium becomes popular, say wireless PDAs,
we dont have to worry, Xavier further adds.
On the downside, converting applications from VB to VB.NET
is no joke. You need a tool that will let you convert
code. Microsoft has provided a tool but we had difficulties
using it, there were a lot of problems getting it up and running
in the first place. There are still areas where a manual job
is required. When you have a massive product its a serious
issue to consider. You need to go through the whole file,
as one small file can bring down the product, said Xavier.
Similarly, while porting ASP code to ASP.NET, To make
use of the new features of ASP.NET, changes are required.
There is no tool for automating this process, complete manual
conversion has to be done. To what extent do you want to change
your code on the front-end? Thats the question development
heads will need to answer, says Xavier.
In massive projects with millions of lines of code this kind
of porting becomes very difficult. QA, for instance, has 750,000
lines of code.
In terms of scalability, .NET still lags J2EE. There
are ways to achieve persistence, but you lose out on scalability
in .NETnot in EJB. This is especially true of horizontal
Web farms. If a persistent objects on machine A needs to be
replicated on other machines, it is possible at some cost.
However, programming needs to be done and this could lead
to the introduction of bugs. The ability to replicate persistent
objects should be part of underlying infrastructure,
believes Xavier.
The question remainshow many people will use other languages
(other than VB, VC and C#) in VS.NET?
Microsoft intends to bring IIS (its Web server) into the kernel
in Windows.NET. Already IIS can choke the CPU even when it
runs as a service, and the most common solution is to reboot
the server. It has become commonplace for Microsoft to put
everything in the middleware or kernel. This does pay off
in improved performance but comes at the cost of stability.
Hardware is cheap and you can throw it at your application
but if the application crashes it doesnt matter that
it was running 25 percent faster a moment before.
Will
.NET succeed?
Gartner believes that both .NET and J2EE will get roughly
40 percent of the developer community behind them in the next
few years. There is no doubt that .NET will succeed. However,
there is a big question mark regarding its use in the development
of mission-critical applications. While .NET is reportedly
faster than J2EE, J2EE scores on stability.
| Windows.NET—what’s
new for developers |
|
Windows.NET
will be the next server release from Microsoft. Here
are a few features that are expected to debut in this
OS:
-
Larger memory supportmemory block move and copy
will improve performance.
-
Application domainapplications are protected
from each other.
-
Common Language Runtimewill be bundled with
the OS.
-
IIS (Microsofts Web server software) moves into
the kernelthis will improve performance but
the chances of IIS bringing the server down will rise.
|
| Why
.NET? |
|
Daniel
Ingitaraj, senior marketing manager at Microsoft India
says, Class libraries are the same across languages.
Earlier, ADO was always connectedit assumed the
existence of a LAN. ADO.NET assumes a disconnected world
(dial-up Internet).
Once you use pointers, you are out of .NET. C#
marks pointer code as unsafe, adds Ingitaraj.
ASP was traditionally easy to write but difficult
to manage. There was no concept of reusing code, no
Object-Oriented features, no caching. In ASP.NET there
is a new file extension.aspx. On the first run,
the aspx is compiled and stored for future usea
DLL is created. If there is a change in the aspx source
file, the CLR recompiles it, says Ingitaraj.
Another advantage is that metadata regarding versioning,
security and dependencies (a DLL may need other DLLs)
is stored within the DLL/EXE. This makes managing software
code easier and avoids the so-called DLL hell
where conflicting versions of the same DLL cause problems.
From a developers perspective, in .NET theres
not much difference in writing for the Web or for Windows,
adds Ingitraj. The CLR can tailor the presentation of
the application depending upon the target devicebe
it a PC, a PDA or a cellphone. 75 devices, including
Palm PDAs, are supported.
Microsoft gives developers two options of creating applications
on .NETASP.NET is for Web developers and WinForms
for creating Windows UI-based executables.
Applications developed using .NET are smaller
and faster, states Microsoft Indias evangelism
director, Dilip Mistry. The advantages that a developer
gains by using .NET are:
-
Compiled codeUnlike ASP, Microsofts popular
technology for creating dynamic websites, ASP.NET
offers compiled code with the advantages of improved
performance (compiled code is faster than interpreted
code, plus compiled objects are cached in ASP.NET).
-
Maintaining state across machinesEarlier only
Java developers using J2EE could maintain state across
servers. Today, .NET offers the same feature. This
is important in a clustered environment.
-
Support for more languagesOther than the Microsoft
languagesVB, VC, C#, JScript.NET has compilers
for everything from Perl to COBOL.
-
A better programming modelEarlier, in ASP, the
HTML and code were mixed up making it very tough to
modify or maintain Web applications. In ASP.NET the
code is separated from the HTML.
-
The new version of MTS (Microsoft Transaction Server)
supports multiple nested levels of transaction capabilitiesfunds
transfer; debit a/c first & then credit other
a/c. There were limits in the older version of MTS.
In .NET you can rollback or commit multiple transactions
as a batch.
|
|