The Full Stack, Part 8: Adding Search to the Windows Phone Client
In this episode of The Full Stack, Jesse and Jon reboot their windows phone client project using Test Driven Development (TDD) and the Model View ViewModel (MVVM) pattern.
Previous episodes focused on getting different technologies such as Windows Phone, WCF, and OData, connected. With a better understanding of the technology and some working code, we decided it's time to restructure the project using some sustainable practices and patterns.
Show links:
So, you would distribute your application through the Marketplace with the unit tests compiled in? Since space and bandwidth (and thus the size of your .xap) are issues on a platform like the phone, are there any options for separating the test harness code from the system under test?
Thanks!
Agree with whatsit, there are a number of things I see wrong with this. Unit tests built into your app instead of a separate library? Really? And making your own mock objects? There are about 4 kagillion mocking frameworks out there that are quite fantastic, you're wasting time be creating your own.
Listen, you want info on MVVM and unit testing and all this with WP7, there are a lot better tutorials out there.
http://compiledexperience.com/blog/posts/blendable-mvvm-dependency-injection-and-unit-testing
Hi Matthew,
For now, the Reflection.Emit API is not supported on Windows Phone 7, which means that the mocking frameworks you speak off do not work on the phone.
Cheers,
Daniel
http://danielvaughan.orpius.com
These postings are not intended to be tutorials; they are a real-time exploration of the boundaries of what we already know in the context of building a design to finish application.
Jesse, how come you don't explorer the Unit of Work? Having to synchronising each IRepository becomes a nightmare as the repositories increase.
Since you're exploring TDD, Jon and you should check out BDD. I find it a excellent way to know where to start your testing and seems to do a better job of ensuring you only create what you really need.
https://ponderingdeveloper.wordpress.com/2011/04/05/yum-brains-a-bdd-example-using-specflow/
Also, you two should defiantly check out NuGet. It makes adding dependencies to your solutions so simple.
https://ponderingdeveloper.wordpress.com/2011/03/18/nuget-visual-studio-package-installer/
(full disclosure; I wrote these articles but linked back to all my sources)