Advantages of Rails Framework

Post on 16-May-2015

675 views 1 download

description

Rails advantages and techniques

Transcript of Advantages of Rails Framework

Rails advantages and techniques

SATHISH KUMAR MARIAPPAN

Ruby on Rails - it does scale

• Fast, agile development •Framework based on Ruby

INNOPPL Why Ruby On Rails?

INNOPPLFast Development

INNOPPL

• CRUD

• Scaffolding (if you really need to)

• DRY

• AJAX

• acts_as_something

INNOPPL Maintainable

INNOPPL

• Very readable code

• Implemented documentation system (RDOC)

• Tests makes sure you don’t break anything

INNOPPLModel View Controller

INNOPPL

Model View Controller

• Interface to the database• Business Logic goes here• For the DataBase Admin

class User < ActiveRecord::Basehas_many :tasks

end

class Task < ActiveRecord::Basebelongs _to :user

end

INNOPPL

Model View Controller

• Link between DB (model) and User (view)• HTTP / Sessions / Cookies / Post / Get• For the Developer

class TaskController < ApplicationControllerdef index

@tasks = User.find(session[:user_id]).tasks

endend

INNOPPL

Model View Controller

• Web Interface• What the client sees• For the Designer...

<body><% @tasks.each do |task| %>

<div class=’task’><%= task.content %> is <%= task.status

%></div>

<% end %></body>

INNOPPL

Model View Controller

• Link between DB (model) and User (view)• HTTP / Sessions / Cookies / Post / Get• For the Developer

class TaskController < ApplicationControllerdef index

@tasks = User.find(session[:user_id]).tasks

endend

INNOPPL

Test-Driven Development

• Write tests first

• FAIL

• Implement

• SUCCEED

• Clean Up

• Check-In to Version Management

INNOPPL

polymorphism

Rails features

20.minutes.ago1.gigabyte

time_ago_in_words prototype

has_and_belongs_to_many

cache

routes link_to_remote

<%= debug object %>

group_by

find_by_sql

REST

titleizedelegate

INNOPPL CONTACT DETAILS

Sathish Kumar Mariappan Innoppl Technologies E-mail : sathishkumar.m@innoppl.com

INNOPPL Thank You