Momentum logo
Team 14 Classroom

Getting Data Using APIs with JS and Fetch

Posted on Aug 2nd, 2022

Today’s topics

  • The next task is to start working with fetch and AJAX.
    • Using JSON for data
    • Basics of HTTP requests
    • Make GET requests with Insomnia client
    • Make GET requests using the Fetch API and display response data on a page

🎯 Project: MyTunes

You will build a clone of iTunes using the iTunes API. It will be due Thursday morning.

🔖 Resources

HTTP

APIs

AJAX, Fetch, & JSON

⭐ EXTRA/TMI

Fetch requests use JavaScript promises to handle responses. Promises are a much bigger topic than we will get into right now, but if you want to know more about what a promise is and how to use it beyond the context of AJAX requests, you can start with the MDN documentation about it.

🦉 Notes

JS Objects

Posted on Aug 1st, 2022

Today’s topics

  • Introduction to the object data structure in JavaScript
  • Storing data in and retrieving data from objects
  • Using DOM manipulation to render data from objects on the page

🎯 Project: Build a customer directory

  • Customer Database Link to assignment invitation
    • We will be working on this assignment as teams in class.
  • ➡️ Continue to preview the next topic, Asynchronous JavaScript and the Fetch API, by completing this section in Thinkific. We will use what we are learning about objects to handle the data we get back from our fetch() requests.

Examples

🔖 Resources

⭐ EXTRA/TMI

🦉 Code, Notes & Videos

JavaScript and the DOM

Posted on Jul 28th, 2022

Today’s topics

🎯 Project for the week: JavaScript Calculator

Part 2: Due 4pm Today, July 28

Directions.

🔖 Resources to use as reference on Fetch

⭐️ EXTRA/TMI

This resource is really not at all necessary to understand or do the project, but if you want to know more about the concept of tree structures in computer science, check out this piece from Vaidehi Joshi’s BaseCS blog series. She is awesome! There is also a thoroughly delightful accompanying BaseCS podcast with the equally amazing Saron Yitbarek.

And here is more info about what is happening when a browser renders a page – very enlightening, although not strictly necessary at this stage:

This is a good explanation about how JS events “bubble” up the chain of elements on the page:

If you would like to know more about the JavaScript Event Loop and how it works, I highly recommend this resource. Don’t miss the video of the conference talk that goes along with it – it’s excellent:

JavaScript and the DOM

Posted on Jul 27th, 2022

Today’s topics

  • Continue with more examples of:
    • DOM manipulation with JS
    • Events in JS
  • Work on Calculator Project
  • Event Delegation
  • In-class practice CodePen to fork

🎯 Project for the week: JavaScript Calculator

Part 2: Due 4pm Thursday, July 28

When you complete part 1, continue to part 2. Continue in the same repository as part 1, nothing additional to clone for part 2. here.

🐈 Events 🐶

🔖 Resources to use as reference

⭐️ EXTRA/TMI

This resource is really not at all necessary to understand or do the project, but if you want to know more about the concept of tree structures in computer science, check out this piece from Vaidehi Joshi’s BaseCS blog series. She is awesome! There is also a thoroughly delightful accompanying BaseCS podcast with the equally amazing Saron Yitbarek.

And here is more info about what is happening when a browser renders a page – very enlightening, although not strictly necessary at this stage:

This is a good explanation about how JS events “bubble” up the chain of elements on the page:

If you would like to know more about the JavaScript Event Loop and how it works, I highly recommend this resource. Don’t miss the video of the conference talk that goes along with it – it’s excellent: