RUBY ON RAILS (RoR) Ishwor Khadka. Why Ruby on Rails?

Slides:



Advertisements
Similar presentations
Applied Ruby on Rails & AJAX An insight into the technology and principles behind a social networking community.
Advertisements

(Advanced) Web Application Development Test Driven Development with Ruby and Rails Bruce Scharlau, University of Aberdeen, 2013.
Ruby on Rails Model of MVC. Model-View-Controller Paradigm A way of organizing a software system Benefits: Isolation of business logic from the user interface.
Chapter 15 © 2010 by Addison Wesley Longman, Inc Origins and Uses of Ruby - Designed by Yukihiro Matsumoto; released in Use spread rapidly.
Creating Web Services with Ruby on Rails Robert Thew Internet and Web Systems II.
Ruby on Rails Web development that doesn’t hurt By Mylore, Dung, Lee, Karen and Bryan.
Ruby on Rails Tutorial Peter Mosca April, Ruby on Rails Tutorial Ruby History Invented 12 years ago in Japan by Yukihiro Matsumoto Spent first 5.
Ruby on Rails by Manik Juneja Ruby On Rails. Ruby on Rails by Manik Juneja Rails is a Web Application development framework. Based on the MVC pattern.
Introduction to Backend James Kahng. Install Node.js.
Creating Web Services with Ruby on Rails Robert Thew Internet and Web Systems II.
Ruby on Rails a popular web application framework, aimed to increase the speed and ease of web development Ruby on Rails, Tim Zappe.
27-Jun-15 Rails. What is Rails? Rails is a framework for building web applications This involves: Getting information from the user (client), using HTML.
Ruby on Rails CSE 190M, Spring 2009 Week 5. Installing Rails First, install Ruby with RubyGems Then, install the Rails gem gem install rails -version=2.3.2.
Ruby on Rails ::The New Gem of Web Development Ross Pallan IT Project Manager Argonne National Laboratory
Irma & Robert. Irma & Robert  Ruby on Rails is an open source web application framework for the Ruby programming language. It is often referred to as.
Intro to Rails INFO 2310: Topics in Web Design and Programming.
UNIT-V The MVC architecture and Struts Framework.
Ruby on Rails: An Introduction JA-SIG Summer Conference 2007 Michael Irion The University of Tulsa.
Chapter 3.1 – RoR: An introduction Maciej Mensfeld Presented by: Maciej Mensfeld RoR: An introduction dev.mensfeld.pl github.com/mensfeld.
RUBY ON RAILS Mark Zhang. In this talk  Overview of Ruby on Rails  Core ideas  Show a tiny bit of example code  Touch on several general web development/
RUBY ON RAILS It’s so rad. What we’ll cover  What is Ruby?  What is RoR?  Why RoR?  Developing with RoR  Deployment  Demo  Questions.
Ruby on Rails. What is Ruby on Rails? Ruby on Rails is an open source full-stack web framework. It is an alternative to PHP/MySQL. It can render templates,
Ruby on Rails CSCI 6314 David Gaspar Jennifer Garcia Avila.
Rails and Grails. To get started Make sure you have java installed You can get the sdk and jre at:
CodeIgniter - [Overview]
Chapter 3.2 – RoR: easier, faster, better Maciej Mensfeld Presented by: Maciej Mensfeld RoR: easier, faster, better mensfeld.pl github.com/mensfeld.
Lightning Talk Fred Rodriguez Nguyen Do CPSC 473 May 6, 2012.
Ruby & rails by Nicholas Belotti. What is ruby Ruby is an object orientated scripting language. In Ruby...everything is an object! Ruby was released in.
Model-View-Controller
1 An Introduction to the Development of Web Applications using Ruby on Rails with Ajax Ansgar Berhorn, B.Sc. and Mike Rowe, Ph.D.
Why rails? Carlos Kirkconnell. Google Happiness leads to Productivity Happiness Matters.
Lecture 10 Rails Projects Topics SaaSSaaS Readings: SaaS book Ch 2, 4 February 24, 2014 CSCE 740 Software Engineering.
1 Dr Alexiei Dingli Web Science Stream Introducing Rails.
Ruby! Ronald L. Ramos. What is Ruby? Ruby is a scripting language designed by Yukihiro Matsumoto, also known as Matz. It runs on a variety of platforms,
School of Computing and Information Systems CS 371 Web Application Programming CakePHP Server-side Framework.
Ruby on Rails Your first app. Rails files app/ Contains the controllers, models, views and assets for your application. You’ll focus on this folder for.
Lecture 11 Rails Topics SaaSSaaS Readings: SaaS book Ch February CSCE 740 Software Engineering.
The Active Record Paradigm Databases in Database-Centric Web Site Development.
Ruby on Rails Presenter: Michael Mayer 30-March-2006 Network RPI This presentation was adapted from a ThoughtWise presentation By Obie Fernandez;
1 Dr Alexiei Dingli Web Science Stream A ROR Twitter.
Routes & REST & URL-helpers & validations & filters
Rails & Ajax Module 5. Introduction to Rails Overview of Rails Rails is Ruby based “A development framework for Web-based applications” Rails uses the.
Ruby/Ruby on Rails Yasushi Osonoi Open Dream corporation
Chapter 15 © 2013 by Pearson Overview of Rails - Rails is a development framework for Web-based applications - Based on MVC architecture for applications.
 Registry itself is easy and straightforward in implementation  The objects of registry are actually complicated to store and manage  Objects of Registry.
