this is very cool. quick question though - do u have a gradle build setup ? im new to java and saw this problem on spring boot. That you needed to have this bunch of complex directory structures cos of the way java packages worked. for e.g. the test directories were parallel to the src directory, so they could be named with the same package name. for a single file...i can just run java. but it would be nice to see a…
Show HN: I finished v5 of a JVM framework I've spent spent half a decade making
31–40 of 139 posts
Re: Show HN: I finished v5 of a JVM framework I've spent spent half a decade making
#32Thank you!
Congratulations on the major release and keep up the good work.
Re: Show HN: I finished v5 of a JVM framework I've spent spent half a decade making
#33I just wanted to say thank you for your work. The straightforward docs are some the best in my opinion when you want to go from "How do I do ..." to answer. I ended up using Javalin with Kotlin and SQLite to build my wedding website. Most of my projects are lucky to see the light of day, but with a very persistent project manager and a simple lightweight framework, I was able to ship a fantastic product with very lit…
> but with a very persistent project manager
Your partner? :D
Re: Show HN: I finished v5 of a JVM framework I've spent spent half a decade making
#34I successfully used Javalin in a project using Kotlin + Koin for dependency injection + jOOQ for database access. Was a joy to setup and work in that project. Thank you! Congratulations on the major release and keep up the good work.
Re: Show HN: I finished v5 of a JVM framework I've spent spent half a decade making
#35Re: Show HN: I finished v5 of a JVM framework I've spent spent half a decade making
#36I find that hello world example very pleasant to look at. Love that it's effectively a one-liner. public static void main(String[] args) { var app = Javalin.create(/*config*/) .get("/", ctx -> ctx.result("Hello World")) .start(7070); }
Re: Show HN: I finished v5 of a JVM framework I've spent spent half a decade making
#37Re: Show HN: I finished v5 of a JVM framework I've spent spent half a decade making
#38Earlier quoted context omitted.
Seems to compile fine here, what's the issue? Edit: I was looking at the wrong snippet, the offending snippet has been fixed.
Huh, I wonder what's different with my setup. I would need to put curly braces around that closure before it would compile, i.e: .get("/", { ctx -> ctx.result("Hello World") }) Closures defined only by the arrow are a Java thing... or so I thought. :D
In fairness, I think you did copy the Java version. There's a little switch in the code boxes where you can toggle the language, if you switch to Kotlin you get the version with trailing closures :)
Edit: I'm an idiot, I see the snippet you mean now. It's been updated now, give it a minute.
Re: Show HN: I finished v5 of a JVM framework I've spent spent half a decade making
#39Earlier quoted context omitted.
Seems to compile fine here, what's the issue? Edit: I was looking at the wrong snippet, the offending snippet has been fixed.
Probably not used to seeing lambdas inside of parens: .get("/", ctx -> ctx.result("Hello World")) Could also be written as .get("/") { ctx -> ctx.result("Hello World") } The second form seems much more common in Kotlin.
Re: Show HN: I finished v5 of a JVM framework I've spent spent half a decade making
#40Earlier quoted context omitted.
Huh, I wonder what's different with my setup. I would need to put curly braces around that closure before it would compile, i.e: .get("/", { ctx -> ctx.result("Hello World") }) Closures defined only by the arrow are a Java thing... or so I thought. :D
> Closures defined only by the arrow are a Java thing... or so I thought. :D In fairness, I think you did copy the Java version. There's a little switch in the code boxes where you can toggle the language, if you switch to Kotlin you get the version with trailing closures :) Edit: I'm an idiot, I see the snippet you mean now. It's been updated now, give it a minute.