Exercise Monday

Goals: Follow along with the weekend's homework to successfully configure a Firebase database to work with an Android application. Then, practice creating event listeners, saving 'plain old Java objects' to your data store, and retrieving information from Firebase to display back into your application.

Warm Up


  • What is a node? What does it represent?
  • How do we listen to a node?
  • How do we stop listening to a node? Why would we want to do this?
  • What is a data snapshot? What process provides a new data snapshot to an application?
  • With your partner, walk through the basic steps that occur in order to save a new piece of data to a Firebase database in an Android application.

Code


MyRestaurants Continued

Before beginning the Discussion Forum, follow along with the weekend homework to integrate shared preferences and Firebase into our ongoing MyRestaurants application.

Discussion Forum (Two-day project)

You and your partner will spend the next two days building a discussion forum. This forum may be based upon one of the popular discussion forum apps already available, such as Psst!, Reddit, another app; or it can be something entirely of your own creation!

Message boards are very common type of app! Take advantage of these two days to create a well-executed portfolio project that demonstrates your capability to create such a popular style of application.

This app should:

  • Allow users to post messages that show up in their app.
  • Allow users to browse existing categories.
  • Allow users to create a new category, if the category they're looking for doesn't already exist.
  • Allow users to select a message to read more.
  • Allow users to comment on/reply to messages.

Further Exploration

  • Allow users to upvote a message or response they like.
  • Allow users to downvote a message or response they dislike.
  • Allow users to respond to other users' comments.
  • Add any features you'd like to see in your forum app. Have a new and exciting idea you haven't seen in other discussion boards? A feature you wish YikYak, Reddit, or another popular discussion forum offered?

Peer Code Review


  • Does the application successfully link to Firebase?
  • Is the Firebase database structured correctly?
  • Are Firebase listeners providing updated data automatically?
  • Is the code well-refactored and easy to follow?
  • Is this an application you would use? Why or why not? If not, how could it be improved?