Introduction3:22 with Jay McGavren
Learn what to expect in this course.
Take These Courses First
If you're not comfortable with these topics, you should strongly consider taking these courses first:
Studying is a skill! You'll have an easier time in this course, and the courses that follow it, if you follow a few basic strategies. We've put together some videos to help:
We have three different workshops to help you install a Ruby on Rails 5 development environment on these platforms:
The MVC Pattern
One of the conventions Rails follows is a pattern that's widely used in software development, called "Model, View, Controller", or MVC.
- The models write Ruby objects to the database, and read them out again later.
- The views show data to users, most often in the form of HTML webpages.
- Controllers respond to requests from users, usually by coordinating the model and the view.
[MUSIC] 0:00 Hi, I'm Jay. 0:04 A web developer and teacher at Treehouse and 0:05 I'm here to introduce you to Ruby on Rails. 0:08 In this course, we're going to use Rails to create a blog and 0:11 online journal filled with posts. 0:13 Rails is an awesome web framework that allows you to quickly create dynamic 0:16 websites that can store data users center. 0:19 Rails helps power popular websites like the hospitality company Airbnb, 0:22 the project management tool Basecamp and even the Treehouse site. 0:26 And what makes Rails so awesome is that it favors convention over configuration. 0:30 In the bad old days of web development, 0:34 you had to decide what to name your database tables. 0:37 You had to decide where to store your HTML templates. 0:39 You had to decide what to name the classes that controlled everything and much more. 0:42 And then you had to configure your application so 0:47 that it knew where to look for all those moving parts. 0:49 It could take weeks before you served your first web page. 0:51 Rails is different because it follows conventions for all of these things. 0:55 Database tables have standardized names. 0:58 HTML templates are stored in standardized folders and 1:01 the code that controls all this is set up in a standardized architecture. 1:04 And if you stick to these conventions, 1:08 Rails will automatically know where to look for everything you set up. 1:10 Once you know what you're doing, you can have a simple app up and 1:14 running in a single day. 1:16 One of the conventions Rails follows is a pattern that's widely 1:18 used in software development called Model View Controller MVC. 1:22 The models write Ruby objects to the database and read them out again later. 1:26 Views show data its users most, often in the form of HTML web pages. 1:30 Controllers respond to requests from users, 1:35 usually by coordinating the model and the view. 1:38 You'll hear us talk about models we use in controllers lots more during the course. 1:41 Before we start let's make sure we're on the same page. 1:45 We're assuming you've got Ruby and Rails installed on your computer. 1:48 If not, check the teacher's notes for 1:52 a link to our installing a Rails 5 development environment videos. 1:54 This course assumes you've gone through all the prerequisites 1:58 listed on the course page. 2:01 You need to already be familiar with classes and objects, methods and 2:02 method calls and the differences between local variables and instance variables. 2:06 If you're not comfortable with all of these things, do yourself a favor and 2:11 review the prerequisites before starting this course. 2:14 A bit of knowledge about databases and HTML will be helpful, too. 2:18 We've included links to useful resources in the teacher's notes throughout 2:22 the course. 2:25 If at any point you encounter something you don't understand, 2:26 check the teacher's notes. 2:29 The solution is probably there. 2:31 We've tried to adjust the pace of this material so that it's right overall. 2:33 But depending on what you know it's probably going to be too slow for 2:36 you in some places and too fast in others. 2:40 So take a moment to familiarize yourself with the video playback controls. 2:42 You can adjust the playback speed to be faster or slower. 2:47 You can rewind if you need to go over something again and you can pause if 2:49 there's text on screen that you need time to look at more closely. 2:53 Don't worry about memorizing the name of every method or 2:56 the location of every file that you see. 2:59 This course is meant to be an overview of how Rails works. 3:01 When you're done, you should know things like what a model class does and 3:05 how an ERB template works. 3:08 You don't need to know things like what parameters the form_for method takes or 3:10 how to make an HTML table. 3:14 We'll be covering details like that in later courses. 3:16 Okay, ready? 3:19 Let's create a Rails app. 3:20
You need to sign up for Treehouse in order to download course files.Sign up