You’re probably here because you want to learn the Ruby on Rails framework but you may not be entirely sure what it is. Well, Rails is just a bunch of ruby code written to handle the parts of a web application that you don’t often want to think about.
Rails uses, as you’ll often hear, “convention over configuration”. That means that the creators of Rails have made a lot of decisions for you about how things should be structured and how the code should run. You can change them, but it’s best if you just go with the flow and work within their rules (especially as a noob).
Think of it like buying a car – you probably don’t care about individual specifications of engine parts, which companies shipped the parts to the final production facility, or even what legislative requirements a car has to meet … you trust the manufacturer to have figured all that out and you just want to be able to buy the nice looking car knowing that it works as intended. Rails is your Ruby manufacturer.
Why Rails? Why not. There are dozens of possible technologies out there to choose from and, frankly, they do pretty much the same things. Rails is attractive because it’s a relatively straightforward and very well documented framework that’s used by tons of great startups and tech companies today and it has a very strong community of developers and students who support it. It lets you put up a functioning website in hours, not days or weeks. The “in” tech will probably be something completely different in a few years, as it always is, but Rails presents a great platform on which to build the skills you need to carry you to that next phase.
Because Rails has made a lot of decisions for you, you can work incredibly fast. You can have a website up on the internet (though it won’t look like much) within a couple minutes. The very first time you generate a new project, everything is in place so you just have to fire up your local server (by typing simply
$ rails server) and you’ll already see the Rails welcome page up there. Then it’s just a matter of plugging in all the pieces you actually need to make your rich web application run.
It also means that you can start immediately making small changes and seeing how they affect your application where before you would have had to build a ton of infrastructure and write lots of code before seeing a single thing change live. Rails makes your life a whole lot easier!
Rails also firmly organizes your code using an MVC pattern which you will come to know and love.
The best way to understand Rails is to use it, so we’ll spend a bit of time on some videos and reading but you’ll mostly be building your own Rails sample app. You may have no idea what you’re doing, and that’s okay, but at least you should begin to understand what you DON’T know and what you’ll want to pay attention to going forward. A good tactic is to write down all the things that confuse you and either go looking for them on your own or keep them in mind for later when we do our deep dive into Rails.
Look through these now and then use them to test yourself after doing the assignment.
This section contains helpful links to other content. It isn’t required, so consider it supplemental for if you need to dive deeper into something.