Using paper and a writing utensil:
- On one piece of paper, write out all of the parts of an example HTTP GET request
- On a separate piece of paper, write out an example 200 response to that request with all of the parts.
- Bring this to class day 1. This is your ticket into Mod 3 :)
Entering Module 3 with a solid understanding of ActiveRecord and SQL is key to getting the module off to a good start. Make sure you are able to write and understand queries that involve multiple JOIN
statements and that combine math functions.
- Complete and understand the Intermediate SQL I challenges.
- Complete and understand the Intermediate SQL II challenges.
- Complete and understand ActiveRecord American Gladiators. If you have not completed, ActiveRecord Obstacle Course, recommend reviewing/completing that prior to tackling this.
Additionally, in Module 3 we will be creating applications to deliver and consume APIs. What is an API, you might ask? Watch this video to find out more.
Rewrite your Little Shop routes.rb
:
Module 3 requires you to know URLs, paths and HTTP verbs inside and out. Rewrite the routes file for your Little Shop to use only methods that map directly to HTTP verbs: get
, post
, put
, patch
and delete
. You will probably need to add to:
and as:
parameters to make sure your apps continue to work, and tests continue to pass.
If you wrote your routes that way already, replace them using resources
.
If you do not own the repo for your project, fork it, and rewrite the routes file individually.
NOTE: This is not because one way is better, but it's extremely important to understand what every line of your routes file is doing. Rails Engine demands a solid understanding of Rails routing.
Option 1: See if you can create a Rails API that responds to a request to /api/v1/items
with JSON. Review the video above to see what this will look like in your browser. Hint: that looks an awful lot like a double nested route to me.
- Don't worry if you can't get this to work.
- Don't worry about testing.
- Timebox your work so that you come to M3 refreshed.
- The goal here is to tinker and see if you can get a thing to work. Stop working if it stops being fun.
- Use the internet to see what you can find about creating a simple Rails API.
- Feel free to talk to mentors or colleagues about potential resources.
- Don't just use the first resource you find. Cast your net wide and then pick a few resources to use as touchstones.
Option 2: Download Postman or sign up for an apigee account. Dig into the documentation for an API and see all the different data you can get back.
Practical Object-Oriented Design in Ruby: Sandi Metz's book permanently changed the way I program. In this book, she teaches you how to write exceptionally well-factored code. At least try to read the first three chapters if you can. Head First SQL: A nice introduction to SQL.
JavaScript is the scripting language of web browsers. During Module 3 we'll start getting our first introductions to JS and we'd like you to work through some basic materials as a preparation.
Focus primarily on the sections for:
- Functions
- Control Flow
- Data Structures
- Objects I and Objects II
Jquery is a popular javascript library for manipulating the content of web pages. Dip your toes in with this introductory Jquery class.
- Revisit your personal site. See if you can upgrade the styling. Consider using Sass.
- Re-style your Rails Mini-Project or Job Tracker.
- Dive into some tools
- Good old fashioned HTML & CSS
- Flexbox: newer HTML & CSS
- CSS Selectors
- Sass
- Bourbon, Neat, Bitters
- Materialize
- Bootstrap
- Explore an alternative templating language