for example, on the wicket-dev mailing list:
Kent Tong:
Just that from the core Wicket code it seems the convention is to make methods final by default and make them non-final only when necessary.
Igor Vaynberg:
imho this shouldve been the default java convention. it takes more thought and analysis to design something to be overridable.
everyone who has tried to mock wicket objects knows what this design leads to.
while we're waiting for java7's hot code replace abilities like interface injection, there's a proprietary product called javarebel, that does almost all hot replaces on current vm's, including, changing method signatures and adding/removing methods. a bunch of guys at work have been using it, and they're quite happy with it. so happy in fact that they're now developing
no personal experience yet tho. also, there's a wicket-1.4m2 out, but we recently froze our dependencies to their current versions. :|
4 kommenttia:
There's multiple ways to test your code though... It would be more accurate to say that not everyone of the team (instead of no-one) uses TDD. We have people on board who do, including the author of JDave.
The difficult part is finding a balance between good API design practices (for anyone who thinks using final is plain stupid, please read Effective Java and you'll understand our viewpoint better), and making things easy when it comes to testing. Most people on the team, myself included, are convinced that if we had not been protective of how our API can be used/ extended, we would have to break the API quite often and be more limited in how we'd change implementation details.
Anyway, even though not everyone on the team are TDD fans, we've been supporting the ability to write unit tests against Wicket components right from the start. Further improvements are high on the list for the 1.5 version, and your input would be welcome.
Heh. Thanks for the glory Eelco, but you highly overestimate my part in JDave, in which I'm more like an active user and an occasional contributor.
In that case... you're fired! ;-)
Regardless, it is on our TODO list for 1.5 to improve testing support. Though many people already think testing works well with Wicket, there's always room for improvement.
I am very grateful for Timo's contributions, for example the removal of final on AjaxRequestTarget's addComponent method.
Eelco, you are right, I should participate in the wicket discussions and code, if I have contributions for testability.
Post a Comment