Simple Rails app in 1h

In CS 169 this week, I developed a simple rails app (from the previous Sinatra-based web app). The main difference this week is the use of Databases. What also stood out was the speed and ease of development of tools.

Access the project here:

https://husbandacrobat-brotherhavana-3000.codio.io/movies

Things learnt & Practiced

Databases

  1. Migration of databases - Instead of manually creating and doing operations on databases. Create scripts to automatically do operations. Used migrations script to develop databases.
  2. Seeding the database with some sample data to help to develop the application
  3. Creating different environments - Development (interactive), Test (to be wiped each time) and Production (on Heroku - they only allow us to use Postgres database)
  4. Using ActiveRecord interface to interact with the Database rather than SQL

Automation/ Productivity / Tools

  1. Using rails to create initial boilerplate code
  2. Convention vs Configuration. By basing the app based on resources and the operations on the resources - scaffold_controller automatically created default CRUD+Index routes and controllers.  
  3. Using Rake to run standard scripts
  4. Deploying to Heroku and setting the database up - using rake.