Road to Rails

60 %
40 %
Information about Road to Rails

Published on May 28, 2007

Author: paoloperrotta

Source: slideshare.net

Description

From the "Rails: Hot or Not?" session at Sioux (Eindhoven, NL, May 23, 2007). An introduction to Rails and programming for the web, targeted at embedded developers. What are the challenges of web development? What technologies do we have at our disposal, and how does Ruby on Rails attack the problem?

Ruby on Rails Paolo Perrotta

Who we Are, What we Do. Mithun Training & Consulting is a fully independent training and consultancy company, focusing on quality improvement processes and techniques. Mithun Training & Consulting B.V. P.O. Box 898 3800 AW Amersfoort Netherlands T +31 (0)33-457 0840 F +31 (0)33-457 0839 W www.mithun.nl M info@mithun.nl

<Paolo Perrotta>

developer

author

teacher

Ruby on Rails

Rails

RoR

<what is Rails?>

Rails is a framework for building database-backed web applications in Ruby.

Rails is a framework for building database-backed web applications in Ruby.

Rails is a framework for building database-backed web applications in Ruby.

Rails, anyone?

hot or not?

early 2005 first time I heard about Ruby on Rails

<outrageous claims>

“[You] could develop a web application at least ten times faster with Rails than you could with a typical Java framework [...] without making any sacrifices in the quality of your application.” Curt Hibbs

“[You] could develop a web application at least ten times faster with Rails than you could with a typical Java framework [...] without making any sacrifices in the quality of your application.” Curt Hibbs Cust Hibbs is a Senior Soft ware Engineer at Boeing. He was one of the authors of WordStar for Windows.

“Rails is the most well thought-out web development framework I’ve ever used.” James Duncan Davidson

“Rails is the most well thought-out web development framework I’ve ever used.” James Duncan Davidson JDD is the author of Tomcat and Ant.

“Powerful web applications that formerly might have taken weeks or months to develop can be produced in a matter of days [with Rails].” Tim O'Reilly

“Powerful web applications that formerly might have taken weeks or months to develop can be produced in a matter of days [with Rails].” Tim O'Reilly Tim is “that” O’Reilly - the editor.

“Rails has become a standard to which even well- established tools are comparing themselves to.” Martin Fowler

“Rails has become a standard to which even well- established tools are comparing themselves to.” Martin Fowler Author of “Refactoring”.

one more quote...

“Ruby on Rails is astounding. Using it is like watching a kung-fu movie, where a dozen bad-ass frameworks prepare to beat up the little newcomer only to be handed their asses in a variety of imaginative ways.” Nathan Torkington

“Ruby on Rails is astounding. Using it is like watching a kung-fu movie, where a dozen bad-ass frameworks prepare to beat up the little newcomer only to be handed their asses in a variety of imaginative ways.” Nathan Torkington Chairman at OScon

