Ruby On Rails. James Reynolds



Similar documents
Ruby on Rails. a high-productivity web application framework. blog.curthibbs.us/ Curt Hibbs <curt@hibbs.com>

Ruby on Rails is a web application framework written in Ruby, a dynamically typed programming language The amazing productivity claims of Rails is

Web Development Frameworks

Building and Deploying Web Scale Social Networking Applications Using Ruby on Rails and Oracle. Kuassi Mensah Group Product Manager

Oracle Application Express MS Access on Steroids

Rails Cookbook. Rob Orsini. O'REILLY 8 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo

A Model of the Operation of The Model-View- Controller Pattern in a Rails-Based Web Server

An Introduction to the Development of Web Applications using Ruby on Rails with Ajax

Design Approaches of Web Application with Efficient Performance in JAVA

CS169.1x Lecture 5: SaaS Architecture and Introduction to Rails " Fall 2012"

Mastering Tomcat Development

Deep in the CRUD LEVEL 1

Zend Server 4.0 Beta 2 Release Announcement What s new in Zend Server 4.0 Beta 2 Updates and Improvements Resolved Issues Installation Issues

The IBM i on Rails + + Anthony Avison anthony@powerruby.com. Copyright 2014 PowerRuby, Inc.

Short notes on webpage programming languages

Personal Profile. Experience. Professional Experience

Pentesting Web Frameworks (preview of next year's SEC642 update)

Rapid Application Development. and Application Generation Tools. Walter Knesel

Ruby on Rails. Object Oriented Analysis & Design CSCI-5448 University of Colorado, Boulder. -Dheeraj Potlapally

Outline. Lecture 18: Ruby on Rails MVC. Introduction to Rails

Requirements Design Implementation. Software Architectures. Components Software Component Architecture. DSSA: Domain-Specific Software Architectures

Using Ruby on Rails for Web Development. Introduction Guide to Ruby on Rails: An extensive roundup of 100 Ultimate Resources

PHP on IBM i: What s New with Zend Server 5 for IBM i

Enter Here --->> Directory Submitter Software For One > Get it Here <

Rich Internet Applications

PRINCIPAL JAVA ARCHITECT JOB ID: WD001087

Architecture and Mode of Operation

Web-JISIS Reference Manual

IceWarp to IceWarp Server Migration

Evaluation. Chapter 1: An Overview Of Ruby Rails. Copy. 6) Static Pages Within a Rails Application

CURRICULUM VITAE / RESUME

Web Design Technology

1. Was ist das? II. Wie funktioniert das? III. Wo funktioniert das nicht?

Tool-Assisted Knowledge to HL7 v3 Message Translation (TAMMP) Installation Guide December 23, 2009

RESTful Rails Development. translated by Florian Görsdorf and Ed Ruder

Enabling AJAX in ASP.NET with No Code

Server-Side Scripting and Web Development. By Susan L. Miertschin

LICENSE4J AUTO LICENSE GENERATION AND ACTIVATION SERVER USER GUIDE

Livezilla How to Install on Shared Hosting By: Jon Manning

The NetBeans TM Ruby IDE: You Thought Rails Development Was Fun Before

IT Support Tracking with Request Tracker (RT)

APACHE. Presentation by: Lilian Thairu

Course Number: IAC-SOFT-WDAD Web Design and Application Development

RemoteTM Web Server User Guide. Copyright Maxprograms

AJAX and JSON Lessons Learned. Jim Riecken, Senior Software Engineer, Blackboard Inc.

Installation Guide for contineo

A Web- based Approach to Music Library Management. Jason Young California Polytechnic State University, San Luis Obispo June 3, 2012

Web-JISIS 10 March 2016 Reference Manual

Pete Helgren Ruby On Rails on i

10CS73:Web Programming

Java/J2EE or Web Developer. Formal Education. Technical knowledge. Spoken Languages

Enter Here --->> New Instant Directory Profits Software - ebook

Inputsoft Business Software & Consulting. Learn more at

Credits: Some of the slides are based on material adapted from

Benchmarking and monitoring tools

WHITE PAPER. Domo Advanced Architecture

Installing The SysAidTM Server Locally

Accessing External Databases from Mobile Applications

Ruby On Rails A Cheatsheet. Ruby On Rails Commands

WPI Helpdesk Employee Management System

HTSQL is a comprehensive navigational query language for relational databases.

Web Mapping in Archaeology

Web Applications: Overview and Architecture

Web Application Frameworks. Robert M. Dondero, Ph.D. Princeton University

ECOMMERCE SITE LIKE- GRAINGER.COM

Glassfish, JAVA EE, Servlets, JSP, EJB

Installation of PHP, MariaDB, and Apache

CSCI110 Exercise 4: Database - MySQL

USING MYWEBSQL FIGURE 1: FIRST AUTHENTICATION LAYER (ENTER YOUR REGULAR SIMMONS USERNAME AND PASSWORD)

PHP. Introduction. Significance. Discussion I. What Is PHP?

Cloud Computing. With MySQL and Pentaho Data Integration. Matt Casters Chief Data Integration at Pentaho Kettle project founder

Web Development. How the Web Works 3/3/2015. Clients / Server

WWW. World Wide Web Aka The Internet. dr. C. P. J. Koymans. Informatics Institute Universiteit van Amsterdam. November 30, 2007

Web development... the server side (of the force)

IBM Rational Web Developer for WebSphere Software Version 6.0

Building Dynamic Web 2.0 Websites with Ruby on Rails

Web 2.0 Technology Overview. Lecture 8 GSL Peru 2014

Senior 01/28/16 Sofware Ingeneer: Software development, Architecture and Project Management 1

