December 14, 2008

How to write the testable code - The Clean Code Talks

The Google TechTalks video series has introduced a couple of new videos under the title "The Clean Code Talks". All of them are short and easy to understand talks presented by Miško Hevery. Here is the summary, which I took away from the "Don't look for things" and "Unit testing" videos:
  1. Object construction code should be separated from the business logic code to make the code testable.
  2. To satisfy the above objection one should use the Dependency Injection (with a preference to constructor injection over setter injection)
If anybody is interested in the topic and has no time to watch the full length video I would recommend the Martin Fowler's article on Dependency Injection, which basically contains all the important details on the topic.


http://www.linkedin.com/in/oldbam

1 comment:

Rage said...

Keep writing interesting information into your blog ;)