On Thu, 2007-01-25 at 10:37 +0100, Stojce Dimski wrote: > Hi Oleg, > > If I understand correctly 'HttpCore Parameters' are a noble HashMap with > possibility to build hierarchy and have converters for their > attributes... They are there for configuration purposes...
Hi Stojce, Yes, this is absolutely correct. This is mainly driven by requirement to be able to override any default parameter at a lower level (global -> client -> host -> request) if applicable. > The > configuration parameters are handled outside of the http-core in the > application environment, and very frequently by spring-like frameworks > which already have all stuff needed to convert to and from external > source (.properties .xml etc...) to java beans. > So to benefit from those it would be very natural to build few simple > java beans using inheritance and/or composition instead of using actual > HttpParams... Along the lines of KISS principle it would: > 1) slim and simplify the code (simple beans, no need for HttpParams > interface) > 2) have strong typing and checking (we can add checking in the setXXX > methods, spring have a checking of the attributes initialization > out-of-the-box) > 3) users can simply extend those classes if they need to add some custom > parameters (HttpCore will continue to use those 'param beans' > polymorphically) > 4) make testing dead simple > Does this mean that you are suggesting to do away with HttpParams interface entirely? If not, what would be the way to bridge the suggested framework and HttpCore which currently relies on HttpParams? > As for spring integration right now I am refactoring your examples to > use spring and for what I saw until now there is no need for this > namespace extensions and or schema support. Bean factory .xml is pretty > clear self-documenting and is not at all verbose... > The simpler the better. Cheers Oleg > Stojce > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
