In order to store and read files using a database manager I had to integrate mysql code into my javascript. I also needed to build an actual database to handle the data I was passing through (because json files aren't always so efficient.) Storing things in a database makes the data easier to manage, read and update. And is a great way to manage a lot of data
The main point of this project is to use the Model View Control method in order to better update and manage data through a web application, in other words a fully functional website! Being able to alter the mysql (or any database) is essential to this process. It all starts with the database, which interacts with the model, which interacts with the controller, which uses the routes to display or view the behaviors. So it's hard to show snippets of code without showing the entire code because variables/objects are being passed through many steps to make sure they are dynamic and controlled.
Basically though, the burger needs to be updated in those 4 different places (database, model, controller and view) and passed through each step to get back and forth from the database. Doing it this way, assures us that everything is working, it provides quality data that displays accurately each and every time.
This is a lot like updating burgers with only the slight addition that we need a separate input area to take in the burgers. This may seem like old hat for the stronger developers but, noting that there might needs to be a slightly different route I felt was necessary when we are talking about MVC.
As you can see in the image above, the function is calling slightly different things. in the update we are calling an object of col vals but in create it's separated. These minor changes might seem small but these slight differences are important.
One of the biggest challenges faced in the project was deploying to heroku. Heroku was chosen because it supports server side as well as front end developed projects. Deploying heroku without mysql is a multi step process and takes some doing to get right. Deploying with mysql was even more complicated. So, in order to make sure I had the basic steps worked out well enough to deploy with mysql I created a list of instructions to share with my faculty and double check there wasn't anything I was doing wrong. heroku-readme
It's not complete but it did help me get through the project and maybe, it will help with further work later.
For later builds
Change Hamburgers to Cookie and devoured to cooked
I would use this app to help me keep track of what I had baked and if I had done it successfully
Improve the CSS
I think I got it pretty good, but I know it could be better for this assignment, especially if I wanted to use it regularly on my phone to track all the cookies/baked goods I have made.
This is meant for major food enthusiasts (who isn't) to help ensure they are getting a wide variety of their favorite dishes. Or it can simply act as a fun little game.
Rachael Kelm-Southworth
I would like to thank Kerwin, Manuel, Roger, Jerome and all my classmates for helping me understand this subject matter and anyone that contributed to make the base code.