Why not Java
Tags: java, spring, springboot, dotnet
Published: 2019-12-22 20:17:26

---
title: Why not Java
published: true
description: What my experiences with Java taught me
tags: java, spring, springboot, dotnet
---

Holy Wars in our profession are all too common. Proponents of different ecosystems find it hard to agree on which method, discipline, language, operating systems and toolsets are superior.

Our judgement of ecosystems with which we are not familiar is heavily influenced by prior knowledge and experience.  In order to appreciate the strengths of what we do not use, it is often not enough to learn more about them, but also to accept different perspectives and approaches and to judge those systems from these different perspectives.

I realized this many years ago when learning TDD.

At first, TDD seemed preposterous, unreasonable and impractical approach to developing software, but today I use it readily whenever I get the chance.

Learn the technicalities of TDD took no time at all, but that was not enough for me to see its strengths. What made the difference for me was a deeper understanding of the importance of requirements analysis and of testing and refactoring in the development process. Once those were understood, TDD quite naturally became the sharpest tool in the box.

I had a similar experience when I finally sat down to study Functional Programming. Unlike TDD, there is a lot to learn in FP. But FP only became an important tool for me when I finally grasped the concepts of immutability and functions, the importance of function honesty and the play between Functional Programming and Object Oriented Programming. In order to use Functional Programming effectively, you need to approach a problem differently. When you do, the Functional Programming tools will help you solve it.

I open with this idea in order to convince you that I sincerely prepared myself for such an epiphany when I embarked on my journey with Java about one year ago.

I have many years of experience using .Net (C#).

In those years I have learned to admire the power of the entire ecosystem: the languages, libraries, tooling and maturity. I have found that it allows me to concentrate on the job at hand and helps me write high quality software quickly. .Net also keeps up to date with the latest trends, adding new functionality without increasing the complexity of existing code, allowing me to learn about the latest engineering practices from the ecosystem itself.

.Net is truly a masterpiece of engineering.

I am also no stranger to Java. But until a year ago, I had not used Java for any commercial project. For years, I have been observing the Holy War between the .Net and Java communities from the sidelines.

The Java community claims that its ecosystem, which is much more widely used than .Net, is at least as powerful as that of .Net. Java has the additional advantage of being OS independent and is supported by a larger and active open source community.

I have always had my doubts though. From what I had seen of the language, it had far fewer features than C# and the ecosystem seemed over-complex for my liking.

But now I have no doubts. A year after my journey started, I can say that the epiphany never occurred, and for me the dilemma is over.

*The Java language is weak. The ecosystem, in particular that of Spring Boot, is fragile and difficult to maintain. There are too many ways to do one thing and very often, only one (if any) works, leaving the developer to repeatedly apply trial and error in a desperate search for a solution.*

In the link at the bottom of the post I explain what brought me to these conclusions.

But one further note is worth mention.

I approached my study of Java with an open mind. At every choice and junction I consulted with experts, studied online courses and read posts online. I tried to make all my decisions align with the Java approach, and not with my habits from .Net.

I came to Rome to learn from the Romans.

Enjoy reading more at this link:

https://drive.google.com/file/d/1Z8rsBh-xNA3uHfR1V9CHO9V2jWIu2yuY/view?usp=sharing