Thanks to Joey deVilla for this picture (http:// accordionguy.blogware.com/ Photos/2006/02/ bruce_on_rails.jpg)

<tonight>

presentation: road to Rails

demo

break

talking (Ruby?) (ActiveRecord?)

talking (Ruby?) (ActiveRecord?)

talking (Ruby?) (ActiveRecord?)

presentation: state of Rails

wrap-up

<road to Rails>

<web development>

why does it matter?

<challenges>

technical

people

<the medium>

unreliable

HTTP

stateless

no memory

no sessions

<the server>

integration

RDBs

Object-Oriented

mismatch

performance

many users

parallel programming

security

abuse

<the client>

the browser

thin client

stupid client

it sucks.

HTML

primitive GUI

constraining

flow

compatibility

many configurations

many browsers

many OSs

many devices

<the process>

quick

continuous feedback

moving target

<technologies>

static

just pages

forms

CGI

C

Perl

not secure

slow

web languages

ASP

PHP

template

HTML+code

<? $db = quot;DATABASE NAMEquot;; $admin = quot;MYSQL USER NAMEquot;; $adpass = quot;MYSQL PASSWORDquot;; $mysql_link = mysql_connect(quot;localhostquot;, $admin, $adpass); mysql_select_db($db, $mysql_link); ?> <HTML> <BODY> <script language=quot;phpquot;> if($react == quot;delete_userquot;) { if($user) { $query = quot;DELETE from login WHERE user='$user' quot;; $result = mysql_query($query, $mysql_link); if(mysql_num_rows($result)) { print(quot;<strong>$user</strong> successfully deleted<p>quot;); } } else { print(quot;<strong>no users to delete yet.</strong><p>quot;); } } </script> <form method=quot;POSTquot; action=quot;admin.php3quot;><div align=quot;centerquot;><center><p>Delete Users <input type=quot;hiddenquot; name=quot;reactquot; value=quot;delete_userquot;> <select name=quot;userquot; size=quot;1quot;> <script language=quot;phpquot;> $query = quot;SELECT user FROM login ORDER BY userquot;; $result = mysql_query($query, $mysql_link); ...

<? $db = quot;DATABASE NAMEquot;; $admin = quot;MYSQL USER NAMEquot;; $adpass = quot;MYSQL PASSWORDquot;; $mysql_link = mysql_connect(quot;localhostquot;, $admin, $adpass); mysql_select_db($db, $mysql_link); ?> <HTML> <BODY> <script language=quot;phpquot;> if($react == quot;delete_userquot;) { if($user) { $query = quot;DELETE from login WHERE user='$user' quot;; $result = mysql_query($query, $mysql_link); if(mysql_num_rows($result)) { print(quot;<strong>$user</strong> successfully deleted<p>quot;); } } else { print(quot;<strong>no users to delete yet.</strong><p>quot;); } } </script> <form method=quot;POSTquot; action=quot;admin.php3quot;><div align=quot;centerquot;><center><p>Delete Users <input type=quot;hiddenquot; name=quot;reactquot; value=quot;delete_userquot;> <select name=quot;userquot; size=quot;1quot;> <script language=quot;phpquot;> $query = quot;SELECT user FROM login ORDER BY userquot;; $result = mysql_query($query, $mysql_link); ...

<? $db = quot;DATABASE NAMEquot;; $admin = quot;MYSQL USER NAMEquot;; $adpass = quot;MYSQL PASSWORDquot;; $mysql_link = mysql_connect(quot;localhostquot;, $admin, $adpass); mysql_select_db($db, $mysql_link); ?> <HTML> <BODY> <script language=quot;phpquot;> if($react == quot;delete_userquot;) { if($user) { $query = quot;DELETE from login WHERE user='$user' quot;; $result = mysql_query($query, $mysql_link); if(mysql_num_rows($result)) { print(quot;<strong>$user</strong> successfully deleted<p>quot;); } } else { print(quot;<strong>no users to delete yet.</strong><p>quot;); } } </script> <form method=quot;POSTquot; action=quot;admin.php3quot;><div align=quot;centerquot;><center><p>Delete Users <input type=quot;hiddenquot; name=quot;reactquot; value=quot;delete_userquot;> <select name=quot;userquot; size=quot;1quot;> <script language=quot;phpquot;> $query = quot;SELECT user FROM login ORDER BY userquot;; $result = mysql_query($query, $mysql_link); ...

<? $db = quot;DATABASE NAMEquot;; $admin = quot;MYSQL USER NAMEquot;; $adpass = quot;MYSQL PASSWORDquot;; $mysql_link = mysql_connect(quot;localhostquot;, $admin, $adpass); mysql_select_db($db, $mysql_link); ?> <HTML> <BODY> <script language=quot;phpquot;> if($react == quot;delete_userquot;) { if($user) { $query = quot;DELETE from login WHERE user='$user' quot;; $result = mysql_query($query, $mysql_link); if(mysql_num_rows($result)) { print(quot;<strong>$user</strong> successfully deleted<p>quot;); } } else { print(quot;<strong>no users to delete yet.</strong><p>quot;); } } </script> <form method=quot;POSTquot; action=quot;admin.php3quot;><div align=quot;centerquot;><center><p>Delete Users <input type=quot;hiddenquot; name=quot;reactquot; value=quot;delete_userquot;> <select name=quot;userquot; size=quot;1quot;> <script language=quot;phpquot;> $query = quot;SELECT user FROM login ORDER BY userquot;; $result = mysql_query($query, $mysql_link); ...

tm Big Ball of Mud

Java

J2EE

JSP

many frameworks

Struts

many layers

complex

bloated

XML configuration

<?xml version=quot;1.0quot;?> <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'> <ejb-jar> <enterprise-beans> <!-- A minimal session EJB deployment --> <session> <ejb-name>PostingEJB</ejb-name> <home>ejbs.PostingHome</home> <remote>ejbs.Posting</remote> <ejb-class>ejbs.PostingBean</ejb-class> <!-- or Stateless --> <session-type>Stateful</session-type> <transaction-type>Container</transaction-type> </session> <!-- A minimal CMP entity EJB deployment --> <entity> <ejb-name>Bid</ejb-name> <home>ejbe.BidHome</home> <remote>ejbe.Bid</remote> <ejb-class>ejbe.BidBean</ejb-class> <persistence-type>Container</persistence-type> <prim-key-class>ejbe.BidPK</prim-key-class> <reentrant>False</reentrant> <cmp-field><field-name>bid</field-name></cmp-field> <cmp-field><field-name>bidder</field-name></cmp-field> <cmp-field><field-name>bidDate</field-name></cmp-field> <cmp-field><field-name>id</field-name></cmp-field> </entity> <!-- A minimal BMP entity EJB deployment --> <entity> <ejb-name>BidBMP</ejb-name> ...

the client side

Java applets

ActiveX

Flash

JavaScript

XMLHttpRequest

asynchronous

AJAX

better GUIs

difficult

<state of the art>

on the server

J2EE (or C#)

enterprisey

PHP

bigballofmuddy

on the client

AJAX

clumsy

not really great

anything better?

Rails

<the Rails Way>

I

KISS

Keep It Simple (Stupid)

Keep It Simple (Stupid)

II

DRY

Don’t Repeat Yourself

III

Convention over Configuration

Convention over Configuration

I - KISS II - DRY III - CoC

<demo>

<break>

<talk>

Add a comment

Related pages

Road to Rail Verkehrsbetriebe & Akademie - Startseite

Road to Rail entwickelt Transportlösungen. für bimodale Transporte. Unsere Stärke ist die Zusammenführung. von "Road to Rail" Wir freuen uns, wenn wir
Read more

Road To Rail

Road To Rail, a Western Australian based company providing Rail Guidance Systems (also known as Hirail or Hyrail) to both rail operators and contractors ...
Read more

Roads and Rails Museum | Model Trains & Classic Cars!

Address: 200 N. East St. Frederick, MD 21701 Phone: 301-624-5524 Email:roadsandrails@gmail.com
Read more

The Road to Rails 3 - thoughtbot

Being at RailsConf 5 has given us the opportunity to finalize a lot of the work we’ve done to prepare our plugins and gems for Rails 3. Thankfully, for ...
Read more

ROAD & RAIL

2013 @ ROAD & RAIL Internationale Speditionsgesellschaft m.b.H. - Telefon: 00431 7292172-0, Fax: 00431 7292172-20, Mail: anfragen@road-rail.at - Web: www ...
Read more

Road-rail vehicle - Wikipedia, the free encyclopedia

A road-rail vehicle is a vehicle which can operate both on rail tracks and a conventional road. They are also called hi-rail, from highway and rail, or ...
Read more

Rail transport - Wikipedia, the free encyclopedia

Rail transport is a means of conveyance of passengers and goods, by way of wheeled vehicles running on rails. It is also commonly referred to as train ...
Read more

Welcome to Fremantle Road to Rail Campaign | Fremantle ...

Fremantle Road To Rail is a public campaign run by the Fremantle and wider community concerned about the increase in truck freight on suburban roads and ...
Read more

Off The Rails - A free Action Game - Games at Miniclip.com ...

Play Off The Rails - Fahre deinen Handwagen sicher durch die Level.
Read more

Road Rails - Jay Leno's Garage - YouTube

Road Rails. Kinetic artist Randall Reading demos his adjustable motorized floorboards, made in his own garage and designed to make your long ...
Read more