⚔️Final Round: Java vs .Net! Who wins?

Thiago Guedes
13 min readSep 1, 2021

--

one road with two ways: java and dotnet

The choice between the two most popular software development platforms — Java or .Net, has been a matter of doubt for many young people starting their programming careers, as well as for many IT managers, when they need to define a platform for their projects .
And more than that, for being well established, these platforms arouse legions of defenders and many passions, almost like a religion or a football team, where each one justifies his choice with arguments, reasons and fundamentals, not always so clear.
My goal in this article is to get away from the subjective aspects and demystify some things, but mainly to show fundamental aspects to consider when choosing and thus expand the discussion to higher levels, enabling a view free from prejudice, presenting the benefits and challenges of each of the choices . And to deliver this content I intend to support myself in 3 basic pillars:
1. Technical Aspects, 2. Marketing Aspects and 3. Total Cost of Ownership.
(Of course, cultural aspects also matter, but I will not go into this merit, under penalty of losing the impartiality that an article of this nature requires.)
Technical Aspects
Without delving into technical issues between platforms, the idea is to reveal some aspects where they are similar and others where they are different and that may interest laypeople and decision makers. But if you want to dig deep, there are very technical articles that compare the two platforms here and here, just to name two examples.
Before we get into anything about platforms, let’s break a myth: There’s nothing one platform does that can’t be done on the other (where both support, of course)!

gif with one cup of coffee suttitled: java square

→A little about Java
Java is a reference to a set of software and standards, originally created by Sun Microsystems, and now owned by Oracle Corporation. When people talk in Java, they are talking generically about one of the following items:
The Java platform, which includes the Java Development Kit (JDK) which includes the Java compiler and other utilities, and the Java Runtime Environment (JRE), which includes the Java Virtual Machine (JVM).
The Java Class Libraries, which is a large set of code written and available for reuse, and which contains most of the APIs (Application Programming Interfaces) and functions that can be provided by the operating system.
The Java programming language that developers use to write their applications.
A particular “edition” of the Java platform: Java Card, Java Micro Edition (ME), Java Standard Edition (SE) or Java Enterprise Edition (EE)
Java technology was designed to be cross-platform, that is, it can be used in different operating environments such as Windows, Unix, Linux, Solaris, AS-400, MAC, Android and others, and depending on the case, using the same source code, or with few adaptations. This is due to the characteristic of Java being precompiled (through the JDK), and using an “interpreter machine” (the JVM) to transform the instructions into something executable by the operating system.
Java in its “enterprise” version, known as J2EE, can even be integrated with literally hundreds of services and platforms, through its API, which makes it extremely powerful and flexible.

Visual studio Program running “hello world”.

