Why .NET is a Framework and Java is a Language [closed]
Asked Answered
K

4

12

Ok. It's not a battle. I'm curious about the concept of framework, I worked with some frameworks like django, zend, rails and cakephp in various levels.

Today a friend of mine sent me a presentation where he listed .NET as a framework, no big surprise I've discussed about .NET framework and I know the basic concept behind it, and from my limit point of view in the .NET technology it seems fair to say it's a framework.

But then it hit me? Why is Java a Language and .NET is a Framework, the more I read the more I get confused, Both Java and .NET have SDKs, is it because java runs on a VM? Is it because .NET supports multiple programming languages? What is the big difference I'm missing here?

Kielce answered 17/11, 2011 at 20:33 Comment(2)
It's true that Java is a language. So it C#. VB too. Among many, many others.Hogan
This is actually a really intriguing question I hadn't thought about before. Where do you draw the line between what's a framework and what's a language?Flummery
B
25

Java is both a language and a framework, both tied together and given one name.

.NET is a platform that has many languages that use it - C#, VB.NET, F# and many more.

The difference is one of naming and semantics, no more.

Boohoo answered 17/11, 2011 at 20:35 Comment(2)
You can use the Java framework / class libraries with languages other than Java. (there are many languages written for the JVM)Geny
+1 Java is a framework & language. Thank you, I didn't know this.(thought that Java is only as a programming language) Then how can I differentiate between framework and platform (in terms of S/W Engineering) Is there any link you can share with me?Bahrain
S
4

Java is to the JVM as C# is to .NET. It is unfortunate that Sun named their virtual machine 'Java Virtual Machine', because it is used less and less by actual Java programs. It is the JVM and the huge set of standard class libraries for it that constitutes the platform. Java is merely a programming language for it; it has competitors such as Groovy, Scala, JRuby, Clojure etc, like .NET has F#, the newest VB, etc.

Searcy answered 17/11, 2011 at 20:37 Comment(3)
No, Java is to the JVM as C# is to the CLR. The CLR is not the same thing as ".NET".Geny
Agreed that the virtual machine is CLR, and not .NET. The problem is that ".NET" is explicitly the name for both the VM and the entire platform (and the whole change of philosophy in the entire Windows development space that accompanied it), while "Java" was and is primarily the name of a programming language - so there is really no accurate equivalent of the term ".NET".Searcy
So twitter runs on "a" JVM using scala?Kielce
A
4
  • .net is a framework because it provides functionality around your code : for instance when you do webforms you don't have to code everything from the reception of the http request to the writing of the html, it's the same for web services and webforms, it's around your code.

  • In java (java alone) you got nothing only a language, you can compile execute your program, but you'll have to handle everything in your software lifetime (desktop or c/s), if you use Java EE or Swing, then you'll have a framework.

The confusion is from the fact that they both impose their framework (MS more than Sun), so the couple language-framework is really strong (even if you can split them and use something else). But they promote a different part of the couple , the framework for MS, the language for Sun.

Actor answered 18/11, 2011 at 16:30 Comment(0)
P
2

C#, VB, J#, etc are the languages in Visual Studio. .NET is a framework of code that provides a rich set of functionality for you to pull from off the bat.

Playtime answered 17/11, 2011 at 20:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.