Day 50: Getting My Kicks…

…not exactly on Route 66…

As I mentioned last time, I did get our two assigned labs done. HOWEVER, I’m evidently insane, because I went nuts today and decided to try to convert my entire capstone project into our newly-learned Node Express hbs page format with routes and partials. I did manage to get all my pages to render, but as far as functionality…this was sort of hit-or-miss. The simple files were easy to create routes for. However, one of our databases has team info and then member info under each team, which is proving tricky to try to create routes for. I tried to check our original capstone server code to see if I could try to figure out how to crack the code (so to speak). At about 6:00 p.m. I finally created one “team-by-league” route which now makes my team page fully functional! I’m hoping to be able to figure out the other team/member routes.

The other issue is that my original capstone code relied heavily on URLParams. Now that we’re using routes I need to figure out a way to pass data to the member pages (add/delete/edit). I tried session storage, which I’d hoped would be the magic bullet, and indeed it was—for team data. For the member data underneath the team it was a fiasco. The code loops through all the members of a team and then stores the data for the LAST member in session storage. When you click an icon to go to a member’s edit or member delete pages, you land on the LAST person’s pages, no matter who you pick. I need to figure out how to pass the team ID and member ID to grab member data using yet another route (which you know is going to be convoluted).

Well, tomorrow is another day!

Chuck Berry – Get Your Kicks on Route 66

Day 39: I think I can…I think I can…

The big project is coming along! I’ve managed to figure out most of the pages, except for the team edit page, which I should be able to finish tomorrow. I figured out the AJAX command to delete a member, which means I should be able to delete a team. I actually got functionality up and running where, when I create a new team, the server code grabs the new team data and stringifies it. In my page code, the data is then parsed to isolate the team ID. From there, I attach it to the URL to bring over to the team details page. This means you can create a new team, and then are immediately directed to your new team’s details page, where you can start adding members. I sent what I did to the rest of the class so that they could do this, too.

I then spent a good half hour in GitHub Hell, as I made the fatal mistake of switching branches (I was in the wrong one) without pushing what I had done first—which of course was what I just described above. Luckily, I had documented it all in my notes, so I was able to do everything over again. However, I somehow ended up with GitHub conflicts which I didn’t resolve correctly. The only way around it was to do a Git Pull—which, of course was going to hose EVERYTHING I’d just done with my team ID URLSearchParams. Thinking quickly, I copied my entire project to another directory on my C: drive, did the Git Pull, and then copied everything back into my project and pushed it again. This time, it FINALLY pushed to my repo successfully. PHEW!

Day 16: Stringing You Along…

We had two major blasts today in class.

One: we got our Friday projects back. The good news is that, by and large, our instructor felt we did well. The bad news is that I completely spaced on putting all my inputs into a <form> element—apparently, I wasn’t the only one, and there were a few other things I missed that needed attention. We all had issues to correct, on which we spent most of the morning working. One issue, a link not working, turned out to be a non-issue. I suspect our instructor had us immediately work on our defects as, in real life, during an Agile Sprint, it would be expected that you would correct mistakes right away. As a BA, I’ve been on the other side of this equation (“What do you mean, you didn’t make the changes YET???”).

Two: we worked with strings today. We used different functions and methods, such as indexOf(), lastIndexOf(), substr, slice, etc. Before you ask, NO…this is NOT as much fun as working with that other type of string (a.k.a. yarn).

This all culminated in an exercise to parse out a full name by prefix (if present), first name, middle name, last name, and suffix (if present). After much wailing and gnashing of teeth, I DID IT!!! Woohoo!!!

Tomorrow we work on dates…no, not the type you eat…