Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    David (javalin.io)
    @tipsy
    yes, but jackson is more or less an industry standard
    Ralph J. Steinhagen
    @angrond:matrix.org
    [m]
    πŸ‘οΈ I see. In any case, it's good that one can replace the default json (de-)serialiser in Javalin if needed.
    David (javalin.io)
    @tipsy
    that is already possible in the current version !
    Ralph J. Steinhagen
    @angrond:matrix.org
    [m]
    Yes, I know. We make use of that already. :-)
    David (javalin.io)
    @tipsy
    then do you have any opinion on it being an Object or a Class ?
    Ralph J. Steinhagen
    @angrond:matrix.org
    [m]
    😬 a possibly opinionated topic: I do see/understand both positions (pros/cons of singleton-pattern: unit-testing, hidden dependencies etc.), also know about the baked-in Java language bias that forcefully favours object-oriented design, but struggle myself whenever we need to decide on a user-side API. For what it's worth KISS: 'keep it simple and safe' and that you feel most comfortable with w.r.t. maintenance, technical burden, and don't be afraid to (gracefully) break the API if this helps your goals ... but take this with a large pinch of salt since I am probably not representative for the larger Java/Kotlin dev-community ...
    David (javalin.io)
    @tipsy
    i've kept it because i viewed it as simpler to maintain, but i noticed it was being abused in javalin's own modules (and tests)πŸ˜…
    i don't like the added complexity that comes from passing it around, but i think maybe it's better.. i'll leave the PR up for a bit
    Ralph J. Steinhagen
    @angrond:matrix.org
    [m]
    '[..] simpler to maintain [..]' is a valid and important point. I recently tend to go more towards a 80/20-approach with not incorporating every neat or useful functionality but just the hard bits that 80% (perhaps 90%) of the user base really need and to leave the rest to the specific user-implementation or secondary libraries .. also, otherwise it's hard to get a good overview of the different use-cases and domains that are often different to our own ...
    Ralph J. Steinhagen
    @angrond:matrix.org
    [m]
    I like the JsonMapper interface. I wonder whether in addition to String one might consider also/or StringBuilder, stream, or something similar to avoid having to generate always new immutable strings (one of the reasons why many Java json libs are slow...). But would probably break the API towards Jetty ...
    David (javalin.io)
    @tipsy
    towards jetty?
    there is a separate ticket for Context#jsonStream
    3 replies
    if you want to stream directly to the client?
    David (javalin.io)
    @tipsy
    @here please consider filling out this short survey on how you use javalin: https://forms.gle/NNLZRDJm3aTVDSp76 :heart:
    Tareq Kirresh
    @TareqK
    Done :D
    David (javalin.io)
    @tipsy
    πŸ™
    Mihael Berčič
    @MihaelBercic
    Hello!
    @tipsy can javalins WebSockets be also used to connect to other servers?
    David (javalin.io)
    @tipsy
    @MihaelBercic no, javalin is stricly a server project
    Mihael Berčič
    @MihaelBercic
    i see, thank you very much!
    David (javalin.io)
    @tipsy
    there are some websockets tests that do use a websocket client (to test the websocket server), you can look a those if you need some inspiration on how to write a websocket client
    David (javalin.io)
    @tipsy
    there is a PR up for a brackets based routing engine that is about to be merged: tipsy/javalin#831
    in short:
    /base/* all paths that start with /base/, but not /base/ itself
    /base-** all paths that start with base-, and also base- itself
    /base-<param> all paths that start with base-, param extractable, param can contain slashes
    /base-{param} all paths that start with base-, param extractable, param can't contain slashes
    /base-<param>-end all paths that start with base- and end with -end, param extractable, param can contain slashes
    /base-{param}-end all paths that start with base-, and end with -end param extractable, param can't contain slashes
    David (javalin.io)
    @tipsy
    @here alpha 4 is live (with new routing), please try it out https://javalin.io/news/javalin-4-development-updates#400alpha4-15th-of-july
    David (javalin.io)
    @tipsy
    rough migration guide for 3-4: https://javalin.io/migration-guide-javalin-3-to-4
    Matt Langsenkamp
    @MattLangsenkamp
    I am trying to specify that an endpoint returns with Content-Type: application/zip using the OpenAPI plugin but cannot seem to figure out how from the documentation
    return OpenApiBuilder.document()
    .operation(openApiOperation -> {
    openApiOperation.description("Draw PDF");
    openApiOperation.summary("send pdf and get zip file of pdf back");
    openApiOperation.deprecated(false);
    })
    .uploadedFile("pdf")
    //.result("200", oneOf(
    // documentedContent("")
    //))
    .html("200");
    this is what i have so far
    David (javalin.io)
    @tipsy
    @here i've finally made a sponsors page - let me know what you think of it (anything i should change?) - https://github.com/sponsors/tipsy
    David (javalin.io)
    @tipsy
    @here the first javalin 4 release candidate is out - https://javalin.io/news/javalin-4-release-candidate
    please try it out and report any bugs
    t101
    @t101
    i have a javalin application that has static file hosting, a fairly big rest api, and websockets. trying to update it to http2 and have encountered the reported bugs and i'm wondering if there are work arounds that aren't "use http1.1 for everything" / wondering when javalin will support jetty 10/11?
    also notice that the WS protocol change seems to be working fine in firefox but not chrome.
    i am ok with leaving the WS using http1.1 and using http2 for the rest (har-har), but how to do that is eluding me right now
    David (javalin.io)
    @tipsy

    wondering when javalin will support jetty 10/11?

    javalin 5

    also notice that the WS protocol change seems to be working fine in firefox but not chrome.

    we haven't had any reports on this before

    t101
    @t101
    I'm using firefox 78.12.0esr (extended support release) which might have something to do with it. but, I notice that chrome just sits there failing the same request over and over, but the first several WS request fail in FF, and then one passes with a 101 status and everything seems to work after that. and it looks like it's serving the http1.1 WS over the secure socket and w/the proper certs etc
    maybe I'm just doing something really dumb
    not really sure what info you'd want, and tbh if you're upgrading to jetty10 relatively soon, this doesn't impact me at all. I'll try out RC for 4 later this week
    t101
    @t101
    are there other work arounds for http2 w/websockets?
    David (javalin.io)
    @tipsy

    and tbh if you're upgrading to jetty10 relatively soon, this doesn't impact me at all

    it won't be for another year or so

    put something in front of javalin?
    t101
    @t101
    it's running on intranet so it shouldn't matter too too much.
    but yes, that is the idea :) thank you
    David (javalin.io)
    @tipsy
    @/all first version of v4 docs are live, let me know if something seems strange: https://javalin.io/future-documentation
    David (javalin.io)
    @tipsy
    @/all the second javalin 4 release candidate is out - https://javalin.io/news/javalin-4-release-candidate#400rc1-17th-of-august
    please try it out and report any bugs
    khangaikhuu
    @khangaikhuu
    Hello. I'm new to javalin. I try to get queryParam like ....&ids=1,2,3 as queryParamMap. Is there any method, which converts into INT[] ids. I tried to use queryParamsMap(). it does not give me what I expect. How to handle query param array in Javalin in best way?
    David (javalin.io)
    @tipsy
    You'll have to map it to ints manuals
    David (javalin.io)
    @tipsy
    manually'
    David (javalin.io)
    @tipsy
    khangaikhuu
    @khangaikhuu
    @tipsy thank you.
    David (javalin.io)
    @tipsy
    you're welcome !