Funny that everybody rush for REST framework, while most of the time people cramming REST in their applications need less "read, upload, replace, delete" operation model and more "normal functions, except called remotely" provided by RPC. But RPC-over-HTTP (XML-RPC, JSON-RPC, or even Thrift) is a problem solved long ago, so it's not sexy enough, I think.
Java REST framework Dropwizard 1.0 released
21–30 of 88 posts
Re: Java REST framework Dropwizard 1.0 released
#22Dropwizard is really just an opinionated bundling of sane Java libraries that don't suck, and is essentially tailor-made for the (quasi-)event-driven processing model of: 1. request comes in 2. do stuff here 3. response goes out While this may not sound very exciting, this is exactly what goes on in HTTP APIs. People these days use Node or Go for this kind of stuff, but Dropwizard makes it very pleasant to do it in J…
Re: Java REST framework Dropwizard 1.0 released
#23Dropwizard is great for REST APIs (... as the title says). However if you want to use traditional views (MVC, html templates, security, forms etc) then please check something else (I tried it and lost many hours -- in the end I still couldn't do even basic things). For traditional web development, I recommend spring-boot which is almost as easy as dropwizard, it also doesn't need an application container and fully su…
Re: Java REST framework Dropwizard 1.0 released
#24Dropwizard is really just an opinionated bundling of sane Java libraries that don't suck, and is essentially tailor-made for the (quasi-)event-driven processing model of: 1. request comes in 2. do stuff here 3. response goes out While this may not sound very exciting, this is exactly what goes on in HTTP APIs. People these days use Node or Go for this kind of stuff, but Dropwizard makes it very pleasant to do it in J…
Re: Java REST framework Dropwizard 1.0 released
#25Funny that everybody rush for REST framework, while most of the time people cramming REST in their applications need less "read, upload, replace, delete" operation model and more "normal functions, except called remotely" provided by RPC. But RPC-over-HTTP (XML-RPC, JSON-RPC, or even Thrift) is a problem solved long ago, so it's not sexy enough, I think.
REST is like set of best practices to design API end points like define resource as end point and map standard HTTP methods to certain operations. This makes it easy and leads to a standard in API designing. And underlying technology can be RPC or servlets too. For example define end point "/user" and client knows how to create update or delete user where as before Rest these used to be different end points for each…
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 guarantee their being specially distinguished.
And you say that RPC can be used under REST. Do you have any example of a REST client library that actually can do that? It's the first time I ever hear about this way. Almost everybody else uses REST like an underspecified RPC protocol, cramming call request into an ad-hoc JSON structure to HTTP POST and mixing error reporting from transport layer and from application.
Re: Java REST framework Dropwizard 1.0 released
#26Dropwizard is really just an opinionated bundling of sane Java libraries that don't suck, and is essentially tailor-made for the (quasi-)event-driven processing model of: 1. request comes in 2. do stuff here 3. response goes out While this may not sound very exciting, this is exactly what goes on in HTTP APIs. People these days use Node or Go for this kind of stuff, but Dropwizard makes it very pleasant to do it in J…
My greatest gripe with Java was the amount of crap one had to go through just to build a simple Rest API. When I saw DropWizard I thought it solved that need. Maybe it's time to get back into Java development...
Re: Java REST framework Dropwizard 1.0 released
#27Earlier 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
#28Nice to see a 1.0 release. We've been using Dropwizard for various public and internal APIs for a couple of years and have been very happy with it. The components (jersey, jackson, coda hale metrics) are all very pleasant to work with, and generally have low-ceremony APIs that feel as productive as the ruby or python equivalents while providing the performance and operability of the JVM. It's not the fastest or most…
Re: Java REST framework Dropwizard 1.0 released
#29Earlier quoted context omitted.
What templating language did you use with Spring MVC?
I've been using Thymeleaf with Spring for a while and almost always exclusively use it with Spring Boot because it's pretty much right out of the box ready to go. I stumbled on it a long time ago because I had the problem of Java devs needing to integrate templates built by front end devs and all the churn that goes along with it. It uses custom tag attributes like th:href to swap the computed value in on template re…
Needs to become:
If this doesn't bother you (along with > for <, etc) then go ahead.Re: Java REST framework Dropwizard 1.0 released
#30Earlier quoted context omitted.
REST is like set of best practices to design API end points like define resource as end point and map standard HTTP methods to certain operations. This makes it easy and leads to a standard in API designing. And underlying technology can be RPC or servlets too. For example define end point "/user" and client knows how to create update or delete user where as before Rest these used to be different end points for each…
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…
It's like someone advocating writing all software should be written in Brainfuck, because the cognitive load of remembering eight operators is so much easier than learning all these keywords and syntax and runtime libraries that come in other languages. Except whereas our imagined Brainfuck advocate would be rightly ignored, REST has somehow become the fucking dominating paradigm of our industry.
The idea that reduced complexity in one area might trade off with much greater complexity in another simply does not wash with these people. They have a resource & verb shaped hammer, and they are going to use it to batter each and every API into some kind of nail shape, no matter the effort it takes and the carnage that ensues.