C# or Java for desktop applications?

I always hear how great .NET and Blazor are, but I'm already a web developer and I couldn't care less. I want to do something else.
If I want a web app I use things like React, Next, Node, PHP etc.

But now it is only for desktop applications with or without an interface, Java probably has a lot more uses, is more popular => more jobs for me, many different areas, more resources to learn and is also more platform independent than C#.

As far as I know, Microsoft tried to limit it to Windows only.

Java is not much slower than C#, at least that's what it says on the internet.

Java is translated into bytecode, and C# into CLR. C++, on the other hand, is machine code and performs best if you omit assembly stuff.

Java or Kotlin is the standard in Android development (but you could also use React Native and I don't have an Android smartphone anyway)

I also don't like who owns these languages, Microsoft and Oracle. It doesn't really matter to me, but it could turn out badly.

I also heard something about Oracle causing problems for companies. I assume the Java JDK is free and an SE costs money? I just read that somewhere; I don't know if it's true.

Theoretically you could make smaller games better with C# but that's not for me and if so I would just learn C++.

(1 votes)
Loading...

Similar Posts

Subscribe
Notify of
7 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
regex9
1 year ago

Now it is so (…) the Java probably has significantly more use, is more popular => more jobs for me, many different areas

C# has also spread in many different areas. C# developers are much in demand and there is a big community. Accordingly, there are also numerous learning materials or prefabricated libraries. C#/.NET is not niche technology.

As far as I know microsoft tried to limit it to windows only.

This restriction applies only to the old .NET framework. The new implementation that was launched a few years ago also supports the development for other platforms (Linux, macOS, etc.).

(…) and C# in CLR.

No, in CIL. The CLR is the runtime environment that runs the CIL.

C++, on the other hand, would be in machine code and if you leave assembly equipment the most powerful.

There is also the possibility to compile ahead-of-time tools for both Java and C#. This also means that you have to accept a few limitations. The advantages of JIT compilation are eliminated. Something like the dynamic loading of code or reflection (at Java) is not supported.

However, this should be only an edge information.

The question of Best performance is not so important in this selection. The underlying tools are quite optimised and very powerful. This is also a reason why C# and Java are often used for the development of complex systems (e.g. enterprise applications). The decision which is more likely to be chosen is more influenced by other indicators (such as available skills or existing interfaces).

I also don’t like who these languages belong microsoft and oracle.

.NET is an open source project where everyone can participate. I see Microsoft as a patron behind it. The company has the necessary resources to continuously develop and strengthen C#/.NET on the market. This already starts with your own applications/systems being equipped with interfaces for .NET.

In Java it is indeed a bit more special, because Oracle’s main focus is more on its databases. Nevertheless, it should be borne in mind that there are many other parties (such as Apache, IBM or the Eclipse Foundation) that carry the project. The release cycle that has been shortened since 2017 has also done quite well.

I’ve got something to do with the Oracle company…

Over the past decade, Oracle had a number of lengthy legal disputes with various companies (e.g. Google, Hewlett Packard Enterprise, Rimini Street), where they have more often drawn the shorter. The guided processes against Google concerned their use of Java APIs for Android OS.

(…) I assume Java Jdk is free and a SE costs?

A JDK represents the concrete implementation of Java SE. The latter term refers to the compendium of the Java standard APIs.

There are JDK builds from various companies/organisations. There would be, for example, Adoptium, Amazon Corretto, Azul, Liberica or the Oracle JDK. They all have in common that they are based on the same source (OpenJDK). The differences are excellent in additional tools (e.g. for program analysis) or services (support for specific platforms, faster bug fixes, etc.) by the providers. While the JDKs themselves are usually available for free, the extra support services are usually not.

With c# you could theoretically make better smaller games (…)

I don’t know exactly what you understand under smaller games. There are a lot of game projects that have been implemented with C# and go far beyond a mini game character à la Tetris or Snake (e.g. Cuphead, Escape From Tarkov, GTFO, Stardew Valley, Subnautica).

C# or Java for desktop applications?

In itself, C# and Java are not badly positioned when it comes to developing desktop applications with a graphical interface. Regarding Java, JavaFX would be the best toolkit choice, based on C# either WPF, Avalonia UI or MAUI.

Personally, however, I would tend to C# for the following reasons:

  • You have more flexibility/adjustment options for existing components
  • Bindings can be set in the view instead of in the C# code
  • Creating WPF/MAUI applications is easier – be it at the start of the project (applying a new project) or the later release build. Visual Studio offers generally helpful tools for the development phase.
  • To a toolkit like WPF you will find significantly more learning material/article/like than JavaFX.
orochi02
1 year ago
Reply to  regex9

Nevertheless, it should be borne in mind that there are many other parties (such as Apache, IBM or the Eclipse Foundation) that carry the project

is correct but I would still mention microsoft himself or amazon, google because apache and eclipse are usually more known in the java environment and ibm although huge is still not associated with the typical FAANG call

orochi02
1 year ago
Reply to  regex9

While the JDKs themselves are usually available for free, the extra support services are usually not.

and at .net is it different or how? 🤔

regex9
1 year ago
Reply to  orochi02

.NET is only published by a source (Microsoft) and is free. For advanced support to (general) Microsoft products, Microsoft also offers bookable support packages.

orochi02
1 year ago

after reading your comment. :

it really doesn’t matter because you can do something with everyone talking. small games you can also write in python because it doesn’t matter if you use jz java or c#. for larger I tend to c# because of the memory model.

java and c# are both very good and at the end it is my opinion almost only a matter of preference. I personally consider java to be the better language but c# is, in my opinion, more the language with which you become more friends.

if you are only interested in the professional aspekt you should just stay with javascript/node, because with node you also have a very well positioned platform the quasi .net and java rival. I don’t see what you’re looking at and what’s better with WPF/avalonia/javafx/swing? if it’s about bundle size and performance and so what I heard that tauri should be much lighter (in terms of performance and consumption) but still offers a similar experience as electron.

Palladin007
1 year ago

A Wall of Text without concrete questions – what is the question now?

but I’m a web developer and I don’t care

The future is on the web, whether you like it or not.
I’m currently working on a blazor project that runs pure on the desktop, just because Blazor is good, but I need desktop.

the Java probably has significantly more use, more popular is => more jobs for me

There are enough jobs in the .NET area and there will be more.
The majority of companies are looking for web developers.

As far as I know microsoft tried to limit it to windows only.

Not tried, it was initially limited to Windows, for a few years (since .NET Core or .NET 5) but no longer.

Java is translated into bytecode and C# in CLR.

CLR is the Common Language Runtime, not a code.
C# is translated into IL (Intermediate Language).

I also don’t like who these languages belong microsoft and oracle. This does not play a big role for me but can develop badly

.NET is opensource, the community is actively working with and Microsoft actively engages the community. It thus continues to develop positively in the direction.

You know Electron, you can’t do that much.

Electron hosts web apps, so you can do everything you can with web apps.
I personally currently work with Photino.NET, which is significantly smaller, but also significantly lighter, more performant and it also runs without detour with .NET 8.
Both can work with Blazor (if I know about Electron).

Do not think that many pure Electron developers are looking for.

Nobody’s looking for pure electron developers. Companies need web developers and if you need to work with Electron, you are expected to work in there.