Lecture 13b Rails – Controllers and Views Topics SaaSSaaS Readings: SaaS book Ch March 3, 2014 CSCE 740 Software Engineering.
Introduction to Ruby&Rails Yuri Veremeyenko Monica Verma.
Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks.
Rails and routing INFO 2310: Topics in Web Design and Programming.
CS 160 and CMPE/SE 131 Software Engineering February 9 Class Meeting Department of Computer Science Department of Computer Engineering San José State University.
Introduction to information systems RUBY ON RAILS dr inż. Tomasz Pieciukiewicz.
APACHE STRUTS ASHISH SINGH TOMAR ast2124. OUTLINE Introduction The Model-View-Controller Design Pattern Struts’ implementation of the MVC Pattern Additional.
Ruby on Rails. Web Framework for Ruby Designed to make it easier to develop, deploy, and maintain web applications Design with Model-View-Controller –almost.
1 Rails for the Ruby-Impaired John Paul Ashenfelter CTO/Transitionpoint.
Ruby on What? A brief introduction to Rails Christopher Hoskin Faculty of History 12th Annual IT Support Staff Conference 21st June 2007, St. Catherine's.
Mid-Hudson Valley Linux Users Group Ruby on Rails Web Development is Fun Again MHVLUG Meeting Jan 7 th 2009 Sean Dague sean.dague.net.
Web Technology Solutions
What is Laravel ? By Georgi Genov.
Node.js Express Web Applications
Play Framework: Introduction
Play Framework: Introduction

Ruby, Rails, GUIs, and More
Ruby on Rails by Manik Juneja
Ruby on Rails by Manik Juneja
Chapter 15 Introduction to Rails.
ASP.NET MVC Web Development
#01# ASP.NET Core Overview Design by: TEDU Trainer: Bach Ngoc Toan
Web Application Development Using PHP
Presentation transcript:

RUBY ON RAILS (RoR) Ishwor Khadka

Why Ruby on Rails?

Contents Introduction MCV Directory Structure Environment Modes Test Driven Development Rails Philosophy Why RoR stands out? References Questions?

Introduction open-source, full-stack framework for developing database-backed web applications according to the Model-View-Control pattern. RESTful get post put delete David Heinemeier Hansson - founder David Heinemeier Hansson shipped in Mac OS X v10.5 Leopard for the first time written in ruby programming language

Ruby Complete object oriented language Simple Easy to write 3.times {puts “Hello World!!!”} Output: Hello World!!! Packages called gems Core gems in Rails 3.2 Actionmailer Actionpack Activerecord Activesource Activesupport Rails Rake

MCV Model-Controller-View Application pattern Divides application into 3 parts Model Controller View ModelView Controller

Data Facilitates Creation Use of data Validation of data Persistent storage Association belongs_to, has_many, has_and_belongs_to_many etc….. Implemented with ActiveRecord::Base Class Post < ActiveRecord::Base attr_accessible :title, :content belongs_to :user validates :title, presence: true, length:{minimum:5} end Post. Create(title: "My first post”,content:”This is my first post….”) Post.find(1) Post.find_by_title(“My first post”) Post.user.name => “John” Model ActiveRecord::Base DB MySQL,Sqlite,PostGre

Controller Middle man between Model and View Make sense of the http request Produce appropriate output Responsible for: Fetching and saving data to the model pass appropriate data to the view Class PostsController < ApplicationController respond_to :html, :js, :json, :xml, :myCustom def end def end ROUTES get “/posts”,to:”posts#index” View Make use

View What you see html.erb- embedded ruby Content inserted into main layout file Different html tags, forms, ajax helper Custom helper file Make use of data passed by controller E.g. view for posts#index All Posts application.html.erb

ROUTES get “/posts”,to:”posts#index” Controller #index action Model Post<ActiveRecord::Base View app/views/posts/index

Directory Structure  Blog  app  bin  config  db  lib  log  public  test  tmp  vendor.gitignore config.ru Gemfile Gemfile.lock rakefile readme.rdoc Includes mcv part of application, assets and helper directory Configuration files Database schema, migration files List of gems used in the application

Environment Modes Three environments Test Development Production Different configuration file in /config directory test.rb development.rb production.rb Different database

Test Driven Development Test is written beforehand RoR promotes TDD Core testing gem included Tests file located in /tests directory Can use other testing gems RSpec Cucumber Useful in large projects

Rails Philosophy DRY-Don’t repeat yourself Convention over configuration Rails is opinionated

Why RoR stands out? Open source Rails philosophy Asset pipeline Compiles all the css, js files into one file respectively Decreases loading time Can be disabled if needed Large contributing rails community Very well documented Large number of gems available Video casts

Getting Started

References

QUESTIONS?