Building web apps fast and easy using RoR - Chennai Geeks Sept' 2012
Today's Chennai Geeks meetup dealt with an introduction to the architecture and basics of app development using the Ruby on Rails web framework, by Magesh.
It was a full fledged tutorial, with Magesh showing a demo of a sample blog application being built, but I thought I'd share some of the gyan that came out of discussions and questions at the session.
Ruby is a programming language created by Yukihiro Matsumoto(just call him Mats), with the aim of making programming fun, by combining the best practices of languages like Smalltalk, Ada, Lisp and Perl. The syntax is extremely readable, and you don't have to be a coding ninja to understand Ruby code.
Rails is a web framework introduced by DHH. Best practices in building web apps involved certain tasks, and the goal of Ruby on Rails was to automate these tasks. RoR uses the Model-View-Controller architecture pattern to organize application development.
Wanna get started?
Some links to get started with Ruby and Rails, suggested by Magesh:
- Tutorials and documentation on Rails
- Book - Agile Web Development with Rails
- Book - Programming Ruby
- There are so many versions of Ruby. Which one do you choose? - The most commonly used version is MRI-Ruby, preferred because all ruby plugins(gems) are supported and maintained for this version. Mac users tend to prefer MacRuby.
- How do you handle version management, to switch between different versions of Ruby? - This can be done using a version management tool. Commonly used tool is RVM.
Deploying and scaling applications
- What support does Rails have for building scalable apps? - Rails provides caching mechanisms and you can achieve performance gains by applying page, action, and fragment caching. It also has support for memcached.
- Deploying Rails? One can choose between, Cloud infrastructure provider + Dev op engineer || Cloud infrastructure provider + a tool like Chef to take of deploying multiple servers || Heroku(that takes care of everything, but is a bit more expensive).