-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Glassfish dependencies from the API. #22
Comments
Hi, Thanks for the suggestion. I've been thinking about breaking Restito into modules recently. That was more about: removing Will try to do the same for grizzly. |
Hi, @mkotsur . Since I reported this issue, I'm introducing Restito to another large client of mine as well as writing a software developer course which will feature Restito in the JAX-RS client lesson. I was just now writing the lesson and came upon It's disappointing that a Glassfish dependency is still mixed into this great library. Do you have any idea of whether you can get to this any time soon? If not, if I devote a developer to this project to remove this dependency, would you be open to accepting our pull request and removing that dependency altogether? Thanks for your consideration. |
I think what would be more appropriate would be See for example the pattern used by the JAX-RS client code: |
(P.S. You really need methods taking |
Hello @garretwilson . Cool that you keep using restito despite lack of progress with this issue :-) It hasn't been ignored, though. I've made a research, and decided that this non-trivial breaking change doesn't justify the benefit. But I'm open for revisiting this decision. So, just to make sure we're on the same page: Restito uses Glassfish for 2 purposes:
|
First of all, let me just say that I completely understand this part; I'm not trying to do away with Glassfish "under the hood". But remember that developers will probably already be using some framework to do client REST calls. Now they will need to learn Restito, which is fine. I just don't want them to be forced to use yet another framework that they don't even need to know about.
Yes of course I agree. But you are assuming Glassfish is the only library that provides those constants. There is no guarantee that users of Restito are already using Glassfish. In fact they are probably not. What is much more likely is that users are using JAX-RS for the client code. JAX-RS provides (as part of Java EE) a In fact, these constants are supplied in various libraries already; see e.g. https://stackoverflow.com/q/730283/421049 . So if you just have to include methods with Glassfish classes, please at least supply the bare string/int versions as well so that I, my developers, and my students don't have to go digging through yet another library and we can use the library we're already using for our constants. Thanks. |
This is a very nice start to a framework. But although it is natural that restito would use some server dependency under the covers, the specifics of this server should not be promoted to the API. That is, I should be able to use restito without knowing what server implementation is used.
For instance, restito's
Condition.method(Method)
method requires aMethod
parameter, but theorg.glassfish.grizzly.http.Method
type is part of Glassfish. It would be better to use a string parameter, as inCondition.method(String)
. This way my code can be completely server agnostic. In addition, I can use more standard method constants, such asjavax.ws.rs.Httpmethod
.The text was updated successfully, but these errors were encountered: