You must complete and submit all of these assignments. It is due the Saturday before the start of the inning at 5pm.
Submit your work here: Survey Link
You must use Ruby 3.2.2 and Rails 7.0.x for all of the work in this module. You can check your version by running
ruby -v and
rails -v in your terminal.
Note: If you are installing Ruby 3.2.2 for the first time, you WILL have to reinstall all of your gems. Gems reside on your computer per version of Ruby, and every time you add a new version of Ruby, you will have to reinstall all of your gems for that version of ruby.
If you need a guide on how to upgrade check this out.
Core Learning Goals of Mod 3
- API Development / Consumption
- Authentication / Authorization systems
- Managing deeply-nested data collections
- Refactoring code into new Design Patterns
To start your Professional Development work in mod 3, plan to spend 60-90 minutes completing this async lesson on crafting your Resume.
Intro to APIs
Everything we build in Mod 3 will focus on the theme of building and consuming APIs.
Here are some helpful videos and tutorials that you can use to familiarize yourself with both building and consuming APIs. The videos are using Rails 5, but the concepts are the same. The build an API in Rails Tutorial has been updated to use Rails 7.
- Instructor Dione Wilson demonstrates the process of building an API for 2006
- Instructor Ian Douglas demonstrates the process of building an API for 2005
Do all of these
- Build an API in Rails Tutorial
- Play with Postman in order to use the API you built out in the previous lesson.
- Consuming an API
- Review your reflections on your M2 projects, and revise / add onto them.
Stuff to Read and internalize
Authentication / Authorization
Write up some notes and ideas on the following:
- you need to store a user in a database table; what do we need to know about them (ie, email, password)
- how can we store a password in a secure way (ie, if our database is compromised, how can we protect their passwords from prying eyes)
- how would we store the idea of what a user is allowed to do on a web site
- how would we build a safe login page
- how could we tell if a user is logged in since HTTP is “stateless”
- how could we allow a user to “stay logged in for 7 days” even if your Rails app is restarted
Deeply Nested Collections
When consuming APIs, the data is often returned in deeply nested collections, so you will need to tap into your Mod 1 skills to practice digging through them to retrieve the data you need.
Fork and clone Here Be Dragons. Get the tests to pass. This is something you’ll turn in with your submission, so make sure you make a forked copy of it.
- On one piece of paper, write out all of the parts of an example
HTTP GETrequest (Diagram the DNS look-up as well as how a Rails Application would handle the request via MVC)
- On a separate piece of paper, write out an example 200 response to that request with all of the parts
- Bonus write your explanation as a metaphor
Rails “params” magic.
How does “params” get built in Rails, and what precidence is given for query parameters (ie
?id=5 in a URL) versus dynamic placeholders (ie
/book/:id) versus data sent in the body of a request from a form.
Start writing up some notes based on the Rails documentation:
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.
For further exploration
If you have time, here are some activities that will be valuable not only in Mod 3, but in Mod 4 and the job hunt as well.
Data Structures And Algorithms
We are going to be covering various data structures to prepare you for the job hunt and technical interviews. Complete this former M1 project, Beat Box
If you’ve done Beat Box, let’s get serious and have a Date Night