Ruby on Rails (Rails) là web framework viết bằng Ruby, ra đời năm 2004 bởi David Heinemeier Hansson (DHH). Rails nổi tiếng với hai triết lý cốt lõi:
- Convention over Configuration (CoC): Rails đặt ra quy ước mặc định — tên file, tên bảng DB, tên route — thay vì bắt developer khai báo từng thứ. Ít config = ít code lặp.
- Don't Repeat Yourself (DRY): mỗi logic chỉ tồn tại ở một nơi duy nhất trong codebase.
Kết hợp CoC + DRY, Rails cho phép xây dựng ứng dụng CRUD đầy đủ trong vài phút — đó là lý do GitHub, Shopify, Basecamp đều chọn Rails ở giai đoạn đầu.
Ruby on Rails (Rails) is a web framework written in Ruby, created in 2004 by David Heinemeier Hansson (DHH). It is built on two core philosophies:
- Convention over Configuration (CoC): Rails sets sensible defaults for file names, database table names, and routes instead of requiring developers to declare everything explicitly. Less config = less boilerplate.
- Don't Repeat Yourself (DRY): every piece of logic should exist in exactly one place in the codebase.
The combination of CoC + DRY lets developers build a working CRUD app in minutes — the reason GitHub, Shopify, and Basecamp all chose Rails early on.