Really the future of the Modern Java Platform is Graal - https://www.graalvm.org/reference-manual/embed-languages/ Java is not Spring Boot. For example, this is Python 3.8 compliant runtime on top of Graal - https://www.graalvm.org/reference-manual/python/ You can also compile your application into a native image (like Go?) - https://www.graalvm.org/reference-manual/native-image/ you can try it in the next 5 mins 1.…
The Modern Java Platform – 2021 Edition
111–120 of 259 posts
Re: The Modern Java Platform – 2021 Edition
#112Earlier quoted context omitted.
I felt strongly enough about this topic to write a full blog post: http://sreque.blogspot.com/2019/08/the-autumn-manifesto-why-... . TLDR: so-called DI frameworks are really just frameworks for creating and consuming global variables and have very little to do with the actual principle in of DI. That said, I think the jvm and java the language are in a great spot. It's the frameworks and community that need a shift i…
I disagree with that blog post. It may be technically possible to hijack the classloader mechanism to make instantiating classes do dependency injection, but it's not easy or idiomatic, and it's not good for maintainability either; a reader can't tell the difference between a global service and a value object if both are just "new Foo()". DI, in the sense of separating the instantiation of long-lived service objects…
Re: The Modern Java Platform – 2021 Edition
#113I thought OpenJDK was TCK-certified to be Java compliant, and 100% Free and Open Source software. Is that mistaken?
> To label a custom JDK with the Java brand (which is owned by Oracle) it must pass the tests in the Technology Compatibility Kit, which must be licensed from Oracle for such purpose.
Right, except there's a special exception for OpenJDK and derivatives. [0] Apparently though this doesn't always work out. [1]
Re: The Modern Java Platform – 2021 Edition
#114There's some great stuff on the JVM today, but Spring Boot is recapitulating all the problems of J2EE. Everything is extremely "decoupled" to the point that you have no idea where anything comes from or why, and just adding a new dependency to your classpath will radically change the behaviour of your application (oh, you added a dependency on a library that has a transitive dependency on the MongoDB client? Guess th…
Re: The Modern Java Platform – 2021 Edition
#115Earlier quoted context omitted.
> In a team with 100 devs, simplifying and unifying decisions is extremely important. I agree with this. Unfortunately, Spring is often chosen for projects with much smaller teams too. Just 1 to 5 devs on what is fundamentally just a CRUD app. Wrong tool for the job.
I disagree. I can spin up a CRUD service with Spring Boot in an hour including validation, health checks, db migrations, API documentation and what not. It lets me move fast while taking care of the boring stuff. Nothing to do with team size.
I have read startup experiences with other frameworks where they write blog posts about all the issues they had to spend time to fix, that is trivial to solve using Spring. There is a slight learning curve in the beginning, but it is worth it in my opinion.
Re: The Modern Java Platform – 2021 Edition
#116Earlier quoted context omitted.
That's interesting. I'm not the biggest Java fan, I can tolerate it. Recently working on a Python project I find I'm massively unproductive compared to something like Java or more specifically Scala as using Spark. Not having strong types and limited type hinting. I have no idea what things are, is it a int, string, object etc, clicking through in an IDE to see code/docs isn't as great as it's hard for an IDE to insp…
> Not having a compiler means I have to have unit tests doing what a compiler would do or finding out I have syntax errors or other errors at runtime. Nope, it's not the only way. In practice you'd have type hints all over your code and a linter to perform static analysis. Of course this can be integrated in you IDE, so it's easy to do. > Not having strong types and limited type hinting. I have no idea what things ar…
Type hints are very different to a strongly typed language with a good type system. Haskel as an extreme feels like algebra, you have a type a, you need a type c, you have a function a to b, and a function b to c, you just compose them together and from your a you have a b. Tools like hoogle can tell you the function to use for the given args to get to the final type you want.
Ignoring Haskel even Typescript can let you express things hard to express in Python with ADT’s etc.
Docker has nothing to do with Python but if you want to produce an artifact you can just run anywhere it solves the dependency issue in that the decencies are in the image and you don’t need to run pip install on a deployment server.
Re: The Modern Java Platform – 2021 Edition
#117I liked this article, but it felt to be as much about Scala and Kotlin as about Java. A more accurate title would've been "The Modern JVM Platform". I recently began doing a side project and, for the first time in a while, picked Java over Kotlin. I mostly did so because most books on deep details of the JVM are mostly books about the deep details of Java. Plus: Java is moving along at a fair clip these days. Records…
> Project Loom and Project Valhalla are coming over the horizon A: They say it's coming over the horizon. What's the horizon, B? B: That's the imaginary line where the land and the sky meet that you cannot reach however fast you go.
Re: The Modern Java Platform – 2021 Edition
#118Earlier quoted context omitted.
The Gradle wrapper is how you let gradle download itself upon first execution. It stays in your git-repo, and then you don’t need to install gradle yourself. https://docs.gradle.org/current/userguide/gradle_wrapper.htm...
But surely if you are starting off you need to install/initialize the wrapper itself, no? From your link, Generating the Wrapper files requires an installed version of the Gradle runtime on your machine as described in Installation. Thankfully, generating the initial Wrapper files is a one-time process.
Re: The Modern Java Platform – 2021 Edition
#119Earlier quoted context omitted.
That's interesting. I'm not the biggest Java fan, I can tolerate it. Recently working on a Python project I find I'm massively unproductive compared to something like Java or more specifically Scala as using Spark. Not having strong types and limited type hinting. I have no idea what things are, is it a int, string, object etc, clicking through in an IDE to see code/docs isn't as great as it's hard for an IDE to insp…
Types almost never save the day and they don't add much to the understanding. The code should be structured and documented in such a way that you are able to understand it, reason about it and swap implementations of stuff in the places where such flexibility is handy. E.g. in Clojure, I can trivially test my functions in the context of the application using the REPL. I don't have to reload anything, I do it right in…
There’s a saying in strongly typed languages “make illegal states unrepresentable”.
Java doesn’t let you get all the way there but it’s better than nothing.
When you look at strongly typed languages with a good type system, often when you compile it just works.
Besides hello world, I’ve never written program beyond a few lines that has just worked in a dynamic language.
...I do like clojure and the repl workflow and how everything is data. Haven’t done much besides play with it but have a friend who writes clojure professionally on a large codebase and their feedback is most of the errors they now see wouldn’t exist with a type system.
Re: The Modern Java Platform – 2021 Edition
#120What’s the modern standard for a full stack JVM app these days? Something rails-esque, or is it still just a split between Play and Spring Boot?
After that, in terms of being standard and widely-used, Java EE, now known as Jakarta EE. It has a comparable level of magic to Spring Boot; maybe some of it is done better, some of it isn't.
DropWizard is still going.
I suspect that a larger proportion of Java programmers are working on headless data-munging backend apps than, say, Ruby or Node programmers. Those kinds of apps often either don't need a framework at all, or need some more specialist framework. Hence, Rails-esque frameworks are less of a priority for the Java community as a whole. Which is a bit of a shame, because it would be great to have a really strong alternative to Spring.