I've been prepping for Dev BootCamp for almost 9 weeks now, which marks around 9 weeks of answering the question, "Oh, what language are you learning?" I've confidently, yet mindlessly, answering, "Ruby on Rails!" I know what Ruby is - and even know how to code in it a bit! - but had no idea what the 'Rails' part of my answer meant. So with one week left until I go onsite in NYC for bootcamp, I say better late than never!
Most of us know by now that Ruby is one of many programming languages. In a technical sense, Rails is a software library additive (or a RubyGem) that provides a framework for building web applications and establishes conventions to facilitate collaboration amongst programmers. Rails integrates Ruby with HTML, CSS, and JavaScript to create a server-side platform for web applications.
On a higher-level, Rails encompasses a vast community of programmers who continually produce software libraries to simplify the webpage-building procedure for uesrs like you and me! The Rails community largely holds the same values and coding practices, while supporting each other to rectify issues - kind of like a little family.
The easiest way for me to understand Rails is by looking at its structure and guilding principles, and that I shall to do to help you understand Rails as well.
Rails follows the model-viewer-controller (MVC) pattern, which organizes code into sections of related code called the model, the controller, and the view.
"The model handles all database interactions, the controller handles all web server interactions, and the view generates the HTML code for the front-end display in the browser. The three sections keeps code compartmentalized and neat, and prevents functions from intertwining into a complicated mess.Rails takes the MVCs and bundles them into a single package for web developers. Every component of the MVC paradigm is implemented in Ruby and every effort is made to abstract and hide unnecessary complexity from the progammer. Rails developers only need to install the rails gem and they'll have a complete development environment for writing Rails web applications as well as a web server written in Ruby for running them.
Aligning with the structure are two established design principles of Rail that help guide developers with the construction of web applications: