Coder Social home page Coder Social logo

14-managing-state-and-middleware's Introduction

CF Lab 14: Managing State

Code of Conduct

Let's circle back to our UI logic... You know, everything that sets up the page for interaction. Now we can use our new tools of routing, middleware, MVC separation, SQL, and resource rendering.

Let's use these new tools to review the refactored components of the UI: author filter, category filter, the teaser link, and a bunch of click events.

Work with your partner to comment on the execution path for sections labeled with "COMMENT:". These items, which appear in the code immediately before the code they are referring to, are essentially TODO items that have been done for you and demonstrate the concepts presented during lecture. While you will not be building out any additional functionality for this assignment, you will need to describe what each newly refactored method does and where it points back to. The navigator for this assignment should be tracing the execution path and determining what each new method/update is doing while the driver will need to summarize the navigator's thoughts into a 1-2 sentence comment (below each "COMMENT:" item). Be sure to switch roles after 4-5 COMMENT items have been completed.

Helpful Hints?

  • Don't forget to npm i to download our modules!
  • Review the Article.findWhere method. This lets you grab a subset of articles by some field/value combo you pass in.
  • The "Read On" link is now a standard html link.
  • The filters now populate based on what's in the DB, not what's in the DOM: "single source of truth"
  • If there are spaces in a URL, we have replaced them with a '+'

Submission Instructions

When you are finished with lab, follow these steps to submit your work. Create one Pull Request (aka: "PR") from your Forked repo to the CF repo with your changes, and you'll each submit that same PR link in Canvas.

  1. Ensure that all your local changes are committed, and pushed to your origin repo.
  2. Visit the origin repo on github.com, and ensure that all of your completed work has been merged to master via Pull Requests within your repo.
  3. Create a new PR from your Fork to the CF repo and ensure the branches look correct.
  4. Fill in the template based on the text box prompts:
    1. Write a good descriptive summary of your changes:
    2. Be sure to include how much time you spent on it, and who you worked with.
    3. Briefly reflect on and summarize your process.
  5. When you create the PR, it will have a unique URL. Copy this link, share with your partner, and paste it into the assignment submission form in Canvas. Both the driver and the navigator will submit the same PR link.

Learning Objectives

  • Students will understand the role middleware in web application routing
  • Students will be able to extract query parameters from the PageJS context object and use next() to create a sequence of middleware functions

Resources

The relevant PageJS documentation


Feature Tasks

  • Accurately comment on each COMMENT item to demonstrate your understanding of the functionality of the app, and especially the execution path of the individual functions/methods.

Rubric

Criteria Pts
Meets all Assignment Reqs 6
Uses idiomatic code style 3
Follows proper Git workflow 1
Total 10

14-managing-state-and-middleware's People

Contributors

katherinehanson avatar sjschmidt44 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.