By the time you finish this course, you’ll be able to establish a development environment to code and execute Ruby and Rails code, create Ruby programs utilizing proper flow of control structures, implement a basic Rails application that consumes external JSON API, and build a functional web application and deploy it to the “cloud” using a Heroku PaaS (Platform as a Service).
In this module, we will install software required to develop Ruby on Rails applications. We will finish the module by familiarizing ourselves with a version control system called “Git”.
Slides and Installation Instructions
- Introduction to Git
- Ruby on Rails installation
In this module, we will explore the different areas of the Ruby programming language.
We will start with the basics and continue with more advanced topics, such as arrays and hashes. We will also spend time exploring object oriented programming in Ruby, and finish the module by demonstrating how to perform unit testing.
- Interactive ruby -- irb
- Ruby language overview
- Unit testing, rspec and rspec matchers
Eloquent Ruby, Programming Ruby, Beginning Ruby
In this module, we will become familiar with core concepts behind Ruby on Rails, such as CoC (Convention Over Configuration) and MVC (Model-View-Controller).
We will then learn about consuming JSON API with HTTParty, a Ruby gem. We will then integrate this ability to consume JSON API to serve as the data layer for our Rails application.
- Reasons to use Rails -- Convention-Over-Configuration, database abstraction layer, moduler, agile, DRY-principle, etc.
- Model-View-Controller design
- Create new app -- rails new <app-name>
- Start server -- rails s
- Generate controller -- rails g controller <controller-name> [action1 action2]
- When adding action manually, must update the routes in config/routes.rb
- Rake -- Ruby's make
- If the is route and template, there is no need to explicitly defined action
- Rsils helpers -- macros, formatters for the views
- Ruby gems and bundler
- RESTful services, httparty gem
- Page styling with CSS
- Deploying Ruby application to Heroku