This is a bootstrap project to build a dynamic league score board using Backbone.
Clone this repository.
git clone https://github.com/mobilereactor/scoreboard-mock.git
Note: Please don't fork the repository
Construct an NFL scoreboard for the first week of the 2013 season. Build the scoreboard so that it updates with new data every 10 seconds.
The two files css/style.css
and js/app.js
are empty files where you can add your own code. Feel free to add more if you need to.
Make your requests to /schedule/week/1/
via jQuery
Ajax methods. Note that all Backbone server calls (i.e.; model.fetch
) are powered by jQuery's Ajax method.
The response is an object with a single property: schedule
. The value of this property is an array.
Each entry in the array is an object with the following properties:
AScore
- The away team's scoreHScore
- The home team's scoreGame_Date
- Self-explanatory, I thinkGame_Time
- See aboveLocation
- The stadium the game is taking place inSchedule_id
- A unique identifier for this gameSeasonType
- A string representing the type of gameStatus
- The status of the gameAwayTeam
- An object representing the away teamHomeTeam
- An object representing the home team
I encourage you to look into the AwayTeam
and HomeTeam
objects to determine their structure.
The design of the scoreboard should match this wireframe.
Though this layout could be accomplished with the table layout model, we encourage you to use other strategies (in other words, any combination of elements that do not have a display value of table
or table-cell
)
Each game object returned from the server should be represented by a Backbone model. All of the game objects together should be in a Backbone Collection. Each model needs to render a View for it's data, and each View should render from an Underscore template.
You'll notice that each call to the server returns different data. Be sure to make your interface update with changes.
Also know that the endpoint returns a variable number of games with each request. Your interface should mirror exactly what is returned from the server; this means allowing for games to be both added and removed.
There's no deadline; take your time and make the best project you can make it.
Once you're finished, either publish your code to Github and mail us back the link, or mail us a zip of the code.
Note: Please don't fork the repository
This bootstrapped repository only works on Chrome, Safari, Firefox, Opera, IE9+. Don't worry too much about browser compatibility when writing your code.
Feel free to send us an email.