For this experience, you begin to “wire up” your Digits mockup so that the pages have the correct behavior.
As with the last WOD, feel free to watch me solve it first, and then try it yourself.
Before starting this WOD, be sure to have merged the branch containing the “final” version of your previous WOD into master. See the screencast in the Readings for an illustration.
Note that switching GitHub branches on a running meteor application has the potential to put the application into an inconsistent state. To minimize problems, whenever you switch branches while doing meteor development, it is best to:
meteor reset
to clear out the contents of the database.meteor npm run start
, which runs a script found in package.json that resolves to meteor --no-release-check --settings ../config/settings.development.json
.Ready? Let’s begin:
Start your timer.
Create and switch to a branch called “home-page-1” in your local repository. You will do all the work for this WOD in this branch.
Create a Contacts collection. Create a contacts.js file in imports/api/contacts that defines the Contacts collection to hold contact data. Note you’ll also have to create an index.js file in that new directory, and you’ll need to update both client/main.js and server/main.js to import that file. Delete the autoform key and values from the SimpleSchema since we’re not using AutoForm.
Create sample Contacts data. Create a contacts.js file in imports/startup/server to create appropriate sample data for the collection upon startup.
Show Contacts data in home page. Edit the home page to display the sample data from the collection. Use the List Stuff pages as a guide. You’ll need to create a home-page.js file among other things.
Once you’ve finished, commit your changes to GitHub, and check to see that your changes are there.
Stop your timer and record your time. Be sure to record it, because you will need your WOD time data when you write your technical essay.
Rx: <16 min Av: 16-20 min Sd: 20-25 min DNF: 25+ min
You can watch this before doing the WOD if you like:
If you want to try this WOD again, just commit your branch, then switch to the master branch to reset your system to its state at the end of the first Digits experience. Then create a new branch called home-page-2 and start over.
By the time and date indicated on the Schedule page, submit this assignment via Laulima.
Your submission should contain:
A link to the GitHub repository created as a result of your latest attempt at this practice WOD. Make sure you include the complete URL so that I can click on it in my mailer. Note: the final commit to the branch of the repo associated with this WOD must have been made before the submission time and date, otherwise you will not receive credit for this assignment.
The number of times you have attempted this practice WOD so far, and for each time, how long it took you.
You will receive full credit for this practice WOD as long as you have attempted it at least once and submitted the email with all required data before the due date. Your code does not have to run perfectly for you to receive full credit. However, if you do not repeat each practice WOD until you can finish it successfully in at least AV time, you are unlikely to do well on the in-class WOD. To reduce the stress associated with this course, I recommend that you repeat each practice WOD as many times as necessary to achieve at least AV before its due date.