Anime and Sinatra Web Apps are for Nerds
The Sinatra Project I made was based on creating an entry for an anime. Lots of anime watchers like to track the anime they have watched. A user will be able to login to their account and make an anime entry with the attributes of name, favorite character and rating. A user will be able to sign in if they do not have an account and will be able to login or log out. In the web app the user will be able to look at all of their anime entries and see all of anime by other users as well. I thought the idea for this app was some what useful for a real word application and fun! Users also have full capability to create, read, update and delete their anime entries.
I really enjoyed making this project. In all honesty, at the beginning of the project building process I felt overwhelmed and I felt like I did not know enough to be able to create the project. However, once I started working on it, it all came to me naturally… with some bumps of course. I think that what pushes people away from coding is the tedious expect of it. Instead of being discouraged from it, you need to embrace it and that’s what I learned during this project. It was fun and satisfying to make each part of the whole and put things together.
I started by using Corneal to create the frame work for my project. This made things super useful for me. It easily establishes all the necessary files for your project and fills the files with the necessary code. This gave me an easy start and all I had to do was start with the controllers and models and then create my database. I created my Anime and User model and established relationships. User has_many Animes and Anime belongs_to Users. With the beauty of inheritance from ActiveRecord I did not have to write any methods for these models! After I had my models ready I created my migrations and added the data to my tables. To further establish the relationships the Anime’s had a user_if column that declared which anime entry belonged to which user. After that I just had to establish my seed data and then I was ready to create my controller actions and the views that related to them. In all honesty once I got the ball rolling it was relatively easy. I made my user and anime classes and their associated tables. Once I finished that, I made my controller actions and then just followed the spec.md to hit the requirements. Once I got things functional for the most part I just had to clean it up. By clean it up, I mean make the user interface flow better with a navigation bar and include links so that the user did not have type things into the url bar to navigate the page. I think some code could be cleaned up and refactored but I am very proud of what I was able to accomplish! Very excited to see how things go going forward and I genuinely enjoyed making my Sinatra Anime Project!
If you want to check out the web app, here is the github repo! ❤