Implementing a Web-based Transportation Data Management System

ISL Online Integration Manual

Los Angeles Trade-Technical College Student Employment Center. Computer Science. Part-Time

In order for the form to process and send correctly the follow objects must be in the form tag.

Using Apache Derby in the real world

Web Programming with PHP 5. The right tool for the right job.

Transcription:

Ruby On Rails James Reynolds

What is a Ruby on Rails Why is it so cool Major Rails features

Web framework Code and tools for web development A webapp skeleton Developers plug in their unique code

Platforms Windows Mac OS X Linux

Installation Mac OS X 10.5 will include Rails Mac OS X 10.4 includes Ruby Most people reinstall it anyway From scratch Drag and drop Locomotive

Databases Mysql SQLite PostgreSQL DB2 Oracle Firebird SQL Server more

Webservers Apache w/ FastCGI or Mongrel LightTPD WEBrick

"IDE's" TextMate and Terminal (preferred) RadRails jedit Komodo Arachno Ruby

Has "inspired" Grails Trails Sails Catalyst Pylons ColdFusion on Wheels CakePHP PHP on TRAX MonoRail TrimPath Junction WASP And perhaps more...

Why is it so cool? Using the right tool for the job y = x^2 vs y = x^0.5

Right tool

Rails is the most well thought-out web development framework I've ever used. And that's in a decade of doing web applications for a living. I've built my own frameworks, helped develop the Servlet API, and have created more than a few web servers from scratch. Nobody has done it like this before. James Duncan Davidson, Creator of Tomcat and Ant

y = x ^ 2 vs y = x ^ 0.5 Features Features Typical Work Rare Work

y = x ^ 2 vs y = x ^ 0.5 Feature ceiling Features Features Work Work This is a no-brainer...

Ruby on Rails is a breakthrough in lowering the barriers of entry to programming. Powerful web applications that formerly might have taken weeks or months to develop can be produced in a matter of days. - Tim O'Reilly, Founder of O'Reilly Media

Major Rails features Model View Controller Run Environments Unit testing Migrations Scripts ActiveSupport

MVC Described by Trygve Reenskaug in 1979 Totally ignored in web dev Except WebObjects Struts JavaServer Faces

Model-View-Controller sees User uses View updates results Model Controller queries

How it works User Produces HTML Receives URL actions Deals w/ data

How it works HTML file: <form> <button> </form> User clicks submit button (sends url) View.rb Controller.rb showsuccess() showerror() Model.rb performsave() save()

<div> Save was successful </div> 7 8 showsuccess() produces HTML saves to 4 mysql or flat file or whatever How it works User calls showsuccess() 5 6 returns: true 1 save(:a="b",:c="d") http://server/do? a=b&c=d 2 performsave( :a="b",:c="d" ) 3

Desktop App Email HTML Why use it? User Desktop App Email HTTP BDB MySQL flat file

Why use it? updates GUI sends email produces HTML saves to BDB User calls showsuccess() returns: true saves to MySQL mailto: action@server performsave( :a="b",:c="d" ) saves to flat file Button http://server/do? a=b&c=d

Models DB backed Easy to switch db's Stored on server as files Stored in session objects useful for one server manage with a db for many servers

Models Object relational mapping tables = classes rows = arrays of objects columns = attributes/variables Maps form submissions to classes No need to write SQL

Models Naming conventions Table names are plural A Class is singular Table attributes auto discovered Comes with find method etc

Models - Validation Fields are not empty Numerically of fields Uniqueness of text Matches text to regex 2 password fields same Length of text Custom validators Etc Acceptance (checkbox)

Models - Validation class Person < ActiveRecord::Base end validates_acceptance_of :terms, :message => "Please accept the terms to proceed" validates_exclusion_of :age, :in 13..19, :message => "Cannot be a teenager" validates_format_of :height, :with => /^\d+(in cm)/

Models - Connecting One to one relationships has_one belongs_to One to many relationships has_many Many to many relationships has_and_belongs_to_many

Models - Connecting class Project < ActiveRecord::Base belongs_to has_one has_many :portfolio :manager :milestones end has_and_belongs_to_many :categories

Views Create html, xml, and js Flash flash[:notice] = "Message here" Ajax built in and dumb simple

Tangent - AJAX Asynchronous JavaScript and XML How it works Mouse click runs a JavaScript JS contacts server Server replies with XML JS parses XML and updates HTML NO PAGE RELOADS

Tangent - AJAX Google uses AJAX heavily Google Maps Google Calendar The MS killing Word Processor Etc

Controllers Handles external requests to internal methods Pretty friendly urls NO: http://example.com/?node=34 Yes: http://example.com/blog/view/34 Caches

Run Environments Production Development Testing

Run Environments Production Cached Freeze Rails Ship Rails with your app etc

Run Environments Development Reloads source files every time Scaffold

Run Environments Testing Connect debugger to running webapp Stop at breakpoints Unit testing Integration testing Functional testing DB is reloaded w/ each test Mock and stub code

Unit testing require 'test/unit' def mult param1, param2 param1 * param2 end class TestMath < Test::Unit::TestCase def test_simple assert_equal( mult( 4, 4 ), 16 ) end end

Other killer features Migrations Add/remove database scheme changes script/runner cron for your db script/console profiler

Sessions Cookie based You just add stuff to the session hash session[:something] = "value" Hash stored on the server on disk or in db Not stored in cookie Easy to use a db

ActiveSupport number_to_currency 5.months + 30.minutes "cat".pluralize => "cats" 240.megabytes + 2.petabytes 20.minutes.ago

You can recognize truth by its beauty and simplicity. When you get it right, it is obvious that it is right. Richard Feynman, Genius Scientist

Demo