24
Ruby & rails by Nicholas Belotti

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

Embed Size (px)

Citation preview

Page 1: 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

Ruby & railsby

Nicholas Belotti

Page 2: 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

What is ruby

Ruby is an object orientated scripting language. In Ruby...everything is an object!

Ruby was released in 1995 by Yukihiro “matz” Matsumoto

Mass acceptance was gained by 2006 and it ranks #9 in use of all programming languages. (Due in large part to the gem known as rails.)

It is supported by a large volunteer community

Distributed under the Ruby license (a GPL extended hybrid)

Page 3: 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

What is Rails

Rails is an open source framework for creating web applications.

Created by David Heinemeier Hansson in 2003

When people say Ruby, many times they mean Ruby-on-Rails(RoR)

Page 4: 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

What is Rails

Rails facilitates the setup of a model-view-controller (MVC) framework

Uses the MIT license

It is a add-on library written in Ruby for Ruby.(library is known as a gem in Ruby-speak).

Page 5: 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

RoR forces the implementation of MVC

At the heart of standards-based web application development

It separates the data, the presentation, and the code

MVC encourages best practices

Page 6: 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

The model is simply the data and associated database.

Rails works with almost any database with very little need of coding or SQL knowledge

Page 7: 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

View

The view is the presentation or how the page/application is presented to the web client/viewer

It is a concept embraced by RoR as well as other programming environments

Page 8: 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

Controller

The controller is the code that interacts with the view and the model

It “controls” what is done programmatically and what events occur when a user interacts with the site

Page 9: 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

The Governing Standards Body

Both Ruby and Rails are a completely free, community supported effort

Volunteer - anyone can contribute

Ruby & Rails - Have separate but similar organization of core supporters with a large group of non-core or secondary supporters

Page 10: 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

Advantages/Disadvantages

Ruby is open source and as such, comes with an open source support model

If something is broken, you can request from the community or fix it yourself

Ruby itself is very easy to learn

RoR provides a means of rapid development of web-based applications

Page 11: 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

Robustness

There is not too much you cannot accomplish with RoR as far as web design

RoR is a tool

You can use tools to build great things

How any tool is used is paramount!

Page 12: 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

Pervasiveness

Since 2006, Ruby-on-Rails has become very popular among web developers

Ruby is #9 in use world wide out of all programming languages

Wide acceptance among web programming teams using agile development

Not as prevalent as java or php but rapidly gaining support

Page 13: 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

Interoperability

RoR is highly extensible

The Rails framework provides simplified interfaces with powerful javascript libraries

prototype

script•aculo•us

RoR provides easy implementation and connectivity of almost any database

Page 14: 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

Interoperability

Makes proper use of many web standards

CSS

XML

AJAX

Javascript

RoR provides easy implementation and connectivity of almost any database

RoR is available on most platforms

Can be implemented with other technologies such as Adobe’s Flex

Page 15: 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

Community SupportCommunity support of both Ruby and Rails is amazing!

It is the community support that is helping to make RoR nearly ubiquitous in web development

Information and solution on how to accomplish a task are shared in numerous channels

RailsCast - a weekly podcast that addresses various topics

www.ruby-lang.org and www.rubyonrails.org

Page 16: 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

Support/Stability

Active development is still taking place in rails as we speak

Solutions are committed to the code base on a daily basis by the “core team” as well as group of over 1,400 volunteers

Unlike its parent language, rails is changing and evolving rapidly as standards go

Stability is is not a major concern

Page 17: 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

Maintainability

Due to the structured nature of the MVC, maintainability of a site is almost trivial

DRY - don’t repeat yourself is a best practice in RoR

Once a site is designed, it can be frozen to a particular version of rails to avoid problems associated with updates

Page 18: 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

Ease of Use

Ruby is easy to use and learn

Especially true if you know other scripting languages such as perl or php

Rails has a learning curve but the payoff is more than worth the effort

Ease of site maintenance

Forces MVC

Page 19: 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

Security

As a programming language, ruby itself is secure

As implemented in a website using the rails framework, it is also secure. Most security issues are implemented by the programmer due to:

Poor programming

Inexperience

Page 20: 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

What it is used for

RoR can be used for just about any web design project to create a site.

Web applications and sites that use and interact with persistent data

It seamlessly pulls together other web standards such as javascript, AJAX, mySQL

Seamlessly works with XML

Page 21: 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

Who is Using RoR

Many well known sites are built on RoR

Hulu

Twitter

Github

Page 22: 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

Where is it all headed?

Ruby on Rails is still rapidly gaining acceptance among Web programmers and designers.

The rails framework and methodology has started and encouraged other similar projects based on other programming languages

cakePHP - A php-based approach at implementing MVC functionality

There is room for improvement but RoR is a welcome web standard that should be here for some time

Page 23: 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

RoR in ActionExample Site

Page 24: 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

Thank youQuestions or Comments