How I’m going to teach authentication
I read through a hundred responses. I gave myself a week to think through it. And I came to a conclusion.
I’m going to teach authentication in a separate course.
I want to share why I made this conclusion.
Why I’m teaching authentication in a separate course
- Students may get overwhelmed
- Students need to learn fundamentals
- There’s a lot to teach already
Students may get overwhelmed
Some people responded with opinions that match my thoughts. For example, Nick said that I shouldn’t distract learners. I should reduce complexity.
Another example. Klaus said his enemy to learning is picking up too many subjects.
As a teacher, I’m here to help reduce complexity and increase focus so you can learn things well. I shouldn’t be adding complexity unless necessary.
It’s important to teach the right things, in the right order, at the right time. If I teach the right things in the right order at the right time, people learn.
Students need to learn fundamentals
Some people said I can create a server, then teach students to use the server I made. This way, I can teach authentication without diving deep into servers.
It’s not enough to teach students to use a server I made. They need to learn about the server environment. They need to learn to create their own servers. Students need to learn fundamentals, not abstractions.
If they learn abstractions, they won’t understand what’s goes beneath the hood. When they don’t understand what goes beneath the hood, they think it’s magic. When they think it’s magic, they’ll get locked in. They’ll be afraid to leave it.
I’ve seen this over and over with students who learn Bootstrap before CSS. They’ll use Bootstrap for every project, even if they shouldn’t use it. They cannot live without a CSS framework.
But students who learn CSS fundamentals can do without frameworks. They’re confident in their abilities. They can use a framework if they need to, but they’re not locked in.
I want my students to feel confident in their abilities.
This is also why I’m not going to make a server for my students. If I teach servers, I’ll teach students to create their servers (which is a huge topic).
We have a lot to cover already.
To learn Ajax, we need to learn about XHR and Fetch. These two technologies let us perform Ajax operations.
I also want to teach Async/await. There are nuances in async/await that are not immediately obvious. I want to dedicate enough lessons to uncover these nuances.
We already have five topics to dive into here—XHR, Fetch, Callbacks, Promises, and Async/await. And we’re not done. There’s more.
We need to know how to read API documentation. If we know how to read documentation, we can make any request we want.
To read documentation, we need to understand requests and responses. We need to know what makes up a request. We also need to know what makes up a response.
We need to be able to set the correct method, the correct headers. We also need to know how to format the request body. We also need to understand CURL.
We need to know how to handle Ajax errors. I hope I don’t need to explain why. Error handling is important. We don’t want to tell our users “something went wrong” and leave them in the lurch.
To handle errors, we need to know when errors happen. We also need to know how to deal with them when we use XHR and Fetch.
We need to know how to handle complicated requests. What if we need three different resources at once? What if we receive a paginated resource? I want to teach students how to work through these real-world situations.
Here’s an outline on what I’m teaching on Ajax. There’s so many things to talk about that I had to break it into two modules!
As you can see, there’s already a lot to learn about Ajax even if I exclude authentication.
But since authentication is important, I’ll also cover some authentication.
What I’m covering about Authentication
You’ll learn how to perform basic authentication with XHR and Fetch. You’ll also learn how to perform OAuth authentication if you have an access token.
You’ll also learn JSONP to use APIs that don’t support XHR and Fetch. JSONP is an older technology, but it’s an important one to understand if you don’t have access to a server.
I want my students to learn. That means I need to teach the right things in the right order at the right time.
Thanks for reading. Did this article help you out? If it did, I hope you consider sharing it. You might help someone else out. Thanks so much!