Finally! Our journey into programming has taken a big step in the process, moving from the command line interface to now being able to view our projects on a browser. Being more visual, and enjoying seeing projects in their completed state, I am super excited, to say the least :D
For our Sinatra Portfolio Project, I decided to build a plant collection tracker application, named Plants & Things. This portfolio project has some standard requirements, using Active Record to manage a database, allowing for the management of users and objects that are controlled through has_many and belongs_to attributes. For my project database, I have Owners, Plants, and Comments that are created, can be read and displayed in different fashions, updated, and removed (CRUD). This Sinatra app is built in the MVC web application structure, which sets Models (the designation of Owner, Plant, and Comment functionality), Views (the way the application displays these objects), and Controllers (the background functionality and controlling of the objects and the views).
Before building Plants & Things, I was pretty nervous of my full understanding of Sinatra and ActiveRecord through the labs. Thats the beauty of final projects though, the process of going through the application building process from start to finish really helps to solidify concepts learned, and how they apply to your own unique application needs. I always get the most out of applying the concepts to my own idea, and now feel like I have a solid grasp of ActiveRecord and Sinatra.
While in the process of building Plants & Things, I struggled with a couple of large roadblocks. The first was the initial setup of a functioning database. No amount of googling seemed to help me get past this issue, and it seemed many students in my cohort had a similar issue. The fix? Setting versions for Sinatra and ActiveRecord in the gemfile, along with using the standard database.yml file to connect the database to the application. The labs previously had this functionality built in, but many labs implemented them in different ways, which made it hard to replicate on our own. The second roadblock consisted application design itself. Moving from our own Ruby Object classes and functionality to ActiveRecord is magical, but certain functionality has a particular way the ActiveRecord requires it to be implemented in your application. In particular, the usage of Object has_many Objects through Join tables. It requires the strict usage of CamelCase, snake_case, and the correct implementation of object calls throughout the MVC process. This usage is heavily documented in the Rails instructional documents, but a careful eye on your implementation is necessary so that functionality is not broken within your app.
All in all, I am very pleased with the final product of Plants & Things. It was super fun to be able to add styling to the view of the application in the browser, and just exctiting to see your functionality play out in the testing, debugging, and final environment. Plants & Things allows for users to sign up or log in to their plant collection portal, add plants to their collection from a list of plants created across all users, create their owner plants if not found in the list, edit or delete (only their own) plants, add comments to plants, edit or delete their own comments. I have built websites on my own, but it is extremely exciting to know how and have something to show for building web apps with dynamic content like this.
As a designer, being able to see your work in production, to add style to it, and have something to show for your work is such a giant landmark! It is also super exciting to me to now know how some of these website platforms work, how to provide login functionality, dynamic content based on YOUR OWN INDIVIDUAL information, and even be able to run calculations or background functions to user input data. This type of web app functionality opens so many doors to what is possible to build, and I am so excited to see what is next.