Wednesday 8 July 2015

How was it like to migrate from C#.Net to Ruby on Rails?

If anyone had noticed I am not writing too many posts lately and updating this blog the same way as I was doing it before. The reason being I am very busy working on a project which we are developing on Ruby on Rails. I switched to Ruby on Rails because I knew I would end up on the same road as these guys if I had stayed on with the Microsoft stack.


Ruby on Rails has a long steep learning curve as can be read from these below articles.

Rails is a Ghetto - Zed Shaw, developer, Mongrel

An average Ruby on Rails developer should understand and master all these skills if they ever want to get the full benefit out of rails and increase their speed of application development without compromising on writing high quality code.

  • Ruby
  • Rails
  • RVM
  • Rbenv
  • Rake
  • Rack
  • MVC
  • Migrations
  • Scaffolding
  • Rspec
  • Cucumber
  • Capistrano
  • Gems
  • Git
  • Coffeescript
  • Yaml
  • ERB
  • Sass
  • Haml
  • ActiveRecord
  • PostgreSQL or MySQL or MongoDB or Redis
Principles or Philosophies I love about Rails.

DRY (Do not repeat yourself) principle.

Convention over Configuration.

Separation of concerns.

Modules and Mixins.

Metaprogramming.

Two things which in my opinion is the main reason behind the success of the Rails framework.

1. The Ruby programming language - All the success of the Rails framework should go to ruby for its elegant syntax, simplicity, dynamic typing and functional programming features. You can quickly come up with a functionality with far less code than what is required to achieve the same functionality in other programming languages. Ruby has a great community support and loads of gem libraries for every requirement you can imagine, if no gem meets your requirements then you can start writing your own gems and release it for others to use it and also use it with in your own project.
2. BDD - Behaviour driven development using Rspec and Cucumber. Even though the ruby programming language was the main reason for the success of rails framework BDD is the crux of rails. There is a saying that good developers always test their code but anyone who has come from the Java or the .Net background knows how difficult it is to practice test driven development in those languages. It really sucks and makes the whole experience of application development awful. But look at Rspec, it is so much fun to code. We write the test cases first and re-factor our actual code later. 

Although there is too much debate whether TDD is dead or alive in the ruby on rails community I would say its always good to do BDD to prevent breaking a feature when you change code somewhere else at a later point in time. How many times have you felt that changing a code somewhere broke a feature somewhere else and your boss being pretty upset about seeing too many bugs in his new product. 

No wonder why all software firms of all sizes are adopting BDD (Behaviour driven development) as their software lifecycle process for developing their software products.


Roadblocks for the Future 

The Ruby interpreter is slow

Rails and ruby will continue to thrive and evolve as long as start ups exists but if ruby or rails is ever going to seriously make a place at the enterprise level other than being used as a scripting language rather than developing a whole application out of it then rubyists have to seriously work on speeding up the ruby interpreter.

.Net has finally become open source so I am rethinking of migrating back to C#.net.

No comments :

Post a Comment