nashville-software-school/bangazon-inc

Rearrange / Extend Identity Chapter

Closed this issue · 5 comments

The order should be something like this:

  1. High-level description of identity framework
  2. Create a new project with Identity
  3. Create a custom ApplicationUser class
  4. Update ApplicationDbContext to inherit from IdentityDbContext<ApplicationUser>
  5. Update Startup.cs to use to ApplicationUser
  6. Update _LoginPartial.cshtml to use ApplicationUser
  7. Scaffold Registration page (mention scaffolding the login page)
  8. Demonstrate accessing current user from a controller and from a razor view

Note: the final item replaces what is currently chapter 4, "Accessing User Data in Razor Templates"

I know you know this, but on point 4, should be IdentityDbContext not IdentityUser

Also, do you find that your students get whats going on with identity? particularly around seeding the initial users and the setup of everything. I taught Identity 2 or 3 times and my we never really had a deeper understanding other than just do the thing, and it immediately limited them to doing their capstones with entity framework, or getting confused when I told them how to access the dbcontext's connection to make dapper queries.

So we don't talk about identity at all anymore. I just let them use firebase again for auth.

I know you know this, but on point 4, should be IdentityDbContext not IdentityUser

Oops. Thanks.

do you find that your students get whats going on with identity?

I don't have a yes or no answer to that question. I think they conceptually understand what identity is about. They do understand seeding the database with an initial user. ...I don't know, I think they understand Identity as well as they understand EF. Less well than MVC.

it immediately limited them to doing their capstones with entity framework

IMHO, this is the biggest problem with identity. I have seen exactly ONE student in three cohorts who did any SQL in her capstone. I'm open to discussing changes, but right now I'm trying to improve the current curriculum so that it's better for cohort 32.

gotcha. that makes sense. I'm happy to talk about how we handle it, but the short story is we spend about 3 hours on entity, mostly just telling them what it is and why you would choose to use it, how the learning/complexity curve works, and showing some quick code examples. we spend no time on identity, and abotu 1.5 hours on the concepts of MVC and Razor.

The differences between the full- and part-time programs relating to MVC are also at play here. Personally I think it’s important to have at least one project that uses MVC. Server-side rendering is an important concept and still widely done.

As the course stands now though we do essentially force students to build a capstone in mvc with entity and identity. I definitely don’t like that. I’d much rather students have a choice.

Feel free to take a look at my PR for this issue. I’d appreciate your thoughts.