Earlier quoted context omitted.
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'…
> The real nice thing about Java is everything is statically typed Optional and generics would like a word... Edit: OK, since this got a downvote, let me be clearer, with some help from the parent: You just use Optional , and if you're lucky some of your dependencies BUT NOT ALL OF THEIR TRANSITIVE DEPENDENCIES also use Optional correctly and don't return null, and before you know it you've lost the nice safety and i…
Show HN: Minum – A minimal Java web framework
31–40 of 113 posts
Re: Show HN: Minum – A minimal Java web framework
#32Earlier quoted context omitted.
> The real nice thing about Java is everything is statically typed Optional and generics would like a word... Edit: OK, since this got a downvote, let me be clearer, with some help from the parent: You just use Optional , and if you're lucky some of your dependencies BUT NOT ALL OF THEIR TRANSITIVE DEPENDENCIES also use Optional correctly and don't return null, and before you know it you've lost the nice safety and i…
I have never ever ever seen a null inside an Optional -- the most common constructor actually Optional::ofNullable makes the correct decision, so you can't even fck it up, and if you deliberately try to, I'm sure intellij would scream your head off.
Re: Show HN: Minum – A minimal Java web framework
#33Names. The problem always comes down to naming. `StartLine.Verb.GET` is not a good name. Neither StartLine nor Verb are used in that context in the HTTP spec. The most widely used name for GET/POST etc. is Method. The author will find that these seemingly small things will hinder adoption.
Agree. Looking at the example project, this is not a single case, when a name could be better. Helpers and Utils are naming anti-patterns, so naming function ˋ(de)serializeHelperˋ is not a good idea.
Re: Show HN: Minum – A minimal Java web framework
#34Earlier quoted context omitted.
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'…
> The real nice thing about Java is everything is statically typed Optional and generics would like a word... Edit: OK, since this got a downvote, let me be clearer, with some help from the parent: You just use Optional , and if you're lucky some of your dependencies BUT NOT ALL OF THEIR TRANSITIVE DEPENDENCIES also use Optional correctly and don't return null, and before you know it you've lost the nice safety and i…
I wish Java had had non nullable types as default from the getgo, and it's hard to add now for the same reason JS/PY have a hard time adding static typing
Re: Show HN: Minum – A minimal Java web framework
#35Earlier quoted context omitted.
I have never ever ever seen a null inside an Optional -- the most common constructor actually Optional::ofNullable makes the correct decision, so you can't even fck it up, and if you deliberately try to, I'm sure intellij would scream your head off.
The problem is whether the optional itself is null, not whether the contained value is.
Re: Show HN: Minum – A minimal Java web framework
#36Earlier 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.
One suggestion I have would be to include a very minimal implementation of login management (basically just properly hash/salt passwords and provide some easy way to add users). I've used Django before for the sole reason that it includes a database and user management because some API had to be login only since said API had high resource usage. I can see how having your own database is kind of "minimal" in the Java…
https://github.com/byronka/minum/blob/master/src/test/java/c...
Re: Show HN: Minum – A minimal Java web framework
#37That said, if you want to cash even more on minimalism, you may want to provide a single-file example using JBang[0].
[0]. https://jbang.dev/
Re: Show HN: Minum – A minimal Java web framework
#38Congratulations. I believe there is room for a micro framework that is smaller than Javalin or SparkJava. That said, if you want to cash even more on minimalism, you may want to provide a single-file example using JBang[0]. [0]. https://jbang.dev/
Re: Show HN: Minum – A minimal Java web framework
#39Earlier quoted context omitted.
here’s a more realistic example: https://github.com/byronka/minum_usage_example_mvn/blob/d649...
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.
1. minimalism 2. ease of use
It's an uneasy balance. I am well aware of the value of fully-powered templating engines.
Re: Show HN: Minum – A minimal Java web framework
#40[flagged]
Yeah if I wanted to write for a JVM, I'd use kotlin
Basically the same thing as Minum, but in Kotlin.