Javascript and Rails

Posted by Joshua McArthur on August 31, 2020

One of the things I noticed the most about Javacript right off the bad is the flexibility it offers over a much more structured language like Ruby. In many ways this is liberating, but in many ways it’s very intiidating. I appreciate how much generosity it offers in different approaches, problem solving, and multiple solutions to a problem. Because the developer is responsible for definint so many aspects of it, it is easier to bend Javascript around the developer’s will and update it for different needs.

I decided to use Javascript and Rails to create a public access character storyboarding app for writers to use. Writers can create, update, and destroy objects in the form of races and charactrs for other writers to find inspiration from and “claim” from the database as their own. This employs all of the standard CRUD actions, each implemented with detch calls to the DB. One thing that I have found difficulty in is implementing Object Oriented Javascript to maintain my objects throughout the user experience. I understand the concept: I am essencially storing the data as an object in the program for the users to interact with during a session rather than working with unique fetches from the database for each interaction with the object. Translating the code to OO language, however, is something I realize I should have done from the start, rather than at the end. If I were to decided to develop this app further, I would likely restart the entire project and stick to OO from there, rather than trying to implement it later on.

It does feel like Javascript has a lot more scope as far as unique project ideas and implementations than simply using Ruby on Rails. I look forward to working with React and exploring further possibilities and uses of Javascript for application development.