I have finally made it to my final project for Flatiron's Software Engineering course and it has been one heck of a ride so far. I started this program with just a little knowledge of programming and bitter taste that was left from my first go around. I have learned a great deal of things as I have progressed through the curriculum, some concepts were easy to get but others were challenging. So now all of this brings me to the grand finale and the only thing holding me back from graduating a software engineer.
I started this project not really knowing what I was gonna do. I was gonna try to pick something that was very basic to help me get a good grasp on what I have learned. I ended up building a course caddie which is a way of keeping track of rounds of golf that you have played. You are able to enter a course, the par of the course, your score for the round and a picture of your scorecard. It's a simple way to keep track of something fun people like to do.
I started building my backend using a Rails API to handle the data persistence. I laid the ground work for login authentication but I wasn't gonna integrate it completely. I did everything to get it ready so I could add it in later since it wasn't a requirement for the project. I proceeded to make a generic user so i could use it for testing the app as I was buidling it. I set up a retationship between user, course and round. User has many courses, course has many rounds and rounds belong to a user and a course. Once I had that set up I added basic seed data so i would be able to make sure that I was getting the correct JSON from the backend. Then I started figuring out what data I wanted to pull to use to display for the user to see.
My next step was to build out my controllers for the different actions that I wanted use for my program. I wanted to be able to create, find and show a course. So I built out the controls for that adding in what I wanted the JSON to render in my HTML. I then proceeded to set up my controllers for rounds. I also wanted to be able to create, find and show the rounds that I have added. The same concept I used for displaying the JSON for courses, I used the same principles for rounds also. So now that I have everything displaying the way that I wanted it to, it was time to move on and start building out the frontend so my user will be able to see what has been created.
If I am to be completely honest while I'm writing this then I need to say that I don't fully understand Redux and all that it does. In order to change state we need to dispatch an action and then to get them to work together we need to create a fucntion in a reducer. A reducers main task is to take the current state with an action and to update the component having it rerender with the new state. An action is a fetch request that we make to the backend to get the data that we want to display for our user to see. So bascially Redux handles all the changes of state throughout your program. It's a way of keeping your state in one place instead of having it throughout your entire program.
This was a very tough project and i learned a lot working my through it. I know I still have a ton to learn with React and Redux but once I get it the possibilities will be endless with what I can create. I'm excited to keep learning and growing as I continue with programming.