Build a Web Application with Ruby on Rails
Ruby on Rails, or Rails, is a server-side web application framework written in Ruby under the MIT License. Rails is a model–view–controller (MVC) framework, providing default structures for a database, a web service, and web pages.
David Heinemeier Hansson extracted Ruby on Rails from his work on the project management tool Basecamp at the web application company also called Basecamp. Hansson first released Rails as open source in July 2004, but did not share commit rights to the project until February 2005.
In August 2006, the framework reached a milestone when Apple announced that it would ship Ruby on Rails with Mac OS X v10.5 "Leopard", which was released in October 2007.
Like many web frameworks, Ruby on Rails uses the model–view–controller (MVC) pattern to organize application programming. In a default configuration, a model in the Ruby on Rails framework maps to a table in a database and to a Ruby file.
For example, a model class User will usually be defined in the file 'user.rb' in the app/models directory, and linked to the table 'users' in the database. While developers are free to ignore this convention and choose differing names for their models, files, and database table, this is not common practice and is usually discouraged in accordance with the "convention-over-configuration" philosophy.
A controller is a server-side component of Rails that responds to external requests from the web server to the application, by determining which view file to render. The controller may also have to query one or more models for information and pass these on to the view.
For example, in an airline reservation system, a controller implementing a flight-search function would need to query a model representing individual flights to find flights matching the search, and might also need to query models representing airports and airlines to find related secondary data.
In this course, we will build an application, it is a simple shop.
Table of Content
1. Basic Tasks Programming
- The tasks to do in this course
- Install the development environment Rails
- Create and configure new application
- Setup the IDE and GIT repository
- Create models for the application
- Associations between models
- Install Material Design
- Create the layout for app
2. Account Management
- Account management with Devise
- Sign-up/Sign-in with Google
- Use Google reCaptcha
- Sign-up/Sign-in with Facebook - Twitter
- Create the Sign-up page
- Create the Sign-in page
- Create the Profile page
- Two-factor authentication
- Send email for account management
3. Administration Page in Rails
- Backend management with Active Admin
- Two-factor authentication for admin account
- Integrate CKEditor
- Drag and drop categories
4. Product Model Programming
- Attach avatar image
- Data storage on Amazon S3
- Create view pages for the product
- Pagination and friendly URL
- Search and sort products
5. Order and Payment Tasks
- Create a shopping cart
- Build Order method
- Payment with Paypal
- Payment with Visa/Master
6. The Background Tasks
- Promotion method for the product
- Configure background tasks
- Send email for Order
- Create a periodic task run in the background
- Sharing Bar for social networking
- Optimize the application
- Responsive layout for multi-resolution
7. Deploy Application
- Install a Linux Server
- Deploy the application manually
- Deploy the application with Capistrano
- Install SSL certificate and background tasks