Ruby on Rails is a full-stack web application framework that utilizes the MVC design pattern and emphasizes conventions for file organization and communication. It is open source, easy to learn, and supported by a strong community, making it a popular choice for companies like GitHub and Airbnb. Key principles include DRY (Don't Repeat Yourself), convention over configuration, and the active record pattern.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
15 views
Rails Intro & MVC
Ruby on Rails is a full-stack web application framework that utilizes the MVC design pattern and emphasizes conventions for file organization and communication. It is open source, easy to learn, and supported by a strong community, making it a popular choice for companies like GitHub and Airbnb. Key principles include DRY (Don't Repeat Yourself), convention over configuration, and the active record pattern.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 21
Ruby on Rails
MVC & DHH
Prerequisites
● Ruby Web Servers
What you’ll learn
● What Ruby on Rails actually is.
● Who uses Rails. ● Why Rails is important. ● Some Rails history. ● Design patterns used in Rails, e.g. MVC What is Ruby on Rails? Rails (also known as Ruby on Rails) is a Ruby full-stack web application framework.
Huh? What does that mean? How is this
similar to/different from React? Bootstrap? Ruby gems? Framework? ● library of code (e.g. a gem) ● more quickly or easily accomplish tasks ● conventions - where to put my files - what to name my files - how my files talk to each other Hmmm...sounds pretty React-ish. What are some CONVENTIONS we have to follow in React? Rails is even more opinionated...what does this mean? Web App Framework? ● quickly create web apps or APIs ● talk to a database ● render dynamic HTML/CSS/JS web pages ● HTTP requests & responses Express is another web app framework. What do you remember about making web apps using Express? What, if any, conventions did you have to follow? Compare/contrast: Rails vs. Express What is Ruby on Rails? Rails Patterns ● don’t repeat yourself (DRY) ● model-view-controller (MVC) ● active record ● convention over configuration (CoC) Who is Rails? Who uses Ruby on Rails? ● Github ● Square ● Airbnb ● Urban Dictionary ● Bloomberg ● Slideshare ● Groupon ● Indiegogo ● Shopify ● Soundcloud ● Heroku ● Crunchbase ● Hulu ● Fiverr ● Zendesk ● Your next great app... ● Yellow Pages Why Ruby on Rails?
● Open source: free to use and to change
● Excellent community support ● Easy to learn. ● It’s a RAD tool. What was Rails? MVC
What’s happening in this
image? How could you explain this in your own words? Understanding MVC Architecture Model
The Model is a bridge between
the database and your application's code. View
The View generates the HTML
that will be displayed in the browser. Controller
Controllers pass Ruby objects
between the Models and the Views. Analogy Two: Let’s pretend they’re all CVS employees MVC Rails Patterns ● don’t repeat yourself (DRY) ● model-view-controller (MVC) ● convention over configuration (CoC) ● active record ActiveRecord