Closed codefromthecrypt closed 11 years ago
cc @syed-haq @niteshkant @benjchristensen @digitalsanctum @stonse @jdamick @allenxwang
My thought on these types of debates is that the core project should do as little as possible while still maintaining usefulness so +1 from me.
Fancy pants functionality or addressing edge cases should happen in another dependency/extension/module/plugin.
Makes sense to me. My thinking is that open-source utility libraries like this one should strive to be easy to understand, address the most commonly used 90% of use cases out-of-the-box, and provide a clear path through some form of extension point to address the next 8% or so of use cases.
In this case, that would seem to mean cutting down on core code and concepts that are not seeing heavy use, but providing mechanisms to hook in equivalent types of behaviors through extension modules. Over time, if certain extension modules become populate enough, it may be worthwhile to incorporate them into the core.
+1 to less code.
Simplifying also has the added benefit of making it easier to learn.
Perhaps it would be helpful to restate what the intent of feign-core is (in light of https://github.com/Netflix/feign/#why-feign-and-not-x) and then guidelines of how these extensions (such as streaming, callbacks, decoders, etc) will work a way that feels natural?
It would be good to have a story (such as will replace what is currently on the main README) about how each of these things will be accomplished after this refactor:
So these changes move forward the goal of feign as stated in the read me: "reducing the complexity of binding Denominator uniformly to http apis regardless of restfulness" This particularly helps, as every item in this issue is a reduction of configuration and/or complexity.
That said, there are some changes that would take place in the README.
I've updated this issue to simply remove Observable, vs replacing it w/Callback. Reason being is that the callback design might be different depending on whether it is cancelable or not, and this is often a transport concern. Rather than implementing another feature that has no production use, it is more congruent to just axe callbacks for now.
Makes sense to me. For starting users, implementing #34 and making end-user exposure of Dagger optional except for advanced usage should lower the learning curve. Towards that goal, it might make sense to use the builder in all examples until the "Advanced usage and Dagger" section.
+1
ps if anyone gets a code-cleansing high out of deleting stuff, feel free to start issuing pull requests against this. My migration path is to move denominator off any decoders/encoders except those w/ Object type param. We'll likely be better off in transitioning just making a single type Codec w/ encode/decode methods in v4 so that we can deprecate the encoder/decoders stuff for removal in v5
@davidmc24 ok so code changes are ready except the global encoder/decoder stuff you are working on and the Feign.Builder (aka issue 34). I'm going to be sporadically online a couple days but happy to review any progress as you make it.
@adriancole ready for you to take another look when you have a chance
@davidmc24 went through it and looks nearly there. a bit of polish then ready to merge I think!
great job, @davidmc24! Only thing left is to address issue #34 (Feign.builder()
). After that, we can cut feign 5, which I can do on Tuesday morning pacific, if we are ready.
@davidmc24 super job on this work.
I think the README is accurate as well. I'm refactoring denominator over this change, now. I suppose last concern might be.. should we bump sax to its own module? It is used twice in denominator, and it has no deps. However, it probably needs a top-level wiki, so this could be best achieved as sax/README.md
.
wdyt?
@davidmc24 fyi cleared a couple usage glitches sorted in #66 and #67 I'll probably be offline for several hours.
@adriancole I think that splitting the SAX decoder into its own module with a README makes sense. Having it be the only non-default'ish encoder/decoder in core feels a strange to me.
will do
feign 5.0.0-SNAPSHOT published to sonatype.
testing today
There are a number of ideas in feign that didn't work out very well, are edge case, or pure over-engineering. We should get rid of them as feign is used in production and should focus its code base, failure cases, and WTFs on things relevant to those use cases.
Set<Decoder>
is confusing when the type parameter is meaningful.This doesn't mean we shouldn't play with ideas or that these ideas will never reach prod. Just that we shouldn't commit all ideas to trunk as that increases the cognitive and maintenance load of feign without helping real production use. This may imply we need a "labs" repo or persistent forks to facilitate research.