Week 8 - Connecting to a Backend
JS OO + TAPE
Dojo
Callbacks
REST
.heading {
font-family : Lato-Light, sans-serif;
font-size : 64px ;
color : # ffffff ;
}
.todo-item {
font-family : Lato-Regular, sans-serif;
font-size : 26px ;
line-height : 2.2 ;
color : # cecece ;
}
.button-text {
font-family : Lato-Regular, sans-serif;
font-size : 26px ;
color : # ffffff ;
}
if you want more info on the mockup,
send your email address to Aniko for a Zeplin invite!
on page load, get all todos from the API
when adding a new todo
send the todo to the API
and also display it in the list for the client (when the response is success)
when deleting a todo
send the delete request to the API
and also update the list for the client (when the response is success)
when completing a todo
same in english (just as above)
all API calls should be separated
you can disable a button for the time being
the API's host should be easily modified
avoid code duplication
you should be able to write tests, so do that! :)