C# .NET - Plz tell me - Asked By suresh kotte on 31-Oct-11 01:51 PM

which is the best programming dotnet or java?, and what is the more secured? both of this(java dotnet) which is the best?
smr replied to suresh kotte on 31-Oct-11 01:57 PM
HI

Both are good to learn programming, in my sense.

here are some differences:

Differences between .Net and Java include
  • Java is from Sun, .Net is from Microsoft
  • Java is a language plus a runtime, .Net is a runtime framework that supports multiple languages, Visual Basic and C# (the .Net language most similar to Java) among them.
  • C# is very similar to Java but a few years younger, and a bit nicer in some respects - it has a slightly simpler syntax for some common constructs.
  • Java is more platform independent, it runs on several operating systems including Windows, Mac and Linux. .Net is primarily for Windows. Although the open source project Mono is developing a multi-platform runtime for .Net, so this is less of an issue than it used to be.
  • .Net has a more integrated development environment, as the IDE, runtime and server all come from Microsoft as a standard package, while Java is based on third-party tool and server providers. It used to be the case that the .Net development environment was clearly superior, but the difference is smaller these days.
  • It can be argued that Java gives more flexibility, as there are more server- and IDE-providers to choose from, at the cost of some extra overhead for the developer to get the different pieces to work together.

refer links also
http://www.online-brain.com/blogs/java_dotnet
http://www.informit.com/guides/content.aspx?g=dotnet&seqNum=102
http://www.veridicus.com/tummy/programming/java_vs_csharp.asp
Read more: http://wiki.answers.com/Q/What_is_the_difference_between_.Net_and_Java#ixzz1cNpC6aWA
Devil Scorpio replied to suresh kotte on 31-Oct-11 02:25 PM
Hi,

Java is a programming language while .NET is a runtime environment. Java is a specific programming language. It's advantages are that most every browser out there supports the Java Virtual Machine and you can write platform independent code since Windows, Apple, Linux, Unix all have JVMs for their environments. Very extensible and allows for the widest range of audiences. 

.Net is the framework for many different languages - including some very odd Java.Net implementations. If you're specific about any language that would be best suited to develop using the .Net framework - then you might consider C# being that language. C# is very very similar to Java syntactically and in how the language loads itself into its own managed/virtual machine environment. Considering that one of the chief people involved with Java at Sun eventually moved to Microsoft to be a primary architect of C#, this isnt surprising (I worked with these guys when I was with Visual Studio from 1998 thru to 2005). 

.Net doesn't have the portability of Java - Unix and Linux from my most recent knowledge dont support .Net, and I dont believe an implementation of the framework ever got past Beta for Apple OS. Even within Microsoft, some of the divisions (Office being the primary one) wouldn't adopt .Net for product development simply because of the migration and performance issues that would affect their products. Vista was supposed to be the OS that was fully .Net integrated, but they dropped that when they dropped the WinFS - it would have taken way too long to work out all the issues with this. 

.Net does have advantages - you can write in whatever language you want as long as it compiles to the Intermediate Language and it will be able to work with everyone else's components regardless of their language of choice. It will even work with Java as long as it's compiled to IL. .Net does a just in time compile/link that happens on first instance of execution, so there's a very noticeable performance hit there, but each time after it will run just like a native program since the exe will exist - the only perf hit from then on will be initializing all the objects in the managed stack/heap which at times can be significant. 

So as someone above mentions - if your company has a mandate thru some MSFT partnership or funding to be a .Net shop, then you're .Net no matter what. As a developer - most of the development environments have identical feature sets that make coding fairly easy so toolset wise there's no real difference between any language paradigm anymore. I've worked in both sets of environments and apart from differences in libraries and declarations I find both to be equally effective from my perspective.

Jitendra Faye replied to suresh kotte on 01-Nov-11 12:01 AM

Here are some major differences between Java and .Net from some website

1.Conceptual Difference

Conceptually, Java is two things: the Java platform (runtime and APIs), and the Java language.
The purpose of the Java platform is to support applications written in the Java language and
compiled to Java bytecode. The ideal of Java has always been a single language on multiple platforms.

.NET also is two things: the .NET Framework (runtime and APIs), and the plethora of supported
programming languages. The purpose of the NET Framework is to support applications written
in any language and compiled to MSIL. The goal of .NET is a single platform shared by multiple language

2.Multi-language

The most obvious difference between the two platforms is the language. If you're writing
to the Java platform, you're writing code in Java.

.NET applications, on the other hand, can be written in any language that supports .NET.
The .NET Framework SDK ships with three languages: C#, Visual Basic .NET, and Jscript .NET.
Third party languages include COBOL, Eiffel, Perl, Python, Pascal, and many others.
There currently are over 20 languages that support .NET. And because they all target the
Common Language Runtime, programs written in any of these languages can access objects
created by any of the other languages.

Hope this will help you.