News for hackers. Stuff that matters.
Re:Test-induced design damage by antimagic on Tuesday April 29, 2014 @11:24AM (#7667593)
Making your information store and your GUI separable is the whole point of the C in MVC. That is not what David is complaining about. He's complaining about inserting another layer of indirection between the controller and the view, and between the controller and the model, particularly when the reason for introducing this indirection is purely to allow inserting hooks for tests.
Re:Test-induced design damage by twistedpair on Tuesday April 29, 2014 @02:56PM (#7669198)
It is often wise to design code to be testable. This usually results in cohesive, decoupled packages consisting of many simple methods. However, it's rarely a good practice to make custom code in your application solely for testing. That's usually a tell-tale that you could design better for test such that the code can be tested without special modifications, i.e. MVP over MVC.
Re:Test-induced design damage by antimagic on Wednesday April 30, 2014 @03:55AM (#7672086)
David is explicitly arguing the contrary. I find his argument far more persuasive than your assertion that adding extra layers of abstraction just for testing purposes improves the code.
Re:Test-induced design damage by twic on Wednesday April 30, 2014 @02:14PM (#7675166)
Hold on, twistedpair said "it's rarely a good practice to make custom code in your application solely for testing". That seems rather the opposite of "assertion that adding extra layers of abstraction just for testing purposes improves the code".