The Run Smart With Me (RSWM) application is my Windows Mobile pet project and I have now decided on and designed the system architecture for this project.
The application will be built for the Windows Mobile 6 Professional SDK with the .Net Compact Framework 3.5 version.
This project will be based on the Model View Presenter pattern (previous post about MVP). I have created a solution in Visual Studio 2008 called RunSmartWithMe, to this solution I have added 6 projects:
- RunSmartWithMe: This is the startup project where I will have the main class and all my screens
- RunSmartWithMe.Mvp: In this project I have created a namespace for Model, View and Presenter. In Model I will place business objects that I use in my application. In View I will keep the interfaces describing the views. In Presenter I will keep the interfaces describing the presenters and also the class implementation of the presenters.
- RunSmartWithMe.Util: In this project I will place all my utility classes used through the application.
- RunSmartWithMe.Dal: This is my Data Access Layer responsible for retrieving and storing data.
- TechCon.Ui: In this project I will place all my custom controls and user controls.
- TechCon.HardWare: In this project I will place all classes concerning hardware integration, in this specific project it will be the GPS unit on the device.
The reason that the two last projects are namespaced with TechCon is that this is general functionality that I will move out to a framework and use in future projects as well. TechCon is the name of my private company.
Below you can see the namespace architecture for my project. This architecture will make my project clean, structured and easy to work with. It will also make it easy for me to extract general functionality for re use in future projects.
Another advantage by using this kind of architecture is that unit testing easily can be adopted. I will use this project to practice and explore unit testing. When I have decided on how to use unit testing in this project I will write a post describing it. At the moment I am reading the art of unit testing book by Roy Osherove, hopefully I will pick up some tips & tricks and new ideas on how to include unit testing in the project.
The architecture for this project is quite simple since the application will only run locally on the device with no communication against other systems (at least for now).