AM6 is very different from the previous achievement milestones in this course. Given that Meteor is a new topic for us (but also in the programming community) and due to its non-trivial philosophy, in order to give you time and opportunity to understand it better, instead of creating an app from scratch, you'll be following along with the book "Your First Meteor Application" to build a game leaderboard as you read the book.
When you complete the book and you add some CSS to make the app look more interesting, you'll be uploading it on the meteor server, for everyone to test it. Here is how a commpleted version might look like:
Create a meteor project with the name username_am6
.
Once you have created such a project, you will be following the chapters of the book Your First Meteor Application. This book takes a very gentle approach and explains everything that you need to know to build a first app, even how to work on the command line.
As you read the book, there are little challenges that either the author or I introduce in order to make you go beyond of what is being shown in the book.
You will be solving these challenges or answering questions (see below) and then completing a document with your answers.
You should be able to complete the book and the questions in about 3-4 sessions of 90 minutes each. Don't try to complete the whole book in one sitting, it is a lot to take in at one time, and you would like to think more about some of the topics.
Some of the concepts were already introduced in class (or will be soon), and the book will reinforce them and give you a good opportunity to practice.
Create either a Google Doc or a Word Doc to record the questions and answers. Copy one question at a time from the list below, then, after having completed a particular step related to that question, record your answer. In some occasions you'll be asked to provide a screenshot.
Important: Keep in mind that not all code shown in the book will go into your JS or HTML file. Sometimes code is only shown to explain a point or to be run on the console. Don't copy code mindlessly in your app, because this might cause errors and problems that are difficult to debug.
Note about the data: In chapter 4 (Database Part 1), in the section "Inserting Data", instead of using the names provided by the author, use names of the students in our CS249 class, putting your name first in the list. Here is some code you can run in the browser console once, in order to insert multiple names at ones in the database:
var names = ['Sophia', 'Audrey', 'Meridian', 'Lucy', 'Susie', 'Jamie'] for (var i in names){PlayersList.insert({name: names[i], score: 0})}
Question Numbering: To allow us to give you credit for your work, keep the same number of questions as in this list. Don't break the question or skip some. If you cannot answer a question, simply write "I couldn't solve this part" and move on.
PlayersList = new Mongo.Collection('players');
{{#each}}
block outside the template.Create a helper function that uses the find and count function to return the number of players in the leaderboard. Then display this data inside the interface.Take a screenshot of your page and include it on the solution document. At this point, my solution looks like this. Yours might have different names with yours at the top.
PlayersList.find().fetch()
on the browser console and
get a screenshot of your app at that point. This is my app's screenshot.
Include your screenshot here.Meteor.call
was used during the Chapter 12.
Can you explain the signature of this versatile method? How does it work?
You can skip Chapter 13 in the book and move directly to Chapter 14 Deployment. However, do not deploy the app before adding your CSS styling to it, so that you can received the points for that requirement.
In your cs249
folder, create a subfolder am6
and a
page index.html
. In this HTML page, write your name, date, the Honor
Code statements that the linked code and material is your own work, and then
add three links:
am6_answers.pdf
that contains your
answers to the questions for AM6.To be graded for this AM, it is not sufficient to write the code and upload it. You will need to upload the PDF file with all your answers that you generated while building the code. The score of your answers amount to 8 points if it is also accompanied with working code.
Finally, you'll receive the last 2 points if the user interface for your app uses either Bootstrap or your own CSS for a better layout of the page (similar to the provided screencast, or in some other creative way of representation).