The other day I just realized how much have changed in the way we develop code nowadays. Well it might just be me but it’s certainly some major changes that has taken place in the .NET development arena.
I don’t claim this to be in the right chronological order but here are some major milestones for me:
- TDD – didn’t use just 2 years back
- BDD – finally get the requirements and tester into the agile loop and an opportunity to work outside in which feels just right for me. My favorite tool right now of course is SpecFlow.
- LINQ – totally changed the way C# (VB.NET still sucks at LINQ if you ask me) looks
- ASP.NET MVC – a web framework that makes sense. And that you can test. I understand again.
And now the other day (the day of the many updates as it might well be known) Microsoft release a big load of new updates. Here’s the one I find most interesting:
- NuGet – really cool packing system. Hey – now you don’t have to create a lib folder and keep track of where you had the right version for what any more. All the open source you can manage – at the end of your “List-Package”-command
- Razor – a new, more concise way to write web pages
- SQL Compact Edition (or SQL CE) 4.0 – a small, fully working, easily deployable, free database from Microsoft.
- Code First Entity Framework – your POCO classes, mapped to a database, automatically. It looks nice, so nice.
- MvcScaffolding – scaffolds loads of stuff for you in MVC 3 projects. Looks very promising. I didn’t say “brings Ruby-On-Rails to the .NET sphere”… but I it was on my mind
When you put all these together you get something very, very cool I think. Or at least hope.
So I am planning to build a website using (all?) these tools and see where it takes me. I have already bought a URL (www.kanban-boards.com) to put some pressure on me. Here is the mission statement for the site:
www.kanban-boards.com will be a site where users can upload their Kanban boards for other people to see, vote on and get inspired by. In this way we can share and learn from each other I think and hope.
The creation of this site is documented as my learning process.
You can follow my progress on GitHub where I’ll check in stuff with each blog post. My plan is to try to write so little code as possible and get these tools to work for me. Also I progress step by step using the tools and my knowledge to solve the problem at hand, at the last responsible moment. I will not download a bunch of stuff that I think that I will need – only when I actually need it.
Coding - Getting up and running
OK let’s go. Today I want to simply set up the environment and get my first specification in place. Nothing more.
- First I installed Web Platform Installer 3 and got all the new stuff down to my computer. My God – that took a while… Hey I got Web Matrix as well.
- I then created the KanbanBoards github repository and cloned a local copy of it.
- In that folder I created an empty solution file.
- Trying to be a good BDD practitioner I created a Class library called Specs. My SpecFlow features and steps will go here, so I’ll need SpecFlow. NuGet help me
- I right clicked the Specs-project and chose “Add library package reference …” (Yeah I like a GUI over a console when learning). I searched for and added the SpecFlow 1.4 to my project. I’m not happy with getting 1.4 instead of 1.5 that is the most current but OK. Please note that you need to install SpecFlow to get the tooling support. This only install the reference to SpecFlow and NUnit.
- That created a “packages” folder at my solution root. “Packages” is the new “lib” then. Ok – I’ll live with that. Also I got a “packages.config” in my Specs-folder – that contains a list of my current projects. I didn’t got NUnit that is the default framework for SpecFlow. Hmmm – let’s see how this play out.
- I now created a “Features” folder and created my first feature that is about navigating to the home page of the Kanban-boards site.
- I ran the tests aaaand…. Boom! Lots of NUnit errors at compile time. Just as I thought.
- OK – I’ll add the NUnit (right click Specs project –> “Add library package reference …”-> NUnit). Apparently 2.5.7 is the most current version, but who is counting – I’ll use the update feature of NuGet later if I want to.
- Recompile. Works fine
- Ran tests – Inconclusive (No step definition found).
Great place to stop I think.
I’ve simply created a starting point, but little by little I’m getting there. I have only written specifications in Gherkin and then used tools only. Works fine so far.
The code is here and this was the commit for this post.
Stay tuned to see how this unfolds…