Live data from Hacker News

Show HN: Minum – A minimal Java web framework

github.com

71–80 of 113 posts

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

#71
post #3

Am I missing something or does the quickstart recommend an XSS vulnerability? String name = request.startLine().queryString().get("name"); return Response.htmlOk(String.format(" Hi there %s! ", name)); Maybe having a little bit more available would be valuable.

Ah but its "minimal".

Taking the web back to its roots.

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

#72
post #55

Why does almost all the Java based web development framework use "template" system, instead of generating HTML from code(like Flutter/Swift)? Is this due to the inherent limitation of Java language/syntax?

I wonder why more java frameworks don't reuse the parsing from JSP, but just drop the servlett part. Though maybe that's not as easily done as said.

JSPs are implemented by transpiling them into servlets, so JSPs without the servlets doesn't really save anything (assuming you want to re-use what's out there).

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

#74
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…

All a stock JDK lacks to handle this out of the box is a JDBC driver (which it has innate support for), and a template engine.

It has a built in HTTP server which has recently been improved. It’s also getting, in preview now, a string formatting subsystem which is not quite a template language, but it’s interesting. And, to be fair, out of the box the JDK does have a template system: XML and XSLT 1.0 support.

The HTTP server is usable, but could use some sugar. Same for the logging system, usable but could use some sugar as well.

It has TLS built in as well.

It does not have JSON built in. In todays world, that along with persistence are probably two true must haves. Mind, the JDK used to ship with JavaDB, which was a version of the Apache Derby database.

It is trivial to add the SQLite jar to a project. You wouldn’t even need a connection pool with that.

Anyway, the point being that the JDK is almost there just by itself to be capable of serving a lot of use cases if you’re willing to put in a little bit of work to make your particular work flows a bit easier to use.

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

#75
post #54

To anyone developing libraries: please, for the love of god, just put a damn code snippet right at the top. A simple hello world would do. If you're pitching me something, show it to me. People don't have to dig around to see what you've made. I think the average visitor will give you about 10 seconds to decide if this is something they might be into, and if they can’t tell then they’ll leave.

I think I gave it 3 seconds.

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

#76
post #54

To anyone developing libraries: please, for the love of god, just put a damn code snippet right at the top. A simple hello world would do. If you're pitching me something, show it to me. People don't have to dig around to see what you've made. I think the average visitor will give you about 10 seconds to decide if this is something they might be into, and if they can’t tell then they’ll leave.

[deleted]

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

#77

I like this Java movement back from overbloated frameworks with decades of cruft. I thought about building my own libraries as well. Don't have time for that yet. What I don't like about this library: Java 21 requirement. Virtual threads are performance optimization, they should not be a requirement. If I'm fine with running thread per request, that's on me. I mean, we built apps 20 years ago which did that and they…

[deleted]

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

#79

[flagged]

I think the verbosity of Java is all in your head

I prefer verbose code over unknown defaults. If I need to comeback and read that code again, I'll know exactly what is going on at first glance.

I've never understood the desire to type less. Yes, there's a certain amount of tedium involved. This is life. This is why it is "work". Take away the tedious elements and you'll find problems in other areas. Everything is a tradeoff. I gladly accept the comfort of verbosity over unknown ambiguity.

Actual programming is the last mile of my workflow. Why would I want to be lazy there, or cut corners? The finish line is already within sight. Identifying a problem and coming up with a solution is the bigger task.

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

#80
post #65

I didn't see looping support for templating, like for rendering collection to HTML table. Did I miss something?

You did not miss anything. It lacks that functionality, making it necessary to template the inner part, and then use that within an outer part. Fully-featured templating libraries provide this in the form of special syntax. This does not provide that level of capability.

I see. So you intend to make templates logic-free. Perhaps you can implement like xtemplate that I used to use last century

https://eeperry.wordpress.com/2009/08/08/php-xtemplate-the-b...

Post reply on HN