Ruby & rails by Nicholas Belotti. What is ruby Ruby is an object orientated scripting language. In...

Post on 11-Jan-2016

223 views 0 download

Transcript of Ruby & rails by Nicholas Belotti. What is ruby Ruby is an object orientated scripting language. In...

Ruby & railsby

Nicholas Belotti

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)

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)

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).

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

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

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

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

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

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

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!

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

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

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

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

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

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

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

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

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

Who is Using RoR

Many well known sites are built on RoR

Hulu

Twitter

Github

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

RoR in ActionExample Site

Thank youQuestions or Comments