Live data from Hacker News

Show HN: Minum – A minimal Java web framework

github.com

81–90 of 113 posts

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

#81
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.

JSP literally compiles/translates to Servlets, as in extends them in the code, and everything you see is in their 'service' method effectively. JSP can consider JSP alike to C's preprocessor.

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

#82
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?

>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 standard for calling servlets w/o anything, it has changed, of course.

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

#86
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?

It usually ‘just works’ on your side. Configuring it properly is also fine, but a bit more involved.

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

#87

it is my first time seeing java web framework project on HN. I am sure that this is a great project but for the love of god, just let Java die , please. There are plenty of better alternatives to choose from (nodejs,go, python, elixir, clojure, Ruby etc)

I chose Java for one of the microservices that leverages JTS library, which was the tool I wanted for the purpose. I wanted to use normal Java, because the thing I needed to do was very simple. It works very well. Used Micronaut by the way.

Java has its place.

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

#88
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 was thinking the same thing so I dived in the example. And now I understand why there wasn't a code snippet in the README: even a minimal app seems to requires multiple files in many subdirectories. I guess java stays Java, even when using a "minimal" framework.

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

#89
post #82
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?

>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.

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

#90
post #13

Earlier quoted context omitted.

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.

This is definitely true. The more complex the library is, the more chance for a vulnerability to happen. And combining 2 independent low level vulnerabilities may end up being a critical vulnerability.

The same may happen in your project, but if you use simple(r) dependencies, it's less likely.

Post reply on HN