colinramsay.co.uk

My Solution Template

27 Jan 2008

For a while I've been meaning to come up with a repeatable starting point for my projects. Not only is adding references, configuration and structure to a solution labourious, it's also pretty difficult to remember every step. Ideally, I wanted to be able to start a project with everything ready for me.

I spent a while today doing just that; a solution which matches the starting point for most of my projects. Firstly, there's a Monorail project with Windsor, NHibernate and logging integration switched on. All of the required DLL's have been moved into a Libs directory in the solution folder - the idea behind that is to allow a developer to be able to build the project without needing to install Monorail or any other components. Secondly, there's a unit tests project with a couple of folders; Controllers and Persistance. These suggest a future structure for this project, with Persistance being used to check the NH mappings work as expected. In addition it contains an NHTestBase class which allows my unit tests to run with a SqlCe database. Thirdly, a project called Core; this holds core functionality for the solution, such as entities and services, exceptions and utility methods.

The whole thing can be found here: http://dev.plastiscenic.co.uk/svn/projects/Plastiscenic.Sample/ but it's missing one thing - a good way to customise it. Namespaces, directory names, etc, need to be manually changed. For me that's still better than building it up from scratch but it's still a pain. If anyone's got any suggestions, I'd love to hear them.

One final note; this has pushed me to collect together a couple of classes I use often, and I've stolen Ayende's naming convention by creating Plastiscenic Commons. This contains a repository implementation, stuff for setting up a SqlCe database, a static container accessor, and a few other bits. Nothing exciting but I always need them.

Feedback appreciated.

Feedback or questions on this post? Create an issue on GitHub.