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:
Things learnt & Practiced
- Migration of databases - Instead of manually creating and doing operations on databases. Create scripts to automatically do operations. Used migrations script to develop databases.
- Seeding the database with some sample data to help to develop the application
- Creating different environments - Development (interactive), Test (to be wiped each time) and Production (on Heroku - they only allow us to use Postgres database)
- Using ActiveRecord interface to interact with the Database rather than SQL
Automation/ Productivity / Tools
- Using rails to create initial boilerplate code
- 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.
- Using Rake to run standard scripts
- Deploying to Heroku and setting the database up - using rake.