Sorry Stefano, but I feel that you are somewhat biased. :-) I'm not saying unit tests are the solution to all evil, and I certainly understand that within the *current* Cocoon environment unit tests might not help much. But this is because the current codebase isn't test-friendly, so that it makes really little sense to test a single unit of functionality when 99% of what is around just can't be tested.
This is *not* because testing doesn't work or can't be applied: actually in your case it would have been of great help. You were extending an existing component, and if you were starting from a tested codebase, you could have perfomed your changes incrementally, ensuring that you weren't breaking anything and inserting new tests while adding new functionalities. I'm positive that your IllegalArgumentException would have shown up much earlier and in a much faster try/fail environment (no need for a code/servlet-stop/compile/servlet-start/test/fail/swear cycle).
Yepp! ...I think there are two things that make testing hard.
o SAX o the cocoon environment
...the last thing can be solved an you can then benefit from a short try/error cycle. Well, the first one ...only to some extend.
...but I felt that unit tremendously helps to shorten that cycle that bugs you so much.
As for the knowledge and not touching the core...
I think there is another explanation why there are so little changes: We are way more concerned about the stability of contracts. ...even for trunk!
Quite a few people now have live installations and seem to go for the "na, don't change it! it ain't really broken". This seems also seems to apply to trunk to some extend. Maybe everyone remembers the 1.x->2.x pain and wants to be able to upgrade easily. (this being said without any valuation)
The days are over when cocoon was more a research project and when noone really cared about fundamental changes to the contracts. ...the question is whether this is good or bad.
...at least it's one thing that slows down core development.
cheers -- Torsten
signature.asc
Description: OpenPGP digital signature