|
From: Martin K. <Mar...@St...> - 2005-02-22 13:25:16
|
>I don't think we have heard from Martin why he wants to extend > DefaultXmlBeanDefinitionParser. We don't know if it's in the intrest > of Spring to change something or not. I stated that I was reviewing to understand what's going on. Also I said that I want to add support for contributions to string (at least to see how it goes and if it would be suitable at least for the RPC subproject). >> I think the main reason to use the W3C DOM API directly is to avoid the >> need >> for an extra dependency (e.g. JDOM) just to parse the XML bean >> definitions. >> You end up with an "less than elegant" implementation in >> DefaultXmlBeanDefinitionParser, but in this case the benifits outweigh >> the >> costs. >> >> Erwin Vervaet >> erw...@er... >> >> ----- Original Message ----- >> From: Martin Kersten >> To: spr...@li... >> >> Sent: Tuesday, February 22, 2005 1:21 PM >> Subject: [Springframework-developer] I don't like the >> DefaultXmlBeanDefinitionParser >> >> >> Hi folks, >> >> I am currently trying to extend the framework by supporting >> contributions. >> Just to see how it feels. >> >> So I made some investigations in the sourcecode. I don't want to start a >> war >> about proper design rules, since I am a believer in 'Interface belongs to >> the >> client' stuff and you are appearently not, but this isn't the issue I >> want >> to >> talk about. >> >> Th implementation I hate most on first sight is the >> XMLBeanDefinitionParser. I know it does what it should but you can read >> this: >> >> /** >> * Make the horrible DOM API slightly more bearable: >> * get the text value we know this element contains. >> */ >> >> Well I would agree but it's a bit wired also. You think the DOM API is >> horrible >> and you are still using it? You know what it means to use a >> horrible API? You write a horrible implementation! And thats how it >> looks. >> It took me more then a gaze to catch the meaning of the parser and I also >> got blown by the code duplication. Since I am in need to extend this >> class, >> >> So I would like to ask if I may refactor it and commit you a patch (or >> maybe >> a complete reimplementation)? >> >> >> Cheers, >> >> Martin (Kersten) >> >> PS: By the way, how about 'Hidding 3rd party library behind single >> interface?' |