TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Jodd – The Unbearable Lightness of Java

177 pointsby datalistover 3 years ago

18 comments

MichaelMoser123over 3 years ago
I remember the days, when the Spring framework was advertised as a lightweight alternative to Enterprise java beans (ejb); now Spring outgrew the pretence of being lightweight, don&#x27;t know when that happened. A year and a half ago, i got back to work with java and spring boot, and i was overwhelmed by the prevalence of annotations in spring boot.<p>To cope with all this, i wrote this little project: <a href="https:&#x2F;&#x2F;github.com&#x2F;MoserMichael&#x2F;ls-annotations" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;MoserMichael&#x2F;ls-annotations</a><p>It&#x27;s a decompiler that is listing all annotations, so it becomes easier to grep a text file in order to detect the dependencies between annotations.<p>it is using the asm library <a href="https:&#x2F;&#x2F;asm.ow2.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;asm.ow2.io&#x2F;</a> to inspect the bytecode files, so as to extract the class signature, along with the reference and declaration of annotations included in a classpath, or class files included within a directory structure. A limitation&#x2F;feature is, that it is inspecting already compiled bytecode files.
评论 #29973363 未加载
评论 #29977224 未加载
评论 #29974481 未加载
评论 #29976989 未加载
评论 #29975870 未加载
评论 #29977906 未加载
评论 #29974091 未加载
评论 #29977348 未加载
sittaover 3 years ago
Spring is certainly a divisive topic, and I think it&#x27;s hard for people on different sides to fully understand each other&#x27;s experiences.<p>I have used Spring for years. Yes, there are some things I don&#x27;t like about it, for instances Spring Boots overeager auto configuration, but it provides an unparalleled level of flexibility and productivity. I have never encountered a behavior in Spring that I have not been able to read the source and figure out what&#x27;s going on and then change the behavior to be what I want. Spring is absurdly flexible and you only need to use the parts that you want.<p>A few years ago, I decided to try an alternative and wrote an app in Vert.x with no Spring. It worked fine, but it was a hell of a lot more work than leveraging the Spring ecosystem. I later rewrote it using Boot, and it works better, is easier to understand, and uses less code.<p>Have you seen Spring Data JDBC? It&#x27;s such a good idea that saves so much boilerplate and I&#x27;m not aware of anything else like it. It threads the needle between rolling your own SQL and descending into the hell of a full on ORM.<p>Anyway, the closets I can come to understanding why people hate Spring so much is to consider my own opinion of Rails. I don&#x27;t like Ruby and I don&#x27;t like Rails. I hate all of the magic and I don&#x27;t want to learn it. But, I&#x27;m sure, like Spring, it&#x27;s enormously productive if you do understand what it&#x27;s doing and how to use it.
评论 #29979200 未加载
评论 #29979655 未加载
hocuspocusover 3 years ago
I haven&#x27;t really touched Java in a while but I don&#x27;t get why you&#x27;d want a <i>lightweight DI container</i>.<p>You can just build your object graph and pass dependencies manually if you want a lightweight approach, no? That&#x27;s just the way people do it in most languages.
评论 #29972953 未加载
评论 #29976461 未加载
评论 #29973136 未加载
评论 #29972752 未加载
评论 #29974635 未加载
评论 #29975849 未加载
评论 #29976217 未加载
评论 #29972854 未加载
ferdowsiover 3 years ago
I really like the Go-like simplicity of these libraries, without the cursed architecture astronomy from the 2000s.<p>In general it&#x27;s interesting times for Java. With all of language improvements from Kotlin&#x2F;Scala, and upcoming Go-like concurrency it really feels like a renaissance for the language.
评论 #29974587 未加载
评论 #29973785 未加载
mooredsover 3 years ago
Past discussions:<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=9278704" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=9278704</a> (2015)<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20063945" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20063945</a> (2019)
评论 #29977601 未加载
spuzover 3 years ago
I wonder if someone can recommend a lightweight http server library? I like Javalin but it&#x27;s based on Jetty which is a fully JavaEE compliant framework and includes support for things like OSGI which I don&#x27;t need. With the whole Log4j situation, I&#x27;m re-evaluating some the libraries I&#x27;ve previously relied on.
评论 #29973037 未加载
评论 #29972942 未加载
评论 #29972715 未加载
评论 #29972918 未加载
评论 #29974379 未加载
评论 #29977260 未加载
评论 #29972791 未加载
评论 #29974365 未加载
bayesian_horseover 3 years ago
Knock-Knock who&#x27;s there? ... Long Pause ... Java!
sorokodover 3 years ago
Looks nice and clean. It does seem to be maintained by a single person (at least the JSON subproject [1]) which will be a major turn off for adoption by an &quot;enterprise&quot;<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;oblac&#x2F;jodd-json" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;oblac&#x2F;jodd-json</a>
评论 #29976713 未加载
bedobiover 3 years ago
This is great. Java BADLY needs to shed weight and verbosity and in general just catch up with the times.<p>Having used not only traditional Java and Spring (including &quot;modern&quot; Spring boot) but also alternatives, like eg DropWizard, I MUCH prefer the alternatives.<p>DropWizard in particular seems to me a more neutral collection of some of the best tools for each job, and it&#x27;s both simple and easy.<p>Spring is just Spring, Spring and more Spring, and while it&#x27;s &quot;easy&quot;, it&#x27;s not <i>simple</i>- there&#x27;s <i>a lot</i> of magic.<p>I&#x27;m glad to finally be in a team where people are open minded enough to look outside the Spring bubble. TBH these days, we don&#x27;t even use Java anymore, we use Kotlin + Arrow which is amazing.
评论 #29982116 未加载
kitdover 3 years ago
Looks good.<p>Is there a &quot;Getting Started&quot; guide or a list of examples anywhere? I&#x27;m on mobile so may have missed them. All I could see were links to the separate component docs.
评论 #29977285 未加载
rammy1234over 3 years ago
Nothing can be light forever unless it is opinionated
Zababaover 3 years ago
Looks nice, and reminds me of the ecosystem around Quarkus. I have two questions:<p>1) Is this compatible with GraalVM? I&#x27;m mostly asking this out of curiosity.<p>2) Is it using &quot;modern&quot; Java features? Records, pattern matching, optionals.
dehrmannover 3 years ago
A lot of this looks like functionality offered by other, more popular libraries. Jodd JSON looks functionally (and syntactically!) similar to Jackson, but Jackson has a lot more users:<p><a href="https:&#x2F;&#x2F;mvnrepository.com&#x2F;artifact&#x2F;org.jodd&#x2F;jodd-json" rel="nofollow">https:&#x2F;&#x2F;mvnrepository.com&#x2F;artifact&#x2F;org.jodd&#x2F;jodd-json</a><p><a href="https:&#x2F;&#x2F;mvnrepository.com&#x2F;artifact&#x2F;com.fasterxml.jackson.core&#x2F;jackson-core" rel="nofollow">https:&#x2F;&#x2F;mvnrepository.com&#x2F;artifact&#x2F;com.fasterxml.jackson.cor...</a>
评论 #29975493 未加载
ivancheover 3 years ago
Very impressive that all of this is maintained by a single person in their free time! His blog (only Serbian, sorry) is at <a href="https:&#x2F;&#x2F;oblac.rs&#x2F;" rel="nofollow">https:&#x2F;&#x2F;oblac.rs&#x2F;</a>
oaieyover 3 years ago
Speaking of lightness: Is it just me, or is the Java folder-per-namespace thingy a huge turn-down when it comes to lightness?
评论 #29976638 未加载
评论 #29977281 未加载
topkekutelepover 3 years ago
Is this the true Java framework we were promised Spring would be
adrianlmmover 3 years ago
&gt;Book book2 = new JsonParser().parse(json, Book.class);<p>why not: JsonParser().parse&lt;Book&gt;(json)
评论 #29973507 未加载
评论 #29973511 未加载
评论 #29973501 未加载
gautamdivgiover 3 years ago
I have used <a href="https:&#x2F;&#x2F;sparkjava.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;sparkjava.com&#x2F;</a> when I still did Java some years back. It was as thin as they come and a real joy to get started and going.