r/learnprogramming • u/Such_Criticism7622 • 27d ago
In which project application is Csharp useful?
So, I have been using java till now and recently got switched to Csharp, and I wonder why we have to use Csharp instead of some other language. Like our project is about a payment app in which the crew customers or staff use it to keep record of all the transactions. So, why do we use Csharp is it because maybe they are more compatible with the situation there or is it for some other reason. And this question extends to other things as well in which way csharp is better than java.
5
Upvotes
16
u/Objective-Ninja-5211 27d ago
The choice between C# and Java usually comes down to what the org is more integrated with and/or has more experience with, that's all. Companies deep into the Microsoft stack will almost always go C#, while those that aren't will usually go the Java route.
The languages are pretty similar, so apart from game development support (and windows native development) where C# is way more supported, you won't really see something one is better at than the other on a base level.
5
u/plastikmissile 27d ago
The only reason you have to use C# is mainly because your project was started in C#, so it only makes sense to continue using it. Why was the project in C# in the first place? You'd have to ask whoever built it. Maybe he liked C# better than other languages. Maybe there was a specific library they wanted to use that was im C#. Maybe it was easier to find good C# developers than for other languages. It can be literally anything.
9
u/Massive_Value8302 27d ago
It does everything Java does but better. But some orgs uses Java so they will continue to use java.
3
u/Aggressive_Ad_5454 27d ago
C# / dotnet has an almost magical combination of centralized architectural control, language extensibility, and tooling (Visual Studio with ReSharper).
We can get things done with it quickly and stably. And that’s what we want with line-of-business applications: to finish them and deploy them without reinventing flat tires.
2
u/Traditional-Story249 27d ago
I think the choice between C# and Java is less about which language is better and more about the project's ecosystem, existing infrastructure, scalability and long-term maintenance. For a payment application, reliability and security are critical, and both languages can handle these requirements. It would be interesting to understand what specific architectural or business requirements led to choosing C# over Java.
1
u/shyevsa 27d ago
as someone that only ever learn java in class, and only ever work a handful of time on java project outside android. your question are probably also mine just turn it around. why do you even chose java?
for your question however, it most likely not about which one is better, its more about who work on it.
and where the application is used. for example for desktop app that only ever used on windows there is almost no reason to use java. however for application that should be able to be used on multiple device with multiple architecture java indeed has a lot of compatibility layer.
for me the problem with java are performance, unless you really good with it its just painful to manage.
1
u/jakingo 27d ago
C# fits well with .NET-based systems, but Java can handle payment apps just as well.
1
u/iqisoverrated 27d ago
To what others have said: It can also be a question of support. Particularly with payment apps you need to be assured with *fast (*and longtime) support when something goes wrong in the language implementation itself.
1
u/cheezballs 27d ago
I genuinely am confused. You have been using Java but you talk about "Csharp" as if its some weird other worldy technology. How well do you know Java? C# and Java fill very similar roles and are very similar in syntax and look and feel. C# has more features and is a little more "Microsoft-leaning" depending on how your org has their contracts et up
1
u/Sufficient_Duck_8051 27d ago
Nobody other than oldschool corpos is using Java anymore
1
u/ExtraTNT 26d ago
Done the same, first i wasn’t liking c#, got back to java and well, absolutely hate java now, have it side by side and well, java often just sucks… compared to haskell most languages suck, but c# at least let’s you work somewhat functional…
1
u/cdm014 26d ago
For any where the clients don't want to license Java just to run apps.
1
u/et_theextratestic1e 27d ago
Java has a beautiful architecture. It is also very bloated; it seems every PhD was adding libraries to it for their theses. Cross platform suitability is very low and it's slow.
C# suffers none of these. It does lack in suitable cross platform GUI libraries if you're not building a web app. Java's are just ugly.
0
u/Dazzling_Music_2411 27d ago
Usually the reasons are political or financial. Control by Microsoft or Oracle or whatever.
The application domains of the languages are quite similar, as are their paradigms.
0
u/mredding 26d ago
There is no best fit language for a given application. You need to consider technical and business factors.
Where does this software need to run? If it's on the browser, then it's going to have to be Javascript, because it's the only language natively supported by all browsers. If it has to be native, then you need a language that can integrate with the native environment. If you need cross platform native support, then that further constrains your language.
What performance do you need? What performance are you going to leverage? If you're rather compute heavy, then Fortran may be a choice language. If you are implementing business processes, then Fortran is among the worst.
What about the ecosystem and support? Python is hands down the most popular programming language on Earth. Where the HELL are you going to find a Forth developer but among a few vintage enthusiasts? If this is a business, what technologies are you invested in? Where are you going to find people familiar with those technologies? What technologies are easy to find expertise in?
C# and Java are practically the same thing. I've written production trading software in both. And now C# .Net Core is platform independent. So frankly, it's almost a coin toss between the two, unless this product is running on a Windows platform, or C# has a killer library, or if the company decision makers are already familiar with C#. Maybe they're not focused on cloud native so Spring Boot isn't all that attractive, or maybe they're REALLY into Microsoft so Azure is the only way to go...
Why not C++? I dunno, man...