Readit News logoReadit News
iammiles · 3 years ago
I 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 little fuss.

tipsee · 3 years ago
Hey, thank you for using it. Single-page docs are also my favorite, and Javalin/jdbi/SQLite is my goto for quick stuff!

> but with a very persistent project manager

Your partner? :D

iammiles · 3 years ago
Yep! At least they didn't mind when I was drinking on the job.
Scarbutt · 3 years ago
I can see how DI will be overkill for a wedding website and Javalin/jdbi/sqlite is more than enough but for most business applications written in Java you really wish you had started with DI. Any DI libs you recommend for working with Javalin?
asadawadia · 3 years ago
For anyone who wants to get started with this stack you can do `git clone https://gitlab.com/asad-awadia/kotlin-server-app.git` to get a full maven project with javalin, sqlite with ktorm and jdbi everything setup
peanut_worm · 3 years ago
just wondering, what did you use SQLite for on a wedding website?
iammiles · 3 years ago
Similar to other use cases mentioned already, it was a way for us to create a privacy-focused site to manage guests and give guests the opportunity to update their RSVP, dietary needs, and requested song for the DJ. Additionally there were a few sections of the site where my fiancée could update content as she saw fit by logging in and hitting save. We found the database useful to keep track of RSVPs, gifts, and who we still needed to send thank you's to after the event.

The main drawbacks were people who are not comfortable using the web and people remembering their unique adjective-noun passphrase. Also, I'm not very savvy when it comes to CSS or design so my giddiness was crushed demoing what I thought was the MVP to the "project manager".

I don't want to detract this from being about Javalin though. It's fantastic. I would recommend it and use it again for projects.

javajosh · 3 years ago
It's been SOP for some time (at least 20 years) to use an RDBMS to store your site's content and write a stateless application server to pull data from it and compose a response. Call it the "CMS pattern".

Static site generation, and a few other ideas, challenges this basic pattern, but most of the worlds applications use it. Javelin is trying to make the pattern better on several axes, simplicity first-and-foremost, and not replace it.

yobert · 3 years ago
I used PostgreSQL for my wedding website. People could RSVP, say how many were coming, volunteer for support roles since we did too much of it ourselves, etc.

It was overkill and I loved it.

samatman · 3 years ago
For a website, the question should be why not use SQLite.

Given the various compelling and (by now, here, I hope) well-understood advantages, it should be the default choice. Certainly for a site expecting hits in the mid-hundreds, total. Maybe ten simultaneous connections the day of?

freedomben · 3 years ago
This looks great! I did Java professionally for years but when all the jobs moved to EE I bailed for Ruby/Rails and similar. Java the language I've always really enjoyed. It's the frameworks and hundreds of design patterns that repelled me. I felt like they were all needlessly complex. If frameworks like this one were more common in Java world, I may never have left.

This looks really nice! I wish more Java devs approached things with KISS and simple in mind, rather than looking at every problem as a way to apply some obscure design pattern that involves 15 levels of abstraction and indirection for a relatively simple microservice.

adamredwoods · 3 years ago
I just started using this! Spring Boot seemed so convoluted, having to go to a website to even begin. And then to have the Tomcat dependency seemed like a heavy lift just to get a "hello world" working. Virtual threads seems to be the way to go.

Virtual threads in Java 19: https://www.infoq.com/articles/java-virtual-threads/

dopidopHN · 3 years ago
Excellent resource on virtual thread by one of the authors! Thanks.

I have to see I’m pleased to see Java moving fast those days.

I’m still digesting 17 and 18, but that give me a reason to look at 19.

I honestly project loom was far from reaching that level of “standardness” … so I haven’t looked into it in years

dang · 3 years ago
Related:

Show HN: Javalin 1.0 – A Kotlin/Java web framework - https://news.ycombinator.com/item?id=15644430 - Nov 2017 (87 comments)

Show HN: Javalin, a Java/Kotlin REST API Framework - https://news.ycombinator.com/item?id=14434089 - May 2017 (21 comments)

tipsee · 3 years ago
The good old days!
moralestapia · 3 years ago
Congratulations! This is great!

Java deserves its comeback among the wave of nu-programming we are going through.

tasuki · 3 years ago
> Java deserves its comeback among the wave of nu-programming we are going through.

What is nu-programming? And why would Java deserve a comeback?

moralestapia · 3 years ago
>nu-programming

I made that one up.

>And why would Java deserve a comeback?

Java is an extremely mature piece of technology, and having used it on the enterprise, I can attest that few things come close on flexibility and stability. Also, functional languages on top of the JVM (clojure, kotlin, scala) are very interesting on their own. Java deserves some love from this new wave of paradigm changes like "write-once-run-anywhere" v2.0, monadic programming, serverless functions, etc...

stefs · 3 years ago
you can also use it with kotlin
davidoniumz · 3 years ago
I 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.

tdudzik · 3 years ago
JDBI also could be really nice as a minimalistic layer for a db access
cies · 3 years ago
Congrats on the release! I reviewed Javalin lately and it was high on my list. We use quite a bit of Kotlin and look for a framework. I really dislike the magic that annotations bring to most popular Java frameworks (and Hibernate). I prefer most is just code". Kotlin helped us a lot in making our code more type safe, especially the KProperty way of referring to methods made a difference.

Though I ended up leaning towards KTor, with Javalin as a close second.

How would anyone with more knowledge compare the two (Javalin and KTor)?

binkHN · 3 years ago
> ...would anyone with more knowledge compare the two (Javalin and KTor)?

I'd love to hear more on this as well. While I've done some minor stuff with Ktor, because JetBrains, I too would love some insight related to these as well.

didip · 3 years ago
Javalin is the bomb! I don’t know why Java community likes to make things complicated.
takoid · 3 years ago
“An idiot admires complexity, a genius admires simplicity, a physicist tries to make it simple, for an idiot anything the more complicated it is the more he will admire it, if you make something so clusterfucked he can't understand it he's gonna think you're a god cause you made it so complicated nobody can understand it. That's how they write journals in Academics, they try to make it so complicated people think you're a genius.” - Terry A. Davis
robertlagrant · 3 years ago
Would prefer if this were worded more simply.
manishsharan · 3 years ago
I like Jetty. Javalin is nice for Kotlin but Jetty + java has worked well for me.
Scarbutt · 3 years ago
What do you use for routing and DI? do you use Jetty handlers or the servlet API?