Earlier quoted context omitted.
There's quite a bit of magic under the hood of DropWizard (or, rather, the components that make it up). My experience has been that a developer using DropWizard will rarely, if ever, encounter this magic: they don't need to be aware of it. But if the veil ever slips, the sheer amount of ugly machinery will shock and horrify.
I can see that. We found that if we added the Spotify Docker Client to our test classpath we couldn't run the application from Eclipse anymore because our Jackson object mapper had the wrong Jersey modules. This was because that package depends on a different version of jersey-jackson or whatever, which was discovered by classpath scanning, and so because Eclipse doesn't keep a separate test classpath, we'd be discov…
Java REST framework Dropwizard 1.0 released
71–80 of 88 posts
Re: Java REST framework Dropwizard 1.0 released
#72Earlier quoted context omitted.
Couldn't agree more. REST is just a very leaky abstraction layer, when what you really want is RPC, with some reusable / composable typed models.
I don't know, RPC is declaring for no abstraction at all, just raw access to code that can do anything. REST provides strong abstractions, they are just slow, and to make the app fast we have to compromise them. But that's the same for relational databases and ORM; I think really REST isn't the problem, but instead SQL. And RPC is like writing bits with butterflies.
Re: Java REST framework Dropwizard 1.0 released
#73Earlier quoted context omitted.
There's quite a bit of magic under the hood of DropWizard (or, rather, the components that make it up). My experience has been that a developer using DropWizard will rarely, if ever, encounter this magic: they don't need to be aware of it. But if the veil ever slips, the sheer amount of ugly machinery will shock and horrify.
I can see that. We found that if we added the Spotify Docker Client to our test classpath we couldn't run the application from Eclipse anymore because our Jackson object mapper had the wrong Jersey modules. This was because that package depends on a different version of jersey-jackson or whatever, which was discovered by classpath scanning, and so because Eclipse doesn't keep a separate test classpath, we'd be discov…
Re: Java REST framework Dropwizard 1.0 released
#74Earlier quoted context omitted.
More like set of worst practices. You have some API exposed in plenty of endpoints instead of one, and on top of that you embed one of the call arguments in the URL itself. And no, it doesn't make designing API easier if you preallocate "read", "create", and "delete" operations to separate HTTP methods, and then put all the other operations in POST. "Create" and "delete" in many cases don't even make any sense to gua…
Well there are no hard and fast rules. Any set of best practices are opinionated. You can have different of opinions if they are not suited for your use case. All the REST frameworks you found are designed around the those ideas. For making your APIs rest you do not need any framework you can design your APIs along those guidelines. Again how far your apis need to be REST complaint again it is upto common sense.
"Best practices" are supposed to work sensibly in most cases. REST only works in a small subset (read/create/delete and nothing more), other cases being stuffed collectively under HTTP POST umbrella, so you need some RPC protocol anyway. This is very far from working sensibly.
Re: Java REST framework Dropwizard 1.0 released
#75Re: Java REST framework Dropwizard 1.0 released
#76Earlier quoted context omitted.
Jetty has been around for a while; a response handler is a one liner (well, a Java one liner, which translates to 7 lines ...). With Spark[0] (not to be confused with Apache Spark ...), you can get a Sinatra-like routing library on top of Jetty (while you still can deploy the webapp in a more heavyweight container if you need to). I think Spark is in spirit much like Dropwizard, but a bit more lightweight. [0] http:/…
(opinion: i've spent a year writing Dropwizard based apps, but only two evenings writing Spark based apps). I think that Spark comes at the cost of customisability - 2-way SSL is a chore, you have to parse your own message bodies, you don't get straightforward logging out of the box - there's a base set of features and functionality that I couldn't find in Spark. The thing that impressed me about Dropwizard is that y…
Re: Java REST framework Dropwizard 1.0 released
#77Earlier quoted context omitted.
Dropwizard has templating engines integration and form validation.
I'm aware of that. However, have you tried using them in any non-trivial project? (for example, a project that supports authentication ?)
Re: Java REST framework Dropwizard 1.0 released
#78Earlier quoted context omitted.
There's quite a bit of magic under the hood of DropWizard (or, rather, the components that make it up). My experience has been that a developer using DropWizard will rarely, if ever, encounter this magic: they don't need to be aware of it. But if the veil ever slips, the sheer amount of ugly machinery will shock and horrify.
I can see that. We found that if we added the Spotify Docker Client to our test classpath we couldn't run the application from Eclipse anymore because our Jackson object mapper had the wrong Jersey modules. This was because that package depends on a different version of jersey-jackson or whatever, which was discovered by classpath scanning, and so because Eclipse doesn't keep a separate test classpath, we'd be discov…
Re: Java REST framework Dropwizard 1.0 released
#79Earlier quoted context omitted.
Interesting because they made it sound pretty horrific.
There's quite a bit of magic under the hood of DropWizard (or, rather, the components that make it up). My experience has been that a developer using DropWizard will rarely, if ever, encounter this magic: they don't need to be aware of it. But if the veil ever slips, the sheer amount of ugly machinery will shock and horrify.
Re: Java REST framework Dropwizard 1.0 released
#80Earlier quoted context omitted.
There's quite a bit of magic under the hood of DropWizard (or, rather, the components that make it up). My experience has been that a developer using DropWizard will rarely, if ever, encounter this magic: they don't need to be aware of it. But if the veil ever slips, the sheer amount of ugly machinery will shock and horrify.
I can see that. We found that if we added the Spotify Docker Client to our test classpath we couldn't run the application from Eclipse anymore because our Jackson object mapper had the wrong Jersey modules. This was because that package depends on a different version of jersey-jackson or whatever, which was discovered by classpath scanning, and so because Eclipse doesn't keep a separate test classpath, we'd be discov…
It is a littlebit sad, that there are no javac warnings enabled by default that at least check known classes for conflicts in the classpath. An IDE should do that by default, too.