The CompareVino Technical Stack
I set out to build CompareVino for two reasons: a) to help myself and others drink better wine and b) to form a hobby site where I could reacquaint myself in the art of web development (I was feeling a little rusty with my day job focusing more on management than development).
The goals of the project are therefore as follows:
- Provide an easy to use, intuitive website that helps consumers effectively navigate the wall of wine
- Make use of the latest tools and frameworks
- Mobile friendly from the get-go
- Be cost effective to run without sacrificing functionality or performance
With that in mind, the core technical building blocks are as follows:
- .NET / C#
- Nancy [web framework]
- RavenDB [document database]
- Bootstrap [CSS framework]
- SASS [CSS pre-processing framework]
- BitBucket with Mercurial [source control]
- AppHarbor [.NET PAAS]
- RavenHQ [RavenDB hosting]
- Mandrill [transactional email sender]
- Raygun [awesome error tracking]
I've delved into the above building blocks below.
.NET / C#
C# was the language I started out with and I still really enjoy the platform and the ecosystem Microsoft have created around it. Microsoft are also rapidly changing as an organisation with a strong focus being put on openness and open source.
Nancy is a lightweight, intuitive web framework based on the Sinatra Ruby framework (Nancy being the daughter of Frank). Compared with my past experience of the .NET MVC and Spring MVC web frameworks, Nancy is a breath of fresh air.
I can't say enough about RavenDB - it's a document database that has greatly simplified the development of the CompareVino website.
Although in no way a complete set, the following features really stand out:
- It's use of Lucene based indexes in the background mean that functionality that previously would have required a database, an indexer and a full text search engine (e.g. Solr) are now available out the box
- It's safe by default meaning goodbye [N]Hibernate select N+1 bugs, unbounded result sets etc
- 1st and 2nd level caching is seamlessly provided out of the box
- It supports an in memory database which, coupled with Nancy test support, means I'm able to test the web stack end to end without any external dependencies (a blog post on this is in the pipeline)
- It scales easily - and although scaling isn't a feature I need right now, it's nice to know it's there :)
Not much needs to be said about Bootstrap suffice to say that it democratising the world of web design. It's now relatively easy for developers with very little front end knowledge to create functional, easy to use websites at the drop of a hat. Granted, it means that a lot of websites now have the same look and feel but surely it's better than a site that is hard to use, read, doesn't work on mobile etc. I, for one, am a fan!
SASS is a pre-processing framework that basically introduces programming (variables, functions etc) into CSS. No more having to search / replace through your stylesheets to update a colour. I'm quite new to writing CSS and since native CSS is valid SASS, I'm able to progressively enhance the stylesheets as I become more experienced.
AppHarbor and BitBucket
AppHarbour is a cloud based hosting service for .NET applications that takes all the pain out of deployment and scaling. Of particular mention is the integration with BitBucket which gives zero downtime, continuous deployment of CompareVino with a few button clicks.
Raygun is the error management service I should have built 6 years ago. It provides front and back end error tracking and monitoring and allows me to respond quickly when someone encounters an error.
That rounds up the foundation upon which CompareVino has been built. In-depth posts on the above and other related components to follow.