4 ms·
If you're interested in a Guicier 'framework' inspired by Dropwizard, take a look at GWizard... https://github.com/gwizard/gwizard https://github.com/gwizard/gw
by latchkey 12y ago
If you're interested in a Guicier 'framework' inspired by Dropwizard, take a look at GWizard... https://github.com/gwizard/gwizard https://github.com/gwizard/gwizard
- e12e 12y agoHm, looks like I can find examples of using kotlin with guice, and kotlin with dropwizard, but no examples of kotlin with gwizard... After recently looking at java8 and alternatives, I've tentatively come to the conclusion that I'm rather happy to use kotlin for stuff that needs to be (almost) java (eg: Android, or just mapping closely to java, eg: dropwizard?) -- and clojure for everything where java feels too constrained (but where perhaps performance isn't much of an issue). For myself, I don't see much use for scala -- it feels too complex, and in many ways less powerful than clojure. Note that I don't have any legacy java/jvm code, and so I probably just use ocaml or even standard ml where others might reach for scala. Perhaps kotlin doesn't make much sense wrt dropwizard -- it might make more sense to just stick with java for dw, and use something different if one wants something higher level? Anyway, some related links I've come across googling a bit: clojure+dropwizard (example, with leiningen): https://github.com/stevensurgnier/dropwizard-clojure https://github.com/stevensurgnier/dropwizard-clojure Experimental (old) repo for dropwizard+kotlin: https://github.com/arteam/kotlin-dropwizard https://github.com/arteam/kotlin-dropwizard Combining kotlin and guice: http://java.dzone.com/articles/kotlin-guice-example http://java.dzone.com/articles/kotlin-guice-example
- doomspork 12y agoI've been using Kotlin and Dropwizard together and I quite enjoy it. To demonstrate Kotlin recently for a friend I used the Dropwizard Getting Started: https://github.com/doomspork/kotlin-dropwizard https://github.com/doomspork/kotlin-dropwizard My plan is to add more to it and eventually cover all the features of Dropwizard.
- pron 12y agoI find Kotlin+Clojure (or Java+Clojure) to be a winning combination, too.
- nobullet 12y agoI also love Ninja Framework for support of the Guice: http://www.ninjaframework.org/ http://www.ninjaframework.org/
- rckenned 12y agoInteresting, I'd never seen this. For what it's worth, early Dropwizard versions used Guice heavily. We yanked it out because we found the indirection of dependency injection wasn't buying us much. Subsequently, others have put it back in through the use of modules (i.e. https://github.com/HubSpot/dropwizard-guice https://github.com/HubSpot/dropwizard-guice).
- latchkey 12y agoI won't repeat what is here: https://github.com/gwizard/gwizard#whats-wrong-with-dropwizard-isnt-there-a-guice-module-for-dw https://github.com/gwizard/gwizard#whats-wrong-with-dropwiza... In order to make this reply have a bit more substance than just a link, the idea of using Guice is pretty neat if you think about unit testing your code. Instead of letting the container (jetty) instantiate the webapp, let Guice do it. This means that you can run tests without firing up the container. In other words, no need to test through the http layer by making requests to a web server. Additionally, by removing a rather large layer of code, tests run much faster. Instead, now you write your tests directly against your Resource class methods (yea static compiled code!). Building up routes, query strings and POST requests is a thing of the past. No need to mock your data layer either since you can test against a real in-memory database. Here is an example of what I'm talking about: https://github.com/gwizard/gwizard-example/blob/master/src/test/java/com/example/app/resource/ThingsResourceTests.java https://github.com/gwizard/gwizard-example/blob/master/src/t...