News for hackers. Stuff that matters.
Re:Dropwizard 0.8.0: Java framework for ops-friendly, high-p... by latchkey on Sunday March 08, 2015 @10:57PM (#9168722)
If you're interested in a Guicier 'framework' inspired by Dropwizard, take a look at GWizard... https://github.com/gwizard/gwizard
Re:Dropwizard 0.8.0: Java framework for ops-friendly, high-p... by e12e on Monday March 09, 2015 @12:40AM (#9169113)
Hm, 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

Experimental (old) repo for dropwizard+kotlin:

https://github.com/arteam/kotlin-dropwizard

Combining kotlin and guice:

http://java.dzone.com/articles/kotlin-guice-example

Re:Dropwizard 0.8.0: Java framework for ops-friendly, high-p... by doomspork on Monday March 09, 2015 @01:05AM (#9169219)
I'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

My plan is to add more to it and eventually cover all the features of Dropwizard.

Re:Dropwizard 0.8.0: Java framework for ops-friendly, high-p... by pron on Monday March 09, 2015 @02:37AM (#9169527)
I find Kotlin+Clojure (or Java+Clojure) to be a winning combination, too.
Re:Dropwizard 0.8.0: Java framework for ops-friendly, high-p... by nobullet on Monday March 09, 2015 @12:57AM (#9169184)
I also love Ninja Framework for support of the Guice: http://www.ninjaframework.org/
Re:Dropwizard 0.8.0: Java framework for ops-friendly, high-p... by rckenned on Tuesday March 10, 2015 @12:11AM (#9175981)
Interesting, 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).
Re:Dropwizard 0.8.0: Java framework for ops-friendly, high-p... by latchkey on Tuesday March 10, 2015 @12:25AM (#9176018)
I won't repeat what is here: 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/t...