JavaScript Project

I finished my phase 4 project for Flatiron School! I created a single-page web application for my JavaScript project.

I created 2 separate repos for the front end and back end. The back end was fairly similar to the phase 3 Rails project, with control…


This content originally appeared on DEV Community and was authored by victoriaehrbar

I finished my phase 4 project for Flatiron School! I created a single-page web application for my JavaScript project.

I created 2 separate repos for the front end and back end. The back end was fairly similar to the phase 3 Rails project, with controllers, models, and has_many relationships.

My project was a book review/tracker, where a user can input a title, author, description, and category/genre. A category has_many books and a book belongs_to a category.

While it was interesting to create a mini Rails project and review some old material, I was most interested in the front end JavaScript portion and refining what I learned in phase 4. I utilized the fetch method to get the book data to display on the page, display new posts, and to delete posts.

The back end part of the project required creating a Rails API, which was interesting as the phase 3 Rails project did not incorporate this. The front end JavaScript portion of this project communicates with the API for the front end and back end to work together.

In JavaScript, event listeners are used to create actions. For example, my project has an attachDeleteButtonListener, which lets the server know that when the delete button is clicked, that book entry should be removed from the page. There is also another event listener that lets the page know to create a new book when "submit" is clicked on the new book form.

Overall, the JavaScript project was a great fusion of Rails and JavaScript that allowed me to synthesize my JavaScript knowledge and create a fun single-page web application.


This content originally appeared on DEV Community and was authored by victoriaehrbar


Print Share Comment Cite Upload Translate Updates
APA

victoriaehrbar | Sciencx (2022-01-14T17:34:42+00:00) JavaScript Project. Retrieved from https://www.scien.cx/2022/01/14/javascript-project-2/

MLA
" » JavaScript Project." victoriaehrbar | Sciencx - Friday January 14, 2022, https://www.scien.cx/2022/01/14/javascript-project-2/
HARVARD
victoriaehrbar | Sciencx Friday January 14, 2022 » JavaScript Project., viewed ,<https://www.scien.cx/2022/01/14/javascript-project-2/>
VANCOUVER
victoriaehrbar | Sciencx - » JavaScript Project. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/01/14/javascript-project-2/
CHICAGO
" » JavaScript Project." victoriaehrbar | Sciencx - Accessed . https://www.scien.cx/2022/01/14/javascript-project-2/
IEEE
" » JavaScript Project." victoriaehrbar | Sciencx [Online]. Available: https://www.scien.cx/2022/01/14/javascript-project-2/. [Accessed: ]
rf:citation
» JavaScript Project | victoriaehrbar | Sciencx | https://www.scien.cx/2022/01/14/javascript-project-2/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.