Ruby on Rails

Post on 15-Aug-2015

5 views 1 download

Transcript of Ruby on Rails

Web Apps with Ruby on Rails (RoR)

Jabran Noor6 August 2015

Quick overview of the Ruby Language

Rails overview

Models and ActiveRecord

Views and Layouts

Scaffolding

Libraries and Gems

Web Apps with Ruby on Rails - Jabran Noor

Overview of Ruby LanguageStrings

Symbols

Numbers

Array

Hashes

Constants

Classes

Modules

Methods

loops

Procs

Metaprogramming

Ruby Magic

IRB

Coding in Ruby is Fun

Requiring Files

LIVE CODING SESSION

Web Apps with Ruby on Rails - Jabran Noor

Boolean

Rails Overview

Models

Views

Controllers

ActiveRecord

DRY

MVC

Rails is a MVC Framework

REST API

Convention over

Configuration

ORM

CONCEPTS

Directory Structure

Create Basic App

Web Apps with Ruby on Rails - Jabran Noor

Directory Structure

Models and Activerecord

Rails encourages declarative programming

LIVE DEMO

Simple Model

Relationships

ORM

Activerecord

Validations

bin/rails  generate  model  Article  title:string  text:text

Controllersbin/rails  generate  controller  welcome  index

Web Apps with Ruby on Rails - Jabran Noor

Views and Layouts

A moduler structure helps build robust views

LIVE DEMO

Layout

Rendering

Form Helpers

JSON / XML

Web Apps with Ruby on Rails - Jabran Noor

Scaffolding

Scaffolding gets the basic app running quickly

LIVE DEMO

advantages

disadvantages

scaffold

Web Apps with Ruby on Rails - Jabran Noor

extending app

Libraries and Gems

Ruby has excellent libraries

javascript

databases

bootstrap

testing

pdf

bundler

Web Apps with Ruby on Rails - Jabran Noor

Activeadmin

charts

developing APIS

DISCUSSION

Web Apps with Ruby on Rails - Jabran Noor

Q & A

COMPARISON WITH OTHER FRAMEWORKS