Monday, October 15, 2012

Building the www.brightonsausageco.com website - 14/10/2012

Before I start coding the site I thought it'd be a good idea to turn the project into a series of blog posts illustrating agile development usign BDD / Emersive Design. This post assumes you know about things like TDD/BDD, Agile, Emersive Design, Specflow, Selenium/Coypu. At this point in time I have created a git repo for the project, added a website project and a twin behaviors project. I have made some decsions early on which you may or may not have decided on. Mainly the my dev / test tools and the core stack:
  • Resharper 7
  • Asp.Net Mvc 4
  • Castle Windsor IoC
  • Nunit with Specflow and Coypu
This is my stack of choice. I haven't mentioned any sort of database tech above because I haven't decided on that one yet - it's likely to be some doc based db however.
The reason I am coding this from scratch is because from my brief investigation into the free / opensource e-coms world nothing ticked my boxes in terms of quality, simplicity or design. Having thought about some alternatives I came across google checkout which allows me to create a site with a catalog and they take care of the shopping basket and checkout process. Leaving me to worry about the site design and admin.
I'm no designer so I've farmed that out to a friend of a friend and it will be integrated later down the line. First I'm going to focus on features. In true agile / bdd style :)
This is a side project for a friend and I've spent all the money on the design so I am going to be getting the initial phase of work out in short sharp and neat sprints (train journey length sprints!). Which leads me to the first set of admin stories (I'm going to create the backend first) for sprint #1:
  • Manage categories
  • Manage products
Let's not worry about the customer facing site, logging in to the admin area, viewing and managing orders and customers or any of that yet - that can all come in a later sprint. To start I'm going to pick the easiest to begin.

Expanding Feature #1 'Managing Categories': (As an admin user) I would like to be able to add / remove / edit category names. I think the ability to enable and disable categories would be good. I also think that a product should be able to belong to more than one category so they act more like tags - predefined tags I guess. Categories are only there as meta - if there are no tags, users can still find products by standard search (which will come later), categories provide a nice visual means of sorting and filtering products. Categories also offer a means to provide faceted information where users can see how many products are in each category. So with that we have our first SpecFlow file:



In the next blog post I'll start adding the Coypu / SpecFlow step definitions which will drive the development of this site from the UI down. I'll show the use of emergent design to lead the development in an agile, lean and focused way. I'll also begin thinking about which database we'll be using and the thoughts / reasoning behind the choices and the eventual decision.