News for hackers. Stuff that matters.

javalin

Re:Creating a Google Docs clone with WebSockets on Tuesday April 24, 2018 @03:32AM (#16910636)
Well, I agree. The title was originally just `realtime-collaboration-example` (as the URL says), but someone said "like google docs then", and I thought why not. If I had to name just one feature of google docs it would be the shared document.

Edit: Also, the HN title was edited by a HN mod, the title I used to post here was "Show HN: Basic Google Docs clone in Kotlin with WebSockets (tutorial)"

Re:Creating a Google Docs clone with WebSockets on Tuesday April 24, 2018 @03:28AM (#16910620)
I added both links, thanks!
Re:Creating a Google Docs clone with WebSockets on Monday April 23, 2018 @06:34PM (#16908106)
To the mod that removed the "Show HN" tag, could you explain why? I don't really mind, I just want to understand. This isn't a blog-post, and it contains source code that can be tried out. It's also for a library/framework that I'm making, so to me it feels like I'm doing a "show".
Re:Show HN: Simple WebSocket server for Kotlin/Java/JVM on Friday September 22, 2017 @07:48AM (#15311260)
Feedback welcome. Implementation is done in Java in order to get good interop (this has a lot of SAM interfaces).
Re:Show HN: cookieStore concept added in Javalin 0.5.0 on Saturday September 09, 2017 @08:23AM (#15206758)
As always, feedback would be appreciated.
Re:Show HN: Kotlin-tutorial for securing a REST API on Sunday August 27, 2017 @10:43AM (#15110971)
I recently finished writing a tutorial on using the AccessManager interface in Javalin (https://javalin.io/documentation#access-manager).

I haven't seen auth solved this way in any other library/framework, so it would be great to get some feedback (both on the tutorial, and the concept of the AccessManager interface itself).

Feedback would be appreciated!
I made some major changes to the API this week, moving from (req, res) -> {} to ctx -> {}. Would love some feedback.
Got some good feedback here last time, so posting again. I rewrote the library to Kotlin, but I had to leave a few things java, mainly the SAM interfaces and the Javalin class iteself. This had to be done due to limitations in Kotlin (https://youtrack.jetbrains.com/issue/KT-14151, https://devnet.jetbrains.com/thread/461516)

The rest of the library will be ported to Kotlin if this issue is resolved, or and alternative solution is discovered.

I guess the biggest change for Kotlin devs is that Request and Response are now Kotlin.

Feedback/criticism is welcome!

Re:Show HN: Javalin, a Java/Kotlin REST API Framework on Sunday May 28, 2017 @09:17PM (#14436883)
> but what reasons would I want to consider Javalin?

I'm not really trying to convince devs whose main language is Kotlin to use Javalin, it's made more for Java devs and Java devs who are looking to switch to Kotlin.

That being said..! Ktor Hello World example isn't very pretty, and I can't find the docs. All I found was a mostly empty wiki. Where are the official docs?

By the way, pull-requests for other embedded servers would be very welcome in Javalin.

Re:Show HN: Javalin, a Java/Kotlin REST API Framework on Sunday May 28, 2017 @06:42PM (#14436411)
Good question. I'm Norwegian, and I always pronounce it "ya-va-lin" when I talk about it in Norwegian. Let's say that's the official pronunciation.
Re:Show HN: Javalin, a Java/Kotlin REST API Framework on Sunday May 28, 2017 @02:05PM (#14435419)
Thanks, this is good feedback. I'm still at the stage where I'm "writing Java in Kotlin".
Re:Show HN: Javalin, a Java/Kotlin REST API Framework on Sunday May 28, 2017 @02:02PM (#14435406)
Thanks for spotting that, fixed.
Re:Show HN: Javalin, a Java/Kotlin REST API Framework on Sunday May 28, 2017 @11:58AM (#14434851)
There's a difference between just being compatible and nice to work with. Javalin is being developed with Kotlin in mind. I'm a Java dev who wants to transition to writing Kotlin, but most companies are not very eager to make the switch. Javalin is intended to help ease this transition.
Re:Show HN: Javalin, a Java/Kotlin REST API Framework on Sunday May 28, 2017 @08:42AM (#14434167)
I should probably create a comparison chart, but in short:

Javalin has no static API, and no concept of "Routes and Filters". In spark Routes have a return value, in Javalin you just have "Handlers" which operate on the request and response. Javalin can do automatic object-mapping to and from json, and has lifecycle events.

Javalin has a built in mechanism for auth (AccessManager)

Javalin has no WebSocket support, and doesn't do static file handling (it leaves this to the embedded server). Javalin runs before-handlers before static files, Spark does not.

Javalin has a fluent api.

Javalin is implemented as a servlet, not a filter.

After-handlers are run after everything (even in case of exceptions), (Spark has after-after filters).

There are many more small differences. I'm one of the maintainers of Sparkjava. Javalin is the result of using Spark daily for the past two years, fixing minor annoyances and including new concepts I would find myself implementing over and over again.

Older »