JavaRush /Java Blog /Random EN /Coffee break #68. An honest opinion about Java and its ec...

Coffee break #68. An honest opinion about Java and its ecosystem. Three New Java Tools to Consider in 2021

Published in the Random EN group

An honest opinion about Java and its ecosystem

Source: Dev.to Okay, I admit that my main language is C#. But this is my unbiased opinion about Java and its surrounding ecosystem. I used the bash command in Java quite often, seeing all its shortcomings. For example, Java has no properties, it natively has no events, no structs, no operator overloading, and until Java 10 there was no inference, so there is no 'var'. Everything there is in C#! Also, I used bash for Java due to the lack of LINQ, var and enums. And yet I write quite a lot in Java, especially when I create applications for Android, but for other things too. My first project was also in Java! So, on Friday evening, due to urgency, I had to write in Java for several hours straight. And guess what I discovered? STREAM! Coffee break #68.  An honest opinion about Java and its ecosystem.  Three New Java Tools to Consider in 2021 - 1Apparently Java 8 introduced threads! And I had no idea about it! For those of you who don't know, Streams is a Java implementation of LINQ. I also discovered that Java 10 has type inference, so Java now has a var function! I can't believe how outdated my knowledge is, but honestly, there was a reason for that. These two things made a big difference in my thinking! Did you know that Java always checks for exceptions, but C# doesn't? I admit that I really miss this feature in C#! Yes, there are no structures, properties, etc., but damn, it's elegant! I think Java by design forces the developer to write more robust applications. Whereas in the .NET world, this is largely left to the discretion of the coder. Some developers like these restrictions, while others prefer freedom. While both languages ​​are quite secure, Java obviously has a slight edge. So, why do large companies prefer Java? I think I know the answer now! What frustrates me the most is that... in most of the code examples you see on the internet, these advanced features are not always used... I think that if a new Java developer sees 'var' written all over the code base, he'll go crazy! What about streams? What are streams? Java developers love the For loop! In fact, even foreach loops are quite rare in the Java world (and perhaps there is a reason for this: the For loop is much more optimized). But these are not bad features! I'll go further and say that these features are amazing! It really pains me when I write Android apps and notice that almost nowhere in the Android API are enums used! And this is fair because Android was written many years ago. What irritates me the most is that I have to use constants every time I need to use the Activity for Results function in Android, like this: int PICK_IMAGE_FROM_GALLERY = 3000 Bro, this is crazy! And yet people all over the world have come to accept it. And even me. Java also lacks native event implementation! If only it had events and delegates like C#... (Hey, creators of the Java language, if you guys are reading this, you need to add events! And if you already have them or are in the works, let me know know). Now I'll tell you what might be the biggest flaw in the Java ecosystem. DOCUMENTATION!!! The cluttered and unhelpful documentation on the Oracle website looks stupid and outdated, at the level of 2007. It doesn't even always have code examples. If you start looking for a relatively unusual feature or API method, you will find a boring definition, declaration, arguments, which package it belongs to - and that's it. I think this is absurd. Don't you think this is absurd? No code snippets? So we developers have to rely heavily on forums like StackOverflow, or other programming websites like TutorialsPoint... Sometimes they are really helpful with good code examples showing this feature, but other times they are not so much useful. I recommend comparing Microsoft's documentation in C# with Oracle's documentation in Java... Heaven and earth! Don't believe me? Go and check: Oracle and Microsoft. The documentation on the Microsoft site looks beautiful! They even have a dark mode! We developers are crazy about dark mode. What about Oracle documentation? As I said, it remained in 2007. Perhaps there was no dark mode back then? So, I want to say that Java is amazing! But this language suffers greatly from outdated documentation. These are mostly old docs and old manuals that don't highlight much-needed new features like threads, vars, and enums. Nowadays people say that Java is starting to become obsolete and will be replaced by Kotlin, but I disagree. Because even if this is true, he will not replace her for a long time. This will take many, many years. Do you remember that Scala tried to replace it too? So what came of it? Java still rules the entire JVM ecosystem. Although I admit that Scala is very different from Java, primarily in functionality. Now, finally... one more thing that gives me more emotion than anything in the Java world. This is getting the JDK. Why is it so difficult to download the JDK? What I mean is that if I need a JDK, a simple Google search will point me to the Oracle website, I go there and find the version of JDK I need. So far everything is relatively easy, but then in order to download it I need to register. Why would I create an account on Oracle and then deal with their email every week instead of just downloading the JDK? Keep in mind that Java is open source from day one! Unlike C#, which only recently became open source, in 2015. So, I'm already frustrated and go to the second website in Google search results. It points me to the OpenJDK site. I find the JDK there and click "download". But (surprise surprise!) they provide links to JDK implementations from other sites! Among the sites there is this damned Oracle, but there is also a link to the Red Hat site. Yes, Red Hat is great. It is one of the pioneers of open source companies in the world. Okay, I'm going to their website! I'll download it from there! I click on this link, find the JDK version I'm looking for, and guess what? I have to register there too... (dramatic pause) This is just sad... Fuck it! What's wrong with these people? Finally, I give in and install Chocolatey (it's like apt-get, but for Windows. I think it's the first widely distributed and used package manager for Windows). So after all this I need to write a simple command in PowerShell like: choco install jdk-1.8. And I do it! (if you are a C# developer, you know how easy it is to get .Net SDK in just 2-3 clicks, without registration or anything like that). To conclude my long rant: Java is a great programming language. It is beautiful, reliable and has (in my opinion) the best IDE in the world - the well-known IntelliJ IDEA from JetBrains. Additionally, Java has a very helpful community and a large and diverse ecosystem. And I'm saying this - a C# developer... But we need to update the documentation. Code examples. API. We need to make it easier to get the JDK. Overall, Java is moving in the right direction, its popularity may have suffered a bit recently, but that won't make Java go away. For many years now it has been at the top of the list of the best languages ​​in the world! I use Java all the time and will continue to do so in the future.

