What is Ruby on Rails?
As a software development team in Perth, who focus on the best we like to help you to know more about Ruby on Rails.
Rails is a model-view-controller (MVC) framework and follows the concepts of convention over configuration (COC) and don’t repeat yourself (DRY).
COC – means a developer needs to configure only the unconventional aspects of the application and otherwise can use the set of default conventions.
DRY – means a developer does not need to repeat code, and is aimed at reducing repetition of patterns. A change in a single element does not necessitate the modification of other related elements.
Let’s see why Rails is the platform of choice at Codesquad and for most other developers.
Convention over configuration
Most frameworks need pages of configuration code. But with rails, you need minimal configuration if you follow the default naming conventions.
Rails uses metaprogramming to write programs, unlike other frameworks that use extensive code generations. It does use code generation but relies extensively on the metaprogramming capabilities of Ruby.
Three default environments
The three environments – development, testing, and production – makes the entire development cycle easier. The testing environment has built-in testing that makes test cases easier to write and run.
Rails uses the Active Record framework, which saves objects into the database. The database and the objects are tightly matched, so it lets you examine a project’s database schema very easily.
You may need code in the early stages of a project to see how all components work together. Rails’ scaffolding automatically does much of the code generation that you need.
Ruby on Rails is not to be confused with Ruby which is a programming language. Here are some of the major differences between Rails and Ruby.
|Ruby on Rails||Ruby|
|Is a Web development framework||Is a programming language|
|Written in Ruby language||Programmed in C language|
|Based on the conventions of COC and DRY||Based on the principle of User Interface Design|
|Used to develop web applications||Used to build desktop applications|
Web application framework– a software framework designed to support development of web applications.
Open-source – a software whose copyright holder makes it freely available and grants the right to use, modify or distribute as per the user’s requirement.
Metaprogramming – a programming technique in which a program can modify itself or write programs.