Live data from Hacker News

Show HN: Minum – A minimal Java web framework

github.com

91–100 of 113 posts

Re: Show HN: Minum – A minimal Java web framework

#91
I built my bread and butter with Java and Spring for ~20+ years, and I can safely say whilst commendable to reduce the bloat, it's the language itself which is bloated af.

Features bolted on late like function pointers (sorry lambda functions, which are effectively delegates, something they said they'd never do https://web.archive.org/web/20080127045532/java.sun.com/docs... ), too many deprecated APIs, keywords that mostly go unused and have alternatives (volatile - a CPU option for memory access with shared threads, transient - now handled by serialisation frameworks, synchronized - now handled by locks, protected - barely used in preference to package etc).

I moved to Typescript, AWS lambdas and Express framework, it has all this framework's simplicity baked in.

To other Java Devs who have made their bread and butter with the language (and perhaps nothing else), don't knock it until you try it, the path from Java to Typescript or other typed language is easier than it looks and you'll wonder why it ever took so long to knock up quick systems.

Re: Show HN: Minum – A minimal Java web framework

#92
post #82

Earlier quoted context omitted.

>instead of generating HTML from code At the relative bottom (Servelet API level) it works that way, servlets have a direct access to input/output stream, and they have to write plain byte[] (or string via Writer). As for java syntax, it's not great for string manipulation, encoding (you will need some functions for all the html/javascript escaping). If you see url's containing ".do" extensions - that was the standar…

Just a note about the “.do” extension: if I correctly recall, it was introduced by struts framework which used “Action” as a naming convention such as Spring uses “Controller” as suffix, and so they used “.do” as extension.

I've never used 'struts' personally, however mapping servlets directly to ".do" was a recommendation (can't quote books any longer, though - it has been well over 2 decades)

Re: Show HN: Minum – A minimal Java web framework

#93
post #83

How is maven nowadays? Every time I see an interesting java project, I think about using it, and then I see "maven" and I remember the terrible experiences I had with it. Has it improved at all in the past 10 years?

Maven is always more or less the same - you have properties, dependencies, build (plugins), profiles, maybe modules and dependencyManagement if you have multi-module build. That's it, every project is the same.

In Gradle there is are infinite number of ways how to configure it. I haven't seen 2 projects done in the same way, when I want to understand a new gradle build, I need to learn few new Greadle (or Groovy) features.

Sure, in very complex Maven builds there might be some quirks and some plugins have bugs, but it works so much better than anything else out there.

Re: Show HN: Minum – A minimal Java web framework

#95
post #64

Awesome, love to see more Java devs pushing back on the spring madness. In Db.java, with the write/update/delete locks, that mutate both in memory and on disk, is there not a bunch of race conditions there?

There are locks around those - for example, writeLock

I mean race conditions between the operations, e.g. an update followed by a delete:

1. update x in memory

2. delete x in memory

3. update fn checks for file on disk

4. delete x from disk

5. update x on disk

Is this not possible and you end up with different state in memory and on disk.

Re: Show HN: Minum – A minimal Java web framework

#96

I built my bread and butter with Java and Spring for ~20+ years, and I can safely say whilst commendable to reduce the bloat, it's the language itself which is bloated af. Features bolted on late like function pointers (sorry lambda functions, which are effectively delegates, something they said they'd never do https://web.archive.org/web/20080127045532/java.sun.com/docs... ), too many deprecated APIs, keywords that…

[deleted]

Re: Show HN: Minum – A minimal Java web framework

#97

I built my bread and butter with Java and Spring for ~20+ years, and I can safely say whilst commendable to reduce the bloat, it's the language itself which is bloated af. Features bolted on late like function pointers (sorry lambda functions, which are effectively delegates, something they said they'd never do https://web.archive.org/web/20080127045532/java.sun.com/docs... ), too many deprecated APIs, keywords that…

Java is 28 year old, Typescript is 10.

Give it another 20 year and similar patterns will emerge as the language matures.

Re: Show HN: Minum – A minimal Java web framework

#98
Congratulations!

Looks like a fun project and Java really could need a bit of minimalism. I'm always intrigued by small frameworks like Minum et al. even if it's just to learn how things are done in an approachable way.

Love to see stuff like this on HN, and I'm a bit surprised about the negativity in the comments.

Re: Show HN: Minum – A minimal Java web framework

#99
post #57

The size statistics page is super cool: https://github.com/byronka/minum/blob/master/docs/size_compa... Reasoning this way about software and dependencies more often seems like a good thing, just so we're aware of what we're actually getting into, especially with projects that use npm. I actually hadn't heard of Javalin before, which also seems nice: https://javalin.io/ Aside from that, I've also had good experiences…

3,757 what? KB, MB, GB, TB, PB, LOC, hours to download?

On that page it says:

> (all measurements of lines of code are for production code - that is, non-test-code)

Given that this is Java, the author could have measured the total size of the bytecode, which is probably a more style-neutral way of measuring the fundamental quantity of code.

Re: Show HN: Minum – A minimal Java web framework

#100
The author has written their own HTTP server rather than using the one provided with the JDK. They need to have a really, really good reason to do this, and i haven't seen such a reason reason documented anywhere.

Other, much larger, web frameworks provide their own HTTP servers (or bundle Jetty etc), because they can make them more scalable, or more featureful, or support protocols the JDK one doesn't. But i don't think the author's HTTP server does that.

Post reply on HN