Live data from Hacker News

Show HN: Minum – A minimal Java web framework

github.com

41–50 of 113 posts

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

#41
post #13
post #8

Earlier quoted context omitted.

in case you truly want to go as absolutely minimal as possible. i do. for my own personal projects, i use that database.

What does ‘minimal’ even mean though? Code is code - either you pull it down as a dependency or you write it yourself, it all executes the same in the end. The minimal/zero-dep solution will have have bugs that have already been fixed or avoided by battle-tested libraries, and it will very rapidly lose minimal status as you start to build something serious in it.

> What does ‘minimal’ even mean though?

It doesn't include the batteries.

The batteries - extra features - weight you down if you don't need them. So you'd better be able to avoid them. Large projects can be hard to audit to remove things which could be nice and often useful - but just not in your case.

Smaller projects have an advantage that you can easier understand them and decide what you need to add and, crucially, how to add that better, from your personal viewpoint. It's really hard to have nice, tiny, composable building blocks, so we have rather few attempts at that. Actually, a big part of programmer's education is teaching him how to properly write something which is well known, just have many small variations which depend on both requirements and some preferences. With a smaller project you can see those choices easier - and have better chance to correct them the way you need.

> The minimal/zero-dep solution will have have bugs that have already been fixed or avoided by battle-tested libraries

Maybe. Maybe not - you need to have all branches of execution checked, and with all possible input data combinations - and then all problems to get noticed and, crucially, corrected. Some problems, like unnecessary delays, can avoid e.g. representation in the logs.

On the other hand, with smaller projects you have less moving parts and better visibility where, and how, things could go wrong. If you want ultimate reliability with proofs, you'll find it easier going with smaller projects.

So, as they say, there are programs so simple they're obviously correct and so complex it's not obvious which errors they have.

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

#42
post #13
post #8

Earlier quoted context omitted.

in case you truly want to go as absolutely minimal as possible. i do. for my own personal projects, i use that database.

What does ‘minimal’ even mean though? Code is code - either you pull it down as a dependency or you write it yourself, it all executes the same in the end. The minimal/zero-dep solution will have have bugs that have already been fixed or avoided by battle-tested libraries, and it will very rapidly lose minimal status as you start to build something serious in it.

> Code is code - either you pull it down as a dependency or you write it yourself, it all executes the same in the end.

This looks like an oversimplification sometimes. You surely can solve the same problem in programming in different ways. An important part could be unstated assumptions you relied on when you wrote your code - and sometimes it's really important to understand those assumptions, or the code could strangely misbehave. "All executes the same" could literally be not true - some testing may suggest that, but more expensive testing, which is often not done, could show that for some unusual combinations the behavior is different.

How do you know it's the same?

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

#43

[flagged]

Actual Java dev here, not just someone who used it in college and got annoyed -- but I have no idea what you're talking about. Java has not been boilerplatey for a long time, I'd say since sometime between Java 5 and Java 8. You do know you can declare multiple classes in a single file (static nested classes), contrary to the popular convention, right? And "public static void main" doesn't count as boilerplate, that'…

You're correct ... in theory.

At least in this project example code, i see tons of empty class like Result.java with empty content, on separate file.

So is this normal convention for Java dev ? No eslint (or similar tool) to prevent boilerplateness ? That's my point.

Do you Java dev have strict standard on prevent such things spread on all codebase, ecosystem,... ?

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

#46
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 with Dropwizard - which is way simpler than Spring Boot but at the same time uses a bunch of idiomatic packages (like Jetty, Jersey, Jackson, Logback and so on): https://www.dropwizard.io/en/stable/

I do wonder whether Minum would ever end up on the TechEmpower benchmarks and how it'd stack up against the other libraries/frameworks there, those benchmarks are pretty interesting.

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

#47
post #13
post #8

Earlier quoted context omitted.

in case you truly want to go as absolutely minimal as possible. i do. for my own personal projects, i use that database.

What does ‘minimal’ even mean though? Code is code - either you pull it down as a dependency or you write it yourself, it all executes the same in the end. The minimal/zero-dep solution will have have bugs that have already been fixed or avoided by battle-tested libraries, and it will very rapidly lose minimal status as you start to build something serious in it.

I'm reading it as "minimal in scope". Scope creep tends to be a given for established/battle-tested libraries, and I'd argue that over time scope creep could counteract security benefits of being battle-tested.

Note that I'm not basing this on data, just on my intuition that a lot of major security bugs seem to be related to obscure/infrequently used functionality.

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

#48
post #39
post #12

Earlier quoted context omitted.

Making the user manually escape parameters (and be very careful not to miss any) seems at odds with the goals of ease of use and maintainability. Most template libraries do this automatically by default.

You are not wrong. Just, here, priority is 1. minimalism 2. ease of use It's an uneasy balance. I am well aware of the value of fully-powered templating engines.

For the record, I love this project's minimalist goal. Having said that, I agree with the other commenter that escaping by default (with an opt-out mechanism) is probably the better choice.

I don't even think this violates your prioritization because it should result in less code when considering an app in its entirety (framework + logic).

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

#50
post #10

I'm thinking of this as a nice programming exercise for the author. As for being a framework which promises more with less, that only holds until feature x is required.

a perfect example of the thinking behind most frameworks. I don’t think most people are looking for minimal. For those that are, this might be right up their alley. Minimalism is an interesting ideology. it’s about choosing to do more with less, and there’s a great deal of ingenuity in saying, i only have this one knife and a rope, how do i cross this chasm. so to speak. no offense intended to the batteries included…

[deleted]
Post reply on HN