Thought Cloud structure
I am building Thought Cloud, a collaborative mind mapper, for an upcoming demo. Please grab the code and follow along.
I’ve created the structure of the application:
FacetedWorlds.ThoughtCloud is the main Silverlight application. It has out-of-browser settings enabled. I added a reference to the NuGet package “Correspondence.Silverlight.App”.
The UnitTest project is also a Silverlight application, as required by Jeff Wilcox’s Silverlight Unit Test Framework. But I didn’t create it with the project template from the Silverlight Toolkit. Instead, I added a reference to the NuGet package “Correspondence.Silverlight.UnitTest”, which has a dependency on the framework’s package.
The ViewModel project is a Silverlight class library to which I simply added the “Correspondence” package. Not much is required for a Correspondence view model, since it is built on Update Controls.
Finally, the Model project is a Silverlight class library to which I added “Correspondence.Model”. This package adds a “Models” folder, which is great when using the all-in-one package. But since this project structure is broken down, that folder is redundant. So I moved the contents of the folder up to the root of the project, and change the namespaces to drop the folder name.
This structure gives me the ability to build Thought Cloud in a test-driven manner. I write separate tests for the view models and the models, even though the view models use the models. I’ll show you why as we go along.