Three New Java Tools to Consider in 2021

Source: OpenSource Despite the popularity of Python, Go and Node.js, which have been actively used in recent years to implement projects related to artificial intelligence, machine learning and Kubernetes, Java technologies still play a key role in enterprise application development. According to Developer Economics, there were 8 million enterprise Java developers worldwide in the third quarter of 2020. Coffee break #68.  An honest opinion about Java and its ecosystem.  Three New Java Tools to Consider in 2021 - 2The Java programming language has been around for over 25 years and is constantly being updated. New tools and frameworks are emerging that can empower your applications and your career. The vast majority of Java platforms were created to implement long-running processes with dynamic behavior, designed to run on a server or virtual machines. This changed in 2014 with the advent of Kubernetes containers. Now, the biggest challenges when running Java on Kubernetes are: optimizing application performance by reducing memory footprint, speeding up startup and response times, and reducing file sizes.

Three new Java frameworks and tools

Java developers are always looking for the easiest ways to integrate popular tools and open source projects into their Java applications. New, high-performance tools significantly increase development productivity and encourage more companies and individual developers to use the Java stack. Today we’ll talk about three new Java frameworks and tools:

Quarkus

Quarkus is designed for developing cloud microservices and serverless applications. It has fast boot times, small memory resident set (RSS) size, and high memory density in container orchestration platforms such as Kubernetes. According to JRebel's ninth annual report, Quarkus usage among Java developers grew 6% (less than 1% the year before). Micronaut and Vert.x grew to 4% and 2% respectively (last year - by about 1%).

Eclipse JKube

With Eclipse JKube, Java developers create container images based on cloud-based Java applications using Docker, Jib, or Source-To-Image build strategies. The tool also generates Kubernetes and OpenShift manifests at compile time and improves the experience with debugging, monitoring, and logging tools.

MicroProfile

MicroProfile solves the problems associated with optimizing the enterprise architecture of Java microservices without introducing new frameworks or refactoring entire applications. Additionally, MicroProfile specifications (e.g. Health, Open Tracing, Open API, Fault Tolerance, Metrics, Config) continue to evolve in line with the Jakarta EE implementation.

Conclusion

It's hard to say which Java frameworks or tools are best for enterprise Java developers. As long as there are opportunities to improve the Java stack and accelerate enterprise business growth, we can expect new frameworks, tools, and platforms to emerge. Check them out to see if they can improve your Java applications in 2021.
Comments
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION