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.
Working with JSON and C# 3.0
May 8th 2007, 8:59 pm in .NET, Ajax, C#, JSON, Javascript, Visual Studio.
I’ve been using libraries such as NewtonSoft’s JSON.NET or AjaxPro to serialize a class to JSON. There’s something about my approach which didn’t really sit too well, and C# 3 has an elegant solution.
(more…)
Resharper – Don’t Delay, Try Today!
April 23rd 2007, 8:52 pm in .NET, Agile Development, C#, Visual Studio.
Jetbrains have announced that Resharper is moving to a new evaluation model which will make it easier to try out their outstanding Visual Studio extension. Previously, if you wanted to test Resharper you’d have to download it then request an evaluation license. But now you can simply download, install, and enjoy 30 days of developing pleasure.
Resharper includes improved Intellisense, refactoring options, better error highlighting, reformatting options, code generation, and lots more features guaranteed to put a smile on the face of any developer. If you’ve never tried it, I urge you to get along to the Jetbrains site and download Resharper.