For my Sinatra portfolio project, I began working on an idea that I have held for quite some time now. As someone who has engaged in creating music, and music production for a few years now, I have noticed a problem that I continuously run into as a creator. It is sometimes hard for me to expand on a particular loop or melody line and create a full track rather than just a section of a song. When you reach a wall in a creative endeavor it can feel impossible to overcome, and the eyes or ears of another individual or artist can come in handy to take the project to that next step. Thus, the idea for a collaborative music network, which for the sake of this project I am calling SymbioSound began. The website would be a place for any musical artist who has hit a wall to ask for help, or another pair of ears that may be able to offer some kind of assistance to their project.
Once I had the idea fleshed out in my head, I created a file using the Corneal gem as the framework. From here, I began the process of building an MVC sinatra application. MVC stands for models, views, and controllers, so building SymbioSound was divided into those three parts. I knew for the models, I would require a user model which has many artists and projects, and a different model for both artists and projects which belong to a user. Once the models were constructed, a different controller was built for each model. For this process, Enoch Griffith’s study groups were particularly useful in dividing the controls into different files. I knew that I had to utilize each aspect of CRUD, or create, read, update and delete. I created routes for a new project and a new artist in the respective new.erb files to satisfy the create aspect. This used a post method to add the new project or artist to the project or artist pages. For the read aspect the show.erb file was used to display a specific project or artist. In order to update each of our posts, I constructed an edit button which led to an edit page, where you could change each aspect of the post, and upon saving this it would update the original. For deleting the posts, I used the .destroy method in the project and application controllers, which gets rid of the post created.
Now that I had a working application, I began the process of building the user authentication, this had a login page, a signup page, and a logout page. On the login and signup pages we had forms for username and a secure password, encrypted using the bcrypt gem. We used the session controller to assign routes to these actions, and flash messaging to notify the user that the actions had taken place. I then created views for the login and signup pages which used the post method to take you into the website to access the information inside. The logout control simply redirects a user to the homepage and clears the cookies from that session so that the browser no longer knows they are logged in.
Building this web app was a very satisfying process, and seeing an idea that I had come together and actually function felt incredible. I look forward to working more on designing web apps in the future, and hopefully expanding more on this particular web app, as it is an idea that I am passionate about.