This week was a little tedious because on top of making a single page app we were also not allowed to use any libraries. This included testing libraries, which meant we had to create our own.
We set up the HTML page on day two, as well as setting up a function that changes the DOM(document object model). We then made the controller so we can get the list of notes and then use DOM manipulation to change the page to display the notes. We spiked this feature which meant we had to delete it all and then restart using TDD.
We started day three by creating a single note prototype, which stores a single note and has a method for returning it with a div wrapped around it. We ran into a couple of bugs we manage to workaround which had us struggling for a while but it was mainly just syntax errors.
This day was quite interesting because we had to go back to our note list and change it up a little bit. We had to add ids to each of the displayed list items. We needed to do that so we could access each item by looking up its id to eventually display just that item. We had to add ids to the div in increasing order to give each item a unique id. We also had to change the list items to anchor tags so that we could change the URL. So we could then add an event listener for a hash change and use the id from the URL to display the appropriate note.
Fridays are usually a slow day because it's near the end of the week and we do our retro on Friday. But we still managed to get through step 10 which was adding a form for creating new notes which went pretty smoothly. It was fun to see the app work with no refreshing of the page it was just a lot quicker overall.
It was a fun week overall seeing a single page app was interesting and I can see it is very useful. I think doing my own testing from scratch was useful it helped me understand testing libraries better, but I don't think doing that will be as useful in the future considering there are already testing libraries out there. I really enjoyed this week seeing what single-page apps could do and I feel like I achieved the weekly goal so a success all round.