News for hackers. Stuff that matters.
Re:HTTP+JSON Services in Modern Java by Cyranix on Friday March 01, 2013 @07:59PM (#5307940)
Thanks for the introduction to Twitter Commons! I've used Dropwizard in the past and loved it. It seems like the shared libraries of both frameworks -- Jetty, Jersey, and Jackson -- provide them with an equally strong foundation. Guice seems to be provided by default in Twitter Commons whereas it's provided via a separate module in Dropwizard, so that's more or less another commonality between them. Can anyone describe differences or pros/cons between using these two frameworks? (Similarly, who was being referenced in the phrase "an opinionated framework that forces certain patterns on you")?
Re:HTTP+JSON Services in Modern Java by tknaup on Saturday March 02, 2013 @01:15PM (#5310382)
Dropwizard wasn't around yet when we built our first service.

I'm not referencing any particular framework, but Rails is an example. Recently the Rails team has done a lot to modularize it too though.

Re:HTTP+JSON Services in Modern Java by reissbaker on Saturday March 02, 2013 @05:25AM (#5309135)
I can't speak for Tobi, but my guess is he was talking about Rails. DHH isn't coy about having strong opinions.
Re:HTTP+JSON Services in Modern Java by mintplant on Friday March 01, 2013 @10:49PM (#5308380)
This would be a far better article if it was interwoven with actual code examples. Otherwise, you'd have to switch back and forth between a copy and their code and the blog page to actually grok what they're talking about.
Re:HTTP+JSON Services in Modern Java by sandGorgon on Friday March 01, 2013 @11:05PM (#5308413)
Could you talk about how you're deploying these services. Coming from passenger world, I found jetty deployment to be a bit complex.

are you using maven, etc.? I would be very interested to find out how a ruby centric dev shop is handling Java deployments and builds.

P. S. how about mocks and testing?

Re:HTTP+JSON Services in Modern Java by csense on Saturday March 02, 2013 @08:16PM (#5312023)
Please, if you're starting a new Java project, and have any say at all in the build process, don't use Maven. Go with Ant. You'll thank yourself later, and anyone else who ever has to build the project will also thank you.

Personally, I can't begin to describe the awfulness of Maven in words. I'd sooner use makefiles and shell scripts, or manually type in build commands written in pen on a stack of notecards.

But you don't have to take my word for it; here's an SO discussion about how much Maven sucks:

http://stackoverflow.com/questions/861382/why-does-maven-hav...

Re:HTTP+JSON Services in Modern Java by sandGorgon on Saturday March 02, 2013 @11:24PM (#5312516)
interesting - so did you decouple dependency management from tge build process and still use maven/ivy for that part?
Re:HTTP+JSON Services in Modern Java by tknaup on Saturday March 02, 2013 @01:21PM (#5310403)
This would be another blog post by itself. In short: build a fat jar with maven, package with arx, run with runit.

Most projects use Junit and Easymock.

Re:HTTP+JSON Services in Modern Java by PascalW on Saturday March 02, 2013 @07:54AM (#5309354)
I work in a Ruby + Java shop and we do Java deployments with maven + nexus + capistrano. Works like a champ.

I'll see if I have some time to write a blogpost about it.

Re:HTTP+JSON Services in Modern Java by sandGorgon on Saturday March 02, 2013 @09:46AM (#5309606)
that would be great ! do talk about which app server (tomcat, jetty, etc.)
Re:HTTP+JSON Services in Modern Java by keefe on Friday March 01, 2013 @11:06PM (#5308416)
jetty is best deployed embedded
Re:HTTP+JSON Services in Modern Java by frncscgmz on Friday March 01, 2013 @07:37PM (#5307859)
I've build REST applications in Java using the Restlet library before, anyone knows some of the advantages of Jersey over Restlet?
Re:HTTP+JSON Services in Modern Java by avelis on Saturday March 02, 2013 @12:39AM (#5308608)
I haven't played with Restlet. From my experience Jersey's magic sauce is its annotations. Jersey's featured set of annotations can allow for expressive source code. Basically I can create and define my API with less boilerplate source code.
Re:HTTP+JSON Services in Modern Java by neuronotic on Monday March 04, 2013 @06:51AM (#5317774)
Did anyone have success at getting this to work? I'm getting this error:

com.twitter.common.application.AppLauncher exit

SEVERE: Failed to apply arguments

java.lang.IllegalArgumentException: Failed to parse:

app_class - No parser found for java.lang.Class<? extends com.twitter.common.application.Application>

Re:HTTP+JSON Services in Modern Java by ElectronPusher on Saturday March 02, 2013 @03:11AM (#5308927)
Minor gripe, but a list seems wrong for that usage. A map or set seems more appropriate.

Referring to: https://github.com/airbnb/twitter-commons-sample/blob/master...

Re:HTTP+JSON Services in Modern Java by rshm on Friday March 01, 2013 @07:47PM (#5307896)
404 here.
Re:HTTP+JSON Services in Modern Java by Terretta on Saturday March 02, 2013 @04:29PM (#5311153)