Great Open Source Libraries For .NET CMS Developers
As a CMS developer, one of the biggest pains I feel in my projects is change. Change is part and parcel of creating websites, as it's 'simple' to move a few things around on screen... Clients who asks for feature 'x' today will almost certainly want it to do something different in a week's time. As a web developer, it's my responsibility to build a system that doesn't require a significant investment when it needs to be changed. I'm not a mind reader and I haven't met a developer yet who can architect a system the first time around that will work perfectly for requirements that the client hasn't even thought about yet. With that in mind, I have always favoured using third party open source libraries in my projects. Firstly, it saves a significant amount of time (and consequently money) on unneeded development, testing and maintenance of these features. This saving means I have more room to play with the more interesting features of the site. Secondly, if you are anything like me, you won't want to write the same code over AND over AND over. I've had a look around the web and I can't find many articles written specially for us CMS developers that highlight which projects you should look at, so, I thought I'd start my own list of open source tools I use for my clients :
- Bootstrap : A great simple library that will make your front-end not look like a dog's dinner. I use this all the time for bespoke applications when I don't have access to a designer. Not having to worry about creating fluid grids, menus and form styles saves me days worth of effort.Why You Should Use It : As a developer, I regularly need to create user interfaces for back-end systems. Bootstrap will vastly improve the look and feel of these system in a fraction of the time.
- NUnit : The best unit testing framework I've used. Originally written in Java it has been ported over to .NET. There are so many great plug-ins and visual studio support for it, it's an invaluable asset.Why You Should Use It : As a .NET developer it's your best tool for unit testing. If you don't know why you should use Unit Tests this is a great book.
- Structure Map : Structure map is a great IOC container for .NET. There are so many out there but this is the easiest one I've used so far.Why You Should Use It : Creating SOLID code will future proof your code as much as possible, meaning your code should be less painful to change when the inevitable requirement changes happen. Structure Map is as good as any of the other IOC container to help you remove your dependency.
- Fluent Assertions : Fluent assertions is a set of extension methods that allow you to write your unit tests in a more readable and human format. There's a good article written by the author here about why he created it.Why You Should Use It : It makes your Unit Tests easier to read, when the change requests come in and you need to re-look at those tests you wrote six months ago, this will help make it easier for you to get back up to speed.
- Umbreco : If you are designing a website you don't want to reinvent the wheel from scratch. If you haven't got the budget to buy any commercial software then Umbreco is a great start to kick off your project. I seem to be using it more and more.Why You Should Use It : If you have a small budget for your project and you can't afford a commercial CMS (granted it's not needed most of the time) then this is your best option to get started creating that build quickly.
- Log4Net : Log4NET is a great error logging module. It's easy to configure to either write out to your file system, database or whatever you want. With Nuget you can add it to your project in seconds, so why waste time writing any custom?Why You Should Use It : After you deploy your project, you WILL have to maintain it. You don't want to spend hours trying to track down where that mysterious error is coming from. Using Log4Net will give you a central point of call to help you hunt those issues down. It's far more versatile then anything you would be able to build in the same time.
- Json.net : Great little framework that allows you to decorate your POCO's/DTO's or whatever naming convention you use to add in in your JSON names. I find it really useful, as if you decorate your objects with lower case, Resharper complains... a lot. Using Json.NET I can use good .NET naming convention and decorate everything with suitable JSON naming conventions; after you are done JSON.net will then create your feed for you.Why You Should Use It : If you need to create (or consume) any form of JSON then this will make your code more readable.
- Automapper : Great utility that with minimal configuration will automatically map your objects for you.Why You Should Use It : When you need to add in that extra feature, add that extra property, this will make that boilerplate DTO to DTO code a lot easer to read and to change.
- Moq : Simple mocking library that support Lambda/LINQ.Why You Should Use It : If you're using a CMS then a large part of your system will be hidden under the software's API. If you want to create good scalable software, then you will need to create MOQ's to deal with a lot of your CMS API calls.
- CsvReader : I frequently have to create CSV reports for people. This little library allows you to throw a list of Enumerable objects at it and creates a nice CSV with the headers, you can also create custom mappings and read CSV files in directly to object.Why You Should Use It : Why re-invent the wheel for your CSV needs ?