Live data from Hacker News

Show HN: I finished v5 of a JVM framework I've spent spent half a decade making

javalin.io

101–110 of 139 posts

Re: Show HN: I finished v5 of a JVM framework I've spent spent half a decade making

#101
post #71

Earlier quoted context omitted.

Yes, disagree on needing a library. The way your comment was worded made it seem to me like you were saying all serious Java applications need a DI library, I'm sorry if I misunderstood you. I prefer doing my ID manually, so no recommendation :)

Could you be more explicit, perhaps with an example? Do you simply mean you prefer function/constructor parameters over DI?

Calling a constructor is DI. ‘new’ is the only DI framework required.

Benefits:

Unbelievably fast startup time

No magic

No annotations, XML or YAML required

No classpath scanning related security vulnerabilities

Conpletely deterministic

In no other language is ‘calling a constructor’ considered so complicated a framework is required.

Try it!

Re: Show HN: I finished v5 of a JVM framework I've spent spent half a decade making

#102

Earlier quoted context omitted.

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?

Interesting, I interpreted the question completely differently, i.e. why use database at all? FWIW, I'm not in the web app world, so my wedding website was a single page HTML; not a single page app, let alone a content management system - I googled something like "Wedding page HTML template", then grabbed a HTML template from w3schools, opened it in notepad, and put my own words and IMG tags. It looked pretty, was "r…

"Because my website is just pages and doesn't need a database" is a perfectly good reason not to use SQLite, sure.

OP can reply why a database was useful for his wedding site, if he wants; I can think of some reasons why it might be.

Re: Show HN: I finished v5 of a JVM framework I've spent spent half a decade making

#104
Looks interesting!

One question about the response methods: If I would be using something like `ctx.result(inputStream)` - would it block the [lightweight] thread until all data is written. Or would the handler return and the data transfer happen in the background?

One use-case I've only see marginally addressed in some frameworks is being able to run code past the point where all data is written - e.g. to record logs and metrics around the outcome of a request - e.g. whether the client hung up or all data was stored in socket buffers. If sending the result "blocks", that kind of code can be added naturally with a try/finally block around it.

As far as I understand the docs, it might not block, but one might be able to install an "After" handler? Or would that also only run before the response is actually sent?

Re: Show HN: I finished v5 of a JVM framework I've spent spent half a decade making

#106

Earlier quoted context omitted.

Could you be more explicit, perhaps with an example? Do you simply mean you prefer function/constructor parameters over DI?

Calling a constructor is DI. ‘new’ is the only DI framework required. Benefits: Unbelievably fast startup time No magic No annotations, XML or YAML required No classpath scanning related security vulnerabilities Conpletely deterministic In no other language is ‘calling a constructor’ considered so complicated a framework is required. Try it!

It took me a hot moment to adjust after leaving classic spring Java land to a Scala shop that doesn’t use DI framework, but now I love it. I agree with what you said.

It does help to keep services small so the manual DI arg passing doesn’t get too spread out and boilerplate-y. But I have worked on a dozen services here and don’t miss an automatic DI framework.

Re: Show HN: I finished v5 of a JVM framework I've spent spent half a decade making

#107

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 lit…

just wondering, what did you use SQLite for on a wedding website?

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.

Re: Show HN: I finished v5 of a JVM framework I've spent spent half a decade making

#108

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 lit…

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

Re: Show HN: I finished v5 of a JVM framework I've spent spent half a decade making

#109
Looks nice. Does it support hot reload? We use Quarkus heavily at work and one of the nifty feature is its ability to hot reload (fast restart to be specific) within few millisec, which makes our development quite a joy, kind of spoiled by that to be honest. If not now, any plan to support it in future?

Re: Show HN: I finished v5 of a JVM framework I've spent spent half a decade making

#110
post #3
post #2

This is Javalin and it is great. We switched to it a few months ago from another micro-framework.

Indeed it is! May I asked what you switched from?

I'll guess and say Spark.

Not the big data Spark. This one: sparkjava.com

A nice piece of work in its own right.

Post reply on HN