Open s4dmw opened 9 years ago
Please answer any of the questions from Monday that you didn't get to and additionally refresh your memory (and notes) on how authentication works with the Github API by answering these questions:
Firebase is a DataBase as a Service (DBaaS) tool that can act as a ReSTful API for our Angular JS front-end applications. It also has a free hosting tier for client-only applications like ours and a JavaScript authentication library to make integrating with OAuth providers -- like Google, Facebook, and GitHub -- much easier. We don't need the API parts yet, but read up on Authentication with Firebase, specifically authenticating with GitHub.
Finish up the three features you identified for USERNAME.github.io
. Be sure you're using feature/*
branches with PRs into remodeling
and open a PR from remodeling
into master
.
Tonight, we need to learn about submitting forms with Angular and fetching from and pushing to a real API. At the bottom of your GitHub profile page, create placeholder templates for comments and a comment form like we see on every GitHub Issue. When the page loads, fetch all the comments for your WIP Issue from the GitHub API and display them in the comment template. When someone submits the comment form, add that comment to your WIP Issue via the API and display it in the list of comments. It should look and work exactly like the comment form on your WIP Issue! Hmm...
If you haven't figured it out yet, you're going to need to authenticate in order to create those comments. A simple solution would be to ask the user for credentials right in the comment form, but do you really want to ask for their username and password every time? Should you ever ask for someone's password? Use Firebase Auth to authenticate with GitHub instead, and use the credentials you get to send the API request.
Have you ever noticed that GitHub seems to update itself? When I post a new comment on an Issue, it automatically appears on everyone else's screen, as long as they're still connected to the internet. How did they do that? Can you find out where in the API this activity is published?
https://github.com/s4dmw/s4dmw.github.io/pull/37 reviews: https://github.com/ShayHall/shayhall.github.io/pull/35 https://github.com/Ricecoder/ricecoder.github.io/pull/32
https://github.com/s4dmw/TIY-Assignments/pull/52
remodeling to master: https://github.com/s4dmw/s4dmw.github.io/pull/38 feature/responsive to remodeling: https://github.com/s4dmw/s4dmw.github.io/pull/39
test comment 1
test comment 2
28 -- YOUR NAME
USERNAME.github.io
journal-week-7
intomaster
feature/*
intoremodeling
remodeling
intomaster
journal-week-7
frommaster