对此,我指的是,有时建筑师会以牺牲其他重要力量为代价,寻求简化和改进可检测性。
For example, I m reviewing a very complicated application, made so by extensive use of design patterns that overly favor testing, e.g. IoC, DI, AOP, etc...
Now, typically I like these things, but this system should have been much simpler - though not just a simple web frontend for CRUD on a db, it still not MUCH more complicated than that (even considering some internal workflows, processes, etc). On the other hand, just reviewing the code becomes a major pain in the heinie, barely readable (even though its well written), and coding it must have been a pain.
实施的复杂性是科索沃统计局的一个明显障碍(原则,NOT, 带),而“只有”的效益则通过测试框架和测验框架以及......提高可检测性。
Now, before you TDD fans jump me, I m not belittling the importance of testability, but I m questioning the supremacy of consideration of this specific force (against all the others).
Or did I miss something?
I d like to add another point - it does seem to me that all this talk of "testability" is with regards specifically to unit testing, which differs from overall system testing, and can result in missed tests when the individual units are integrated together. At least, that seems the point of the IoC/DI for testing...
Also, I d point out that this system (and others I ve seen preached) only have a single concrete object per interface, and the IoC/DI is only intended for - you guessed it - replacing the concrete objects with testing mockups for testing only.
我认为有必要从上添加这一引文:
虽然程序方案拟订中的危险是用“灰复燃”法结束,但使用“控制转移”的危险却以“<<>号>马卡尼代码结束。
页: 1