Archive for category Cloud

My Ruby on Rails photo site hosted on Heroku

In a previous post that I wrote on the topic of deploying web applications on to Azure cloud I compared that to my experience of deploying Ruby on Rails web apps onto Heroku.

I realised that I’ve not mentioned my experiences with coding in Ruby. My motivation to learn Ruby On Rails was triggered by the fact that I was developing a rather large Asp.Net MVC web app in my day job, and according to one of the books on my reading list it was the inspiration for the Microsoft’s framework.

I’d returned from a holiday in Russia and I wanted to share the photos with my friends in a novel fashion. Why not create my own website to share them and learn Ruby On Rails in process? As a result, I created a few sites using RoR, this one being the public clone of my photos website The rest of this post covers how I launched these sites.

After a little googling, I decided I would do my Ruby development on a Linux based OS as opposed to Windows, since I would be able to keep up my Linux knowledge. Vim was to be my text editor of choice.

To get a grasp on the Ruby language I started working on the Ruby Koans exercises and once I felt sufficiently competent I moved onto understanding how it weaves into Rails to result in the accomplished and popular web framework. Michael Hartl’s Tutorial is the perfect place to start

I dabbled with deploying a Ruby On Rail web app on Phusion Passenger without much luck, so I then decided to take the simplest route to hosting and go with Heroku. I’d already decided that I would learn Git quite some time ago; now would be the time to take the plunge!

Along my path of deploying the web site I went for the option of using a mature open source photo site called Balder. Doing this meant I could get my web site launched in a reasonable time frame, and to also avoid reinventing the wheel

Overall I felt it was a positive learning experience. I started to learn a new language and framework, which allowed me to appreciate MVC.Net and see where Ruby isn’t so great in comparison. For example, Ruby’s concept of Active Record may be useful for rapid development, but it lacks the strengths of Fluent NHibernate. Some have argued that Active Record is itself an anti-pattern.

I became much more familiar with the Linux Terminal and I’m happy to see that Windows Power Shell has Windows analogues to Linux commands I’ve committed to muscle memory. I’m also a big Git fan and I’m comfortable using it at the command line.

With my understanding of git I’ve come to use Github too, and all the great ideas that flow from it.

It was a worthwhile endeavour, even just for the insight gained. You can visit the fruits of my labours and see for yourself: http://publicpics.herokuapp.com/

, , ,

No Comments

.Net web apps hosted in the Azure cloud

Update: 08 Oct 2012 I discovered that Azure will not allow usage caps, so I have discontinued my subscription in order to prevent excessive charges. I’ve left this post here for historical reasons. I may explore other hosting alternatives in the future

I’ve recently switched over two of my demo web apps I wrote some years ago into the Microsoft’s Azure cloud service, something that greatly simplifies deployment and reduces my web hosting costs.

The first is No longer active, see beginning of post My remote control demo application which was an exercise to show an example of the command pattern

More sophisticated is my blackjack game, No longer active, see beginning of post which in a previous post in I showed its design.

Given that I wrote these programs in 2009, I certainly would not implement them again in the same way, as I was using some old technologies that have since been superseded (web forms, Linq to Sql) and my code would this time around implement SOLID principles.

Having previously set up and deployed Ruby on Rails websites on the excellent Heroku platform, in comparison Azure requires much less initial set up. Azure being built into Visual Studios means the developer is shielded from the complexities of deployment.

Counting in Heroku’s favour is the deployment speed; simple Azure apps take at least seven minutes to deploy, compared to around 30 seconds for Heroku.

For example in Ruby On Rails once you have set up the rake file to deploy locally, you can make a few alterations to that file for production setting and then run it on the Heroku instance in exactly the same manner as deploying locally.
Azure invents a brand new deployment work flow for the local copy of the cloud, which feels alien.

However I’m somewhat comparing apples to oranges, but I thought I’d share my insights. As a platform I’ll now be using Azure over independent web hosting.

One minor gripe when migrating data from a non-azure database to an Azure database was being forced to create clustered indexes which were not necessary in the original database.

, ,

No Comments

Page optimized by WP Minify WordPress Plugin