Puh, day 2 is finished! Now it's about 11.00pm and I'm absolutely exhausted. But the day was great, too.
JP started by introducing the front controller pattern. The goal was to have a plain old ASP.NET (if it is allowed to say so, regarding that ASP.NET MVC is still preview?) running with the front controller in a kind of MVC.
He gave us a lot exercises doing TDD on this project, of course emphasizing to use a naming that expresses the behavior.
Doing this individually or doing it with pair programming, always fun!
During these we covered state based testing and interaction based testing. Using a helpful set of extensions supporting a very good human readable testcode, I can imagine that I will able to get into this code base even a year later. Allow me encourage you to have a look at JP's blog posts about the BDD style of unit test.
Specially for the interaction based testing JP came up with several extension methods for Rhino Mocks also focusing on getting easy readable tests.
JP explained why he is starting projects with "UI first". This is a good way to have get UI signed of by the customer, even the code behind isn't full functional, but the customer is able to confirm that this is the result he wants to get. Starting with the UI leads us to develop this application top down, step by step digging deeper into functionality, getting more and more tests that covers nearly all of out code.
We learned that using the poor man's dependency injection can be extremely helpful to combine the ability of unit testing and simple usage of a class. (But we are prepared that there will come more this week -> containers!)
I have to admit: I have some experience with generics, but implicitly JP teached me that I know nearly nothing about that. I need to learn more about generics, absolutely!
The whole training class is hanging together the whole day and it's absolutely cool to get into more discussion during breakfast, lunch and supper.
If you know JP, you know this slogan "Develop with passion!", but I'm sure "Teaching with passion" fits perfectly also!
Now it's nearly midnight, I have to go to bed immediately and please forgive any typos ;-)
May be more tomorrow! Sleep well!
.NET Software Development
Wednesday, September 24, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment