Home
1/10/20152
1/4/2015
12/28/2014
12/14/2014
12/13/2014
12/6/2014
11/30/2014
11/29/2014
11/23/2014
11/22/2014
11/15/2014
11/12/2014
11/8/2014
11/1/2014
10/31/2014

December 28
2014

What is Rails?

Since all of this learning is going to culminate in Rails, I thought I'd begin exploring what exactly it is.

Rails is essentially a software library that extends the functionality of Ruby. Like other libraries, it is called a Gem, and can be installed separate from other Gems. Basically Rails creates a framework for using Ruby to interact with HTML/CSS/JavaScript. This creates the "back-end" of a web app.

Because of Rails, web developers are more easily able to maintain and upgrade websites. The conventions that exist create a structure that most developers follow. As a result, when you're looking at a Rails app, you'll be able to easily assess where the parts are, and where they belong.

Integral to this structure is the Model-View-Controller pattern. It is a means of keeping your data separate and clean. The Model handles communication with the database. The Controller handles the input from the user at the website. The View handles displaying of the data.

To aid in the clarity that is created within the Rails hierarchy, it also automatically creates table names, in your database, that match up with the class names that are implemented. It even has the ability to do so in the logical plural way that we would normally creates table names. If the class is called "Person", then the table that would be generated would be called "People".

Rails prefers Convention over Configuration. This means that instead of each user defining how everything works in their own way, Rails has predetermined the "best" ways to do things and users have only to implement them. This doesn't mean that developers are unable to override the conventions to suit their purposes, but it will certainly save time for the pieces that can be standardized. This also means that future developers will be able to read your code more easily.