Rails is a web development framework written in the Ruby language. It is designed to make programming web applications easier by making several assumptions about what every developer needs to get started. It allows you to write less code while accomplishing more than many other languages and frameworks. Longtime Rails developers also report that it makes web application development more fun.
Ruby
Ruby is a Dynamic Interpreted Language and it is a strong Object Oriented Programming language, in which everything from numbers to strings are represented as objects. It is case-sensitive. It has single inheritance like java and strong security features. And it also supports the garbage collection like many other languages. Ruby recognizes all data types easily; programmers need not declare variable types.
Ruby provides various class libraries start from the basic data types to advanced level thread and network programming. Ruby has the scripting features similar to perl and python and Object Orient concept from c++ and java. Ruby is simple syntax and it is code is easy to read and understand.
As a scripting language, Ruby is an effective tool for small projects.
Using Ruby will often offer a different perspective on problem solving.
As the cost of software maintenance is roughly proportional to the number of lines of code, and Ruby programs are short and concise, they tend to be easier to read, understand, and maintain.
Ruby is available to everyone since Ruby is an Open Source offering it is free.
Rails
Rails is a framework. And Ruby is the base foundation for Rails. . It is often referred as Ruby on Rails or RoR. It follows the same pattern as any other programming framework and it follows the MVC (Model View Controller) architecture. Ruby and Rails both have their individual existence and can very well go without each other. The basic rails concepts are “Convention over Configuration” and “Don’t Repeat Yourself”.
One of the many reasons to use Ruby on Rails is to save a lot of time when trying to code database-backed web applications. Applications that before take months to code with PHP or Asp.NET can be built in a matter of weeks with Ruby on Rails.
In RoR (using scaffolding), a compiler automatically generates basic pieces of code necessary for the “logistics” of a website — for creating, reading, updating or deleting data in the database
The MVC Architecture
Rails is organized around the Model, View, Controller architecture, usually just called MVC. MVC benefits include:
- Isolation of business logic from the user interface
- Ease of keeping code DRY
- Making it clear where different types of code belong for easier maintenance
The Components of Rails
- Action Controller
- Action View
- Active Record
- Action Mailer
- Active Resource
- Railties
- Active Support