Fundamental Concepts of .Net
The .Net platform created by Microsoft, was born for the Windows environment and allows you to use different native languages (VB.Net, C#, J#) and non-native (Cobol, PHP, among others, as long as they are used on machines running Windows) and consists of 5 main components:
Windows operating system (from version XP)
Windows Server based servers (from version 2003)
.Net Framework (whose three major elements are the Common Language Runtime (CLR), the Framework Class Library, and ASP.Net)
.Net Building Block Services (Internet services), Visual Studio.Net development tool.
Microsoft has made great efforts to make .Net increasingly open, flexible and integrable, and it has gained the sympathy and preference of many developers and companies.

differences in language structures

→Comparison of .Net and J2EE Frameworks
Anyone looking to develop in Java can choose from different development IDEs (Eclipse, IntelliJ Idea, NetBeans, and Oracle JDeveloper). For .Net development the IDE is Visual Studio .Net.
The issue of cross-platform use is still an important difference, but the promise is that this will change in the future. As already mentioned, in Java there is a range of operating system options with little or no adaptation in the code, depending on the architecture used (how close they are conceptually).

→Similarities between Java and .Net
Both platforms make object-oriented development much easier, relying on standards, modular components and services, thus allowing developers to focus on business rules instead of worrying about the most basic services.
In fact, both Java and .Net allow the development of multi-layered applications that handle large volumes of users and data and allow interoperability between different technologies, databases and even operating platforms (desktop, web, mobile).
Both Java and .Net have the open source core, that is, they are with open source code so that developers can modify, improve and evolve the platform. Java was born with this concept, while Microsoft took this initiative only at the end of 2014. It was this change that gave a new direction to .Net, making academic circles start to view .Net with more sympathy.

basic structure of Java (left) and dotnet (right)

In short: the technical aspects alone are not enough to form a good basis for decision. What is at times a weakness, at other times may be the platform’s best virtue.
Marketing Aspects
It is undeniable that both Java and .Net are mature and performant (if well implemented), and have promises of continuity and evolution. But there are no reliable statistics and no consensus on which is the most used globally, given the wide variety of usage scenarios and existing solutions.
But when we talk in terms of the market, we have to go beyond the controversial topic of marketshare, as we have to consider the following:
Offer “ready-made” Applications and Solutions on both platforms within what you are looking for.
Offer from companies specialized in development and support in each environment available and close to you.
Availability of Professionals to work.
Future trends for adoption of each platform in different types of applications.
What is observed historically is that, until a certain moment, Java was very strong in academic environments, in the open source world, and strongly entrenched in the government (who never used the IRPF of the Federal Revenue, for example). Before the opening of .Net code, Java was heavily “sponsored” by some of the tech giants (IBM, Sun, Oracle and HP) as a way to combat Microsoft’s hegemony and dependency. Microsoft, in turn, ran outside, and was the preference of companies producing “package” software and novice developers, for easier access to official material and support.
It was precisely with the advancement of web development, the opening of the .Net code and the launch of Visual Studio Communty Edition, that the giant from Redmond was noting a significant growth in the adoption of .Net, and gradually it is gaining space not only about Java, but also on top of other “niche web” languages ​​like PHP and Python. And of course .Net adoption is also driven by the popularity of Windows, which is becoming a commodity and now runs on 93% of the world’s computers.
Meanwhile, in the emerging mobile applications environment, or mobile, in terms of native applications, Microsoft “slept on the spot” for decades with the archaic “Windows CE”, and .Net still finds room today only on the Windows Phone, already that Android essentially uses Java, and in Apple’s iOS world the language is Objective-C.
Still, it is notorious that in Brazil currently the offer of “tailor-made” development companies able to work with .Net is greater than with Java, and consequently the number of professionals in the Java market is a little more restricted than in .Net. But this doesn’t mean that the Java professional is hard to find.
In summary, in terms of trends, we can observe:
Equal use of both in iOS environment (non-native use of both). Advantage of Java in the OsX world.
.Net growth in web environments.
.Net domain in windows desktop environments.
Java domain in the Google world (Android and Chrome OS).
Growth of Java in the Posix world (Unix, Linux, Solaris).
Criteria for your company to choose between Java or .Net
a) Complexity, size and need for application performance
With regard to performance, the discussion is always heated, as what many argue is that a J2EE implementation tends to make the solution heavier compared to a .Net implementation. .Net proponents argue that the fact that Java requires the JVM (interpreter machine) in itself makes it slower to run, especially in the presentation layers.
To be honest, this was more noticeable a few years ago, but today with the advancement of hardware, it’s not something that glaring, although it can still be noticed, especially in the “client” layer, as .Net applications always run “native “ on the machines. So if performance “on the edge” is a critical point for you, be extra careful if you choose Java. I’ve had very challenging experiences to “tune” Java applications…
As for more robust applications with high traffic volume and many business rules, which need to be better architected, Java (J2EE) does not require a very professional class treatment, as it has many ready and powerful features for session management , failover and load balancing. This can be a relevant differentiator in favor of Java. Not that it’s not possible to do all this management in .Net, which has matured a lot in recent years, but it’s certainly not something so clearly structured, giving a little more work (read time and money) to implement them. Of course, if your team does not have a good knowledge of these aspects, implementing in Java will also end up being complex and expensive (see the next item).
b) Consider your team’s skills
While tools for Java are increasingly accessible, Microsoft tools are generally considered easier to learn and use, especially for building applications that require richer graphical interfaces and that provide content for web browsers.
Keep in mind that training and ensuring your staff’s efficiency in a given technology can be costly (again, read time and money). The Java architecture, being broader and more complex, will require more time to learn and specialized training. On the other hand, the learning curve for those who come from the Microsoft world is much smaller and there is a large offer of in-person and online .Net courses, including free ones offered by Microsoft.
And remember that with regard to the .Net platform, the offer of professionals is greater, since it supports different languages ​​that can be used together with the .Net Framework.
c) Assess the infrastructure you intend to use
Multi-tier environments are typically complex to set up and manage, especially if they are hosted in-house. In this aspect, Java tends to be more demanding in terms of hardware and software compatibility requirements that all need to be in tune with each other to ensure good performance.
My experiences in both environments (Java with Oracle database versus .NET with SQL Server database) reveal that infrastructure implementation and performance tuning is far less traumatic and “obscure” when done in .Net.
And again, it is worth noting that with the strong trend of Cloud Computing, .Net environments have become “beef”, which cannot be said about the Java world, where offers are more restricted.
d) Weigh the importance of portability for the application
If the need to code once and then replicate to different environments is a requirement of your application, then it’s best to stick with Java. In this case you will naturally separate the business layer from the presentation layer. Even if you have to make adjustments here and there in the presentation layer, you will have a solid and unified implementation, rather than working with a “patchwork quilt” of different technologies.
Microsoft’s answer to this is to offer more and more interoperability across platforms, so that you can develop your business layer in .Net, and later integrate it with presentation layers in other languages ​​and platforms. It’s not as intuitive as doing everything on a single platform, but the end result is also good, although you’ll need multidisciplinary expertise on your team.
e) Investigate who your solution providers are or will be
The point here is not whether the company(ies) that will eventually provide you with the services, development, implementation, infrastructure, support or maintenance are able, as this is very obvious. The question here is: how much will it cost to have to replace them, and how easy or difficult it is.
The more difficult or expensive it is to find a replacement, the greater is your risk of having to “die in arm” with the company you hired, or having to throw it all away to start over with another technology.
The key tip is that before deciding anything, you need to take 3 quotes and trade references from the offerers, to make sure you have options. You might be surprised by the results of these surveys, both in .Net and in Java.
f) Total Cost of Ownership
Take into account all the costs involved for you to have an application deployed.
Comparing where both platforms can work on an equal footing — the world of corporate applications (example: ERP, e-commerce and legacy systems): Java tends to cost more than .Net in the medium-long term.
This is directly influenced by direct (labor, which in the case of Java is currently more expensive) and indirect costs, unless of course you are developing in Java with your own resources (without having to hire external labor ) or with some academic subsidy.
Despite the .NET licensing costs of some software components (Windows Server, SQL Server (if you want to use an enterprise-grade database) and Visual Studio Professional), because of the greater availability of labor work, this can end up offsetting these expenses. Remember that depending on the size of the project, labor will eventually become the biggest cost offender in terms of development, far more than software licenses. And when I talk about labor, I’m not referring to coding only, but to the entire cycle of specifying, testing, correcting and maintaining.
Be especially careful if you choose “ready-made” Java applications and servers provided by major players (eg Oracle or RedHat). You will find that despite open source code, there are high costs for deployment, licensing of proprietary or custom parts, support, maintenance and upgrades.
Another factor to consider in terms of cost is when we talk about Cloud Computing as an infrastructure provision model: providers in general are offering more for .Net environments than for Java environments, especially if we include Oracle as a database option for the Java.
Depending on the cost, complexity, size, budget, and time available to deploy a solution, you’ll find the choice isn’t obvious.
Criteria for choosing between Java or .Net as a professional career
Now that you have realized that choosing a company depends on many factors, if you are undecided on which of the two platforms to pursue your career, I invite you to read this 2021 study on salaries x programming languages ​​in Brazil and that you can be found here. You will notice that Java professionals are generally better paid than .Net professionals.
So, if you’re starting out in the programming business and hope to earn money from this activity, it would be interesting to remember that anyone who knows Java, in addition to the web environment and corporate applications, will find work quite easily in the mobile world, whose demand is increasing bigger.
However, note that learning Java will require more investment in knowledge and more from you technically (and this is no demerit for .Net professionals, after all this does not prove anything, except that you will have a greater effort in one than the other) , especially to reach seniority levels where the best salaries are. The ease and intuitiveness of .Net are not so present in the Java universe.
Assess the market, and assess your profile. Are you a person who likes to go deeper? Do you find it easy to learn things on your own? How easy is it with the English language? Are you prepared to work with hybrid environments and understand that code that works on one platform will not always run on the other? Can you go beyond what is documented? Aren’t you bothered by having to resort to discussion forums (and wait) many times to get answers that you didn’t find in the documentation or in courses? While all of this is desirable for both platforms, Java folks know this is quite common in their daily lives.
Make your choice, confident that in any of them, you will find space to develop your full potential.
Conclusions
It is for all the above reasons, and mainly because they are so powerful, that the “fight” between Java and .Net promises to remain fierce for many years to come, for professionals and for market space.
I don’t particularly take radical positions on this or that platform. I can see challenges and virtues on both sides, and that at certain times one may be more suitable than the other, especially considering what you need to do and what talents you have in your hands. Nothing that a study, surveys and consideration will not help to resolve.
After all, I am from the time that neither Java nor .Net existed, and at more than one point in my career I was forced to completely migrate from technology due to market forces (who, for example, did not have to carry systems “ DOS” for Windows, you have no idea what a paradigm shift this represented, apart from the costs and reinvestments. A lady of frustration!). And eventually we will be forced to do this at other times.
That’s why you can’t be “Shiite”, or blind in love, because in technology it’s dangerous to “embrace a cause”, since everything changes all the time. What is fashionable today, tomorrow is obsolete. What pays you well today, tomorrow is knowledge that is worthless. We have to keep evolving and learning, over and over again!
Interestingly enough, it’s not very common to see legacy systems integrated with new things — thanks to Java and .Net. It is also increasingly common to find Java and .Net coexisting in the same environment, beautifully integrated! In fact, according to Gartner, more than 30% of enterprise applications are in hybrid Java and .Net environments.
The decision between one and the other has to do with needs, strategy and available resources and very little to do with technology alone. The fact is that both platforms have some limitations, technical approaches, vocations and strengths.

If you are a software producer, you will certainly think about aspects that perhaps the end customer would not think about, but as a rule, the result and the final cost is what matters, more than actually the means of how it was arrived at.

And you? What do you think about?

man drinking a huge cup of coffee and everything pouring into it.

--

--

Responses (1)