Unit 5: Third-party Services
Unit Essential Questions
You should use the questions below to assess your own learning and understanding of course material. These questions are also a good method of organization if you’re taking notes.
AJAX
- What is AJAX?
- How does AJAX work?
- Why would one use AJAX?
JSON
- What is JSON?
- How does JSON work?
- Why would one use JSON?
APIs
- What is an API?
- How do APIs work?
- Why would one use APIs?
Unit Readings
AJAX
- Read AJAX Introduction and/or Watch JavaScript and AJAX tutorial: What is AJAX?
- Read AJAX: Getting Started and/or Watch Learn XML HTTP Requests in JavaScript: AJAX Tutorial
JSON & APIs
- Read Working with JSON and Introduction to web APIs and/or watch Learn JSON in 5 minutes
- Read: Third-party APIs
- Play close attention to the “An approach for using third-party APIs” section! I strongly recommend you follow along with the tutorial and add in comments to your code to develop a better understanding of what the code is doing and why.
Recorded Lecture
The lecture below provides additional information on working with APIs which you may find particularly useful for completing the exercise below. However, if you feel comfortable with the material already, you may choose to skip watching this lecture. You can access a copy of the slides presented here.
Check your understanding
This optional exercise will have you practice working with an API to create a dynamic image gallery.
Complete the two functions for this Image Gallery JSFiddle using Unsplash’s API. Make sure you don’t change anything in the HTML or CSS! You only need to add code to the JavaScript box– there are 2 functions you need to complete, one for making the call to the API and the other for populating the data onto the site.
Additional Resources
- Review Mozilla’s Client-side web APIs Guides
- Review W3School’s Web APIs Tutorial
- Review W3School’s JSON Tutorial
- Review W3School’s AJAX Tutorial
- Review Github’s list of Public APIs
Unit Lab
This assignment will have you share your site with your peers to get feedback on your design.
Description
While this week we learned about third party services offered by APIs, integrating an API into your site may not make sense. You are welcome to use an API for your site if you’d like to but are not required to. This week marks the halfway point of the term so we’ll be focusing on getting and sharing feedback on our sites.
- Upload the URL (option 1) or video (option 2) of your site to the Canvas Discussion for Unit 5.
- If you have any specific areas you’d like feedback on, please share them.
- Explore at least 3 of your peers’ websites (or videos) and provide feedback on their website design. Consider:
- What’s the purpose of the site? How well is it accomplishing it?
- How easy to use and intuitive is the site?
- What is the site doing well? What are some areas of improvement?
- How interactive is the site? Do the interactions make sense given its purpose?
- If you were the target audience, would you revisit the site? Why or why not?
Option 1
If you’re using tools or frameworks that require you to run a server to test your site locally, please refer to Option 2.
Use a free hosting service to get your website onto the internet. The recorded lecture below shows how to use Infinity Free but if you’re familiar with other hosting services (such as Github Pages) you’re welcome to use that.
Option 2
If you’re familiar with a free service that will allow you to host your site, you’re welcome to use it. Otherwise, record a video navigating your site. Make sure to do it at a pace that allows the viewer to experience your site.
Recorded Lecture
The lecture below provides additional information on uploading a website to Infinity Free which you may find particularly useful for completing your assignment. However, if you feel comfortable with the material already, you may choose to skip watching this lecture.
What to Submit
Upload the URL (option 1) or video (option 2) of your site to the Canvas Discussion for Unit 5. Then provide feedback on at least 3 of your peers’ sites.
Requirements
- Student uploaded a video or URL of their site
- Student provided thoughtful and useful feedback to at least 3 peers.