Download presentation
1
Microsoft.NET Vs Sun JAVA
BY S.Kartikeyan
2
MOTTO Microsoft.NET Software to Connect Information,
People,Systems and Devices Bill Gates JAVA Write Once ,Run Anywhere Bill Joy
3
DESIGN GOAL Classic Application .NET Application Your Application
Windows OS Scanner .NET Framework Internet Devices Monitor Keyboard Mouse Cell Laptop Palmtop (Contd…)
4
Microsoft Operating Systems
Java Applications .NET Applications JVM JVM JVM .NET Framework Microsoft Operating Systems Win2000,WinServer2003, Windows XP Win OS Linux Apple Hard Ware Hard Ware Hard Ware Hardware
5
Why is .NET Microsoft Wanted an alternative to maintain different
libraries being written for VC++,VB,ASP etc. Address Emergence of XML and Web Services Provide Something New Compete with JAVA world by providing free compilers Integrate all this in the next version of Visual Studio
6
Myths About C# ,.NET and Java
Microsoft.NET is a Platform and C# is a language on it just like C is for UNIX.There are many other language on .NET like VB,VC++ When people talk about Java they don’t know whether they mean Java Language or Java Compiler or Java Virtual Machine
7
Different Levels and Terminology
Language Level Distinguishing C# and Java features Compiling level How to locate the libraries and other dependencies Runtime Level CLR Vs JVM and Runtime Libraries At a developer level what are the differences At the Enterprise Level what differences can be noticed Finally what does the End User get out of both Future of both the technologies Managed Exe or Dll means that which are run by Common Language Runtime of .NET(mscoree.dll)
8
Language Level James Gosling
Java is called a better C++ though some of the useful features like operating overloading was removed for no clear reasons C# retains all the good features of C++ including operator overloading Pointers considered the most useful feature and dangerous feature of C++ is completely removed in Java C# has a special block called unsafe{}. You have to use pointers only in these blocks. C# provides all security access levels of the code which Java provides
9
C# switch statement is more matured than Java switch statement
which Java designers call themselves NONSENSE C SWITCH SYNTAX Class files in Java are similar to C# Managed Dlls Jar files in Java which are usually collection of class files such as servlet.jar are somewhat similar to .NET asp_net.dll C# is object and component oriented where as Java is object oriented. To support component oriented programming C# supports adding attributes to types which will be understood by compiler to generate corresponding IL code. C# dll’s or exes (managed) can call COM components and COM components can call C# Dll’s and exec's. That is contrary to Java where it uses a package called beans Example of attributes [STAThread] public static void Main(){} Java applets has no C# equivalent. So writing Java Browser plugins is more easier than C# components ( ActiveX controls)
10
Compiler Level Source Files Libraries C:\winnt\GAC Source Files
Compile Time Libraries C:\jdk\lib CSC JAVAC XYZ.dll Or XYZ.exe XYZ.class
11
Runtime Java Virtual Machine is called java.exe
JVM understands byte codes in class files Runtime libraries exist in JRE directory Running a program or class file is shell:>java.exe xyz Java.exe calls xyz.Main() Applies some permission objects and policy files and runs xyz in a sandbox .NET Virtual Machine is mscoree.dll It is also called common language runtime (CLR) JVM understands MSIL in dlls and executable files Runtime libraries exist in C:\winnt\GAC Running a program is just shell:\>xyz.exe no explicit invocation of CLR CLR calls the xyz.Main() Applies some permission objects and config files and runs xyz in a sandbox
12
Loading of CLR in Managed exe
C# compiler places JMP _CORExeMain in CODE Section mscoree.dll in IDATA section of abc.exe(say) In Unix to know the .so files a exe refers try sh:>ldd /bin/bash You invoke abc.exe from a shell in the case of Managed exe Windows Loader checks the IDATA section and attaches Mscoree.dll to the process address space. Then it fixes the _CORExeMain function address in CODE Section . The _CORExeMain function does the invocation of JITCompiler Which translates MSIL to Native. Native code then executes
13
Loading of CLR in Managed Dll
In the case of Managed dll being loaded at runtime you typically Use LoadLibrary() Method passing the name of the Managed dll file Windows Loader calls the DllMain() function of the Managed dll DllMain() Loads MSCorEE.dll DllMain() of MSCorEE.dll calls _CORDllMain() function _CORDllMain performs all the tasks what _CORExeMain does The _CORDllMain function does the invocation of JITCompiler JITCompiler translates MSIL to Native. Native code then executes
14
Developer Level In Java you have no option than to program in JAVA language In .NET there are some 10 languages as of now ,of which the prominent one is C#. All Language compilers compile their code to MSIL This is possible as all adhere to the Common Type System(CTS) of .NET Visual Studio.NET IDE is better than any JAVA IDE available today It can be possible in JAVA if someone writes a new language compiler in for JVM which translates sources files to JVM compatible class files Users in .NET now has the option of having any language to generate a library and it can be reused from any language
15
Enterprise Level Presentation Tier (ASP.NET Vs JSP) Middle Tier
( Web Services, DCOM Vs Web Services and Beans) ADO.NET JDBC Database Tier(SQL Server Vs ____)
16
End User Level Microsoft.NET Passport is one of the services end-users
are getting advantage as of now More are expected to come
17
Future and Marketing Elements
Microsoft has good Marketing expertise than SUN Visual Studio.NET IDE is an added advantage to Microsoft Java world has to wait for such an IDE Microsoft is spending a lot of money in .Net R&D On the other hand IBM is spending 10 times more than SUN to promote JAVA . The support for XML in Microsoft.Net is Fundamental where is in JAVA it is an API based As Microsoft.Net and Java support XML Web Services ,developers has the choice of either platforms
18
Thank You
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.