Last year I held a series of non credit Rails courses for University of Texas Students, i’m happy to announce that i’ve been granted an Adjunct Professor position at the UT and I’m teaching a for credit course in Databases and Rails. Lucky for you, i’m a sucker for online learning, so i’ll be putting all my course material online, right here.
This Ruby on Rails course is 10 weeks long and assumes you know very little about programming and have not used Ruby, Rails, or Databases previously. The videos are broken up by topic, so if you know one topic you can safely skip that video. Some weeks have exercises and quizes, this is the most important part of the course. Learning a new programming language or framework is like learning a new language, you have to practice to get good at it.
I’m taking a fairly non traditional approach to teaching Rails, so even if you’ve been coding for a year or so, you’ll still likely get something out of the course, especially the exercises. Please enjoy and share the material (all Creative Commons Attribution) and as always if you have any comments you can find me on Github and Twitter @schneems. If you’re new to programming don’t forget to check out command line basics.
This first week we focus on databases and won’t get into Rails until the second week. Skipping around is encouraged however if you don’t understand something please go back and check the previous material.
The first part of this lecture covers the format and content of the course, why we use databases, and how the web is structured around data and data storage. It’s fairly non technical, so feel free to skip if you already know how data on say Facebook gets saved when you submit a status update.
The first video in this series covers modeling a relationship between a car’s user and the car in databases. There are many different ways we could represent that relationship so this lecture covers quite a few of them, and talks about why or why not to represent your data using one of the methods.
1) Find 5 real world relationships and describe them using the database vocabulary we talked about in class. Has many, belongs to, has many and belongs to many, and one more we didn’t discuss has many through.
2) Build your first Ruby on Rails app. This exercise is about seeing the potential of Rails and getting you introduced to the technology. Don’t worry if you don’t understand all the directions, we will cover them ail in depth in later classes.
This week we will be focused on building cool things with Pure Ruby (no Rails). We’re going to cover some Ruby basics, and then dive into an exercise where we build an HTML generator using only Ruby. The students really enjoyed the exercise, and got quite a bit out of it, so you shouldn’t skip it. Even if you’ve been using rails for years, the exercise might give you new insight into how exactly some of that Rails magic works.
This week’s exercise will cover building a ruby backed website with no rails. First go to the Building Views in Ruby Exercise. Then fork and clone the project to your local machine. Continue by following directions in the readme.
In this week’s videos we will be focused on URLs and HTTP wich are used in all of the web, not just for Rails. We’ll then take a look at how these two things can be brought together to form routes for our website, and how to map routes to views.
This week’s exercise use all of our view knowledge and all of our model knowledge together to build a website that allows us to view and add data to and from our database. We’ll also use the info we covered about HTTP and URLs in the videos. First go to the [Routes Model View Exercise](https://github.com/schneems/routes_controller_exercise] Then fork and clone the project to your local machine. Continue by following directions in the readme.
Welcome back, so far we’ve taken a deep dive on models, views, and routes. While we’ve talked about controllers we haven’t talked about what they do, or what they’re good for. Guess what we’re talking about this week (hint, it’s controllers).
If you’re new to Rails and Active Record, or you’ve been using them for some time, there are likely methods you’ve been overlooking. This week I take a look at the most common SQL Query interfaces for Active Record.
This week we’re going to tackle some important concepts in Ruby like Dealing with Nil and using Modules in Ruby. We are also going to cover importing data from a spreadsheet, rake, rubygems, bundler, and talk a little about Rail’s testing ecosystem.
This week we’ll start a Hero’s journey to build a site similar to Reddit. You’ll need to use everything we’ve learned so far. This isn’t a follow along copy and paste tutorial, this is how I work when I’m making websites. Good luck, you’ll need it. Building Building Reddit in Rails
We are close to wrapping up our 10 week Rails Course. This week we will cover a handful of topics commonly encountered in Rails projects. We then wrap up with part 2 of our Reddit on Rails exercise!
By now you should be hard at work on your personal projects. The students in the course just presented in front of the class with some live demos and a brief intro to to the problems their app were solving. Maybe set aside some time this week to show someone your progress, block off 5 minutes and describe what goal you are working towards, the current state of the project (is it almost done, just getting started, needs UI, etc.), and then show them a quick demo of the app. Explain what type of feedback you are looking for (conceptual, design, usability, etc.) and see what they have to say.
Now that you’ve spent 40+ hours pouring over videos, exercises, and quizzes where do you go from here? To answer this question I made a short video.
You’re done. Go home, celebrate. Follow me on Twitter @schneems, and don’t forget to tell a friend how much you learned from this course.