4 ms·
The JVM is vastly underestimated. I think the root cause is an image problem, stemming from a combination of bad programming practices in the past (getter/sette
by emsy 6y ago
The JVM is vastly underestimated. I think the root cause is an image problem, stemming from a combination of bad programming practices in the past (getter/setter bloat, Factories for everything and unnecessary object orientation) and heavy and outdated frameworks such as Spring, JSF and others.
- eecks 6y agoHow is Spring outdated? Spring Boot seems to be a good option.
- kharak 6y agoAnd what is the alternative in the JVM environment? But I have to say, I'd like something less verbose. Springs stack trace looks ridiculously bloated. Still, other than that, you hardly notice the framework once everything is setup.
- kitd 6y agoI'd recommend looking at Quarkus for new JVM-based microservices, especially Kubernetes-based ones. https://quarkus.io/ https://quarkus.io/
- eecks 6y agoCool, I'll check Quarkus out.
- jpgvm 6y agoThere are many alternatives to Spring if you prefer a more DIY approach. Namely Javalin, Micronaut, KTor (for Kotlin folk) and many more (Quarkus was already mentioned). Spring however is the way to go if you come from a Rails/Django/ASP.NET background and want the framework that everything works with out of the box.
- emsy 6y agoThese days I’d go with a JAX Rest backend. The frontend is pure HTML+JS (so no server side templates unless they make sense). No dependency injection but „hand-wired“ dependencies at the top level. I also don’t use ORMs anymore. This means a slower start in the beginning, but later in the project you’re not caught up in a net of a dozen intertwined frameworks.
- brok3nmachine 6y agoLightbend offers a couple good options. Play for web applications: https://www.playframework.com/ https://www.playframework.com/ Lagom for microservices (which is based on Play): https://www.lagomframework.com/ https://www.lagomframework.com/
- mkurz 6y agoI highly recommend Play as well.
- emsy 6y agoI agree and I doubt anyone starts new projects with JSF anymore. But it’s still very much on my mind when I think about Java web apps. As I said, it’s an image problem, not a technical one. the comment I replied to laid down why the JVM is more viable than ever and I hypothesized why people don’t go for it yet.
- karmakaze 6y agoI wouldn't say Spring entirely is outdated. Hibernate and EntityManager are--they were made for the time of Enterprise JavaBeans and their lifecycle.
- infoseek12 6y agoFor me, one reason I avoid Java is because it’s what I used in college when I was a much less proficient programmer. I remember it being confusing and a lot of hard work. That association probably has more to do with learning programming than it has to do with Java but it has stuck, in my mind, somewhat.
- jpgvm 6y agoGive Kotlin a go. Fresh perspective on the JVM goes a long way to dispelling that feeling.