introduction to ruby on rails tm
Download
Skip this Video
Download Presentation
Introduction to Ruby on Rails TM

Loading in 2 Seconds...

play fullscreen
1 / 54

Introduction to Ruby on Rails TM - PowerPoint PPT Presentation


  • 320 Views
  • Uploaded on

Introduction to Ruby on Rails TM. Sergio Ontiveros / Omar Ontiveros Solutionwise Consulting. March, 2009. About Solutionwise. Rails Application Development Rails Development / Consultancy serving both Large Organizations and SME’s Rails Platform Integration (Rails on Java infrastructure)

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Introduction to Ruby on Rails TM' - kyle-frye


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
introduction to ruby on rails tm

Introduction toRuby on RailsTM

Sergio Ontiveros / Omar Ontiveros

Solutionwise Consulting

March, 2009

about solutionwise
About Solutionwise
  • Rails Application Development
    • Rails Development / Consultancy serving both Large Organizations and SME’s
    • Rails Platform Integration (Rails on Java infrastructure)
    • Application Migration to Rails
  • Web Development Background
    • Java Platform
      • Web Applications
      • Client/Server Applications
    • .NET (C#, ASP.NET)
    • Lotus Domino
  • “Software Artisans”
  • Involved with Rails / Ruby since 2005
  • Presentation Slides  www.solutionwise.ca
summary
Summary
  • Why Rails
  • What is Rails
  • How does it works
  • Where (How-does it works, part#2)
  • Ruby Demo
  • Rails Demo
  • Q & A
why ror
Why RoR?

Why do I (you) need to know about it?

slide10

In search of

“Programmer Happiness”

toolbar syndrome
Toolbar Syndrome

What about Tools for “Sophisticated Users” (a.k.a. Developers?)

software renaissance
“Software Renaissance”

“As a cultural movement, it encompassed a revival of learning based on classical sources, the development of linear perspective in painting, and gradual but widespread educational reform. Traditionally, this intellectual transformation has resulted in the Renaissance being viewed as a bridge between the Middle Ages and the Modern era.”

Source: http://en.wikipedia.org/wiki/Renaissance

competitive advantage
Competitive Advantage
  • Constant change = Perpetual Renewal of Best Practices
  • Conveys practical software paradigms
  • Leverage from developer produced tools
  • Potentially it opens new business opportunities
  • Lower cost (Open Source)
fundamental programming principles
Fundamental Programming Principles
  • KISS principle
  • Automate repetitive tasks
  • Don’t over engineer solutions
    • Write less code = Less to maintain + Faster Code
    • Simple may lead to elegant
  • Raising levels of abstraction
your people matters
Your People Matters
  • What keeps Developers motivated
    • Use new technology (yes to some extent)
    • Delivering on time
    • Productivity
    • Economic Compensation
  • Desirable, but what matters is:
    • Self-motivation (making and creating stuff)
    • Inherently Passion (for the craft)
    • Prefer tools that are developer friendly (…Productive)
what is ror
What is RoR?

“Ruby on RailsTM is an open source web application framework that is optimized for programmer happiness and sustainable productivity. It lets you write beautiful code by favoring convention over configuration.”

Source: http://rubyonrails.org/

“…It is intended to be used with an Agile development methodology, which is often utilized by web developers for its suitability for short, client-driven projects.”

Source: http://en.wikipedia.org/wiki/Ruby_on_Rails

history
History
  • Ruby
    • Truly Object Oriented, dynamic, meta-programming language
    • Ruby 0.95 in 1995
    • Current Release 1.9.1, most deployed Release 1.8.6
  • Rails
    • Extracted by David Heinemeier Hansson (DHH) from Basecamp, a project management tool by 37signals.
  • CONSTANT CHANGE
ror is agile
RoR is Agile
  • Manifesto for Agile Software Development
    • Responding to change over following a plan
    • Working software over comprehensive documentation
    • Customer collaboration over contract negotiation
    • Individuals and interactions over processes and tools
philosophy
Philosophy
  • DRY (Don’t Repeat Yourself)
  • CoC (Convention Over Configuration) – a.k.a “Smart defaults”.
  • Opinionated (.. and now with options)
  • Minimalist
slide22
YAWF?

(Yet Another Web Framework?)

disruptive
Disruptive
  • Drastic reduction in development timelines. (1/10)
  • Prototypes are not thrown away, but rather evolved.
  • Shatters existing paradigms.
    • Large applications need complex tools
    • Enterprise Projects must use Enterprise tools.
    • Divide and Conquer (“Share nothing”)
    • The inner workings should be complex
  • Disposable implementation of business ideas is now possible.
  • Create, Extend and Mold your own tools to fit your own business domain not the other way around.
influential
Influential
  • Post-Rails Web Development Era:
    • Jboss Seam, Grails, Trails (Java)
    • ASP.NET MVC (.Net )
    • Cake, PhpOnTrax (PHP)
    • Django, Subway (Phyton)
    • Catalyst, Perl on Rails (Perl)
  • Future new Frameworks are measured against RoR, in terms of ease of use, simplicity, extensibility and practicality.
ror and the organizational culture
RoR and the Organizational Culture
  • Practical
  • Trust
  • Ownership goes in parallel with Responsibility
  • No database “hugging”.
  • Change is OK

“We had really somewhat missed the Internet boat”

Richard Roy – General Manager Microsoft Dec. 1995

web development for all
“Web Development for All”
  • Effectively lowering the barrier of entry to Web Application Development, without losing capabilities or ability to implement features.
  • Heavily reliant on Ruby’s dynamic behaviour
  • “A script collection SD toolkit”1 for both highly experienced and entry-level developer
  • RoR can be understood as a “Domain Specific Language (DSL) for developing web applications. “
2009 fukuoka ruby award
2009 Fukuoka Ruby Award
  • Government of Fukuoka Japan raises public awareness of the growing software industry and Ruby

www.f-ruby.com

features
Features
  • Open Source
  • MVC
  • RESTful web architecture
  • Single Stack
  • Default Pluggable Single Stack (Rails 3.0)
  • Minimalist
  • Integrated Testing
support in closed source software
Support in Closed-Source Software

Software Company

Incident

Solution

Client

$$$

support in oss
Support in OSS

Source Code

RoR API Docs

Interchange

User

Mailing Lists

Forums

slide35
MVC

2.Event Handler

3.Compute Action

5. Render View

1. User Interaction

6. Read model

4. Read/Write model

to database

restful
RESTful

DATABASE

Create

Read

Update

Delete

WEB (HTTP)

Post

Get

Put

Delete

URLs

/my-app/clients/new

/my-app/clients/1

/my-app/clients/1/edit

/my-app/clients/1

  • Standard extensible and scalable integration (internal/external)
single stack
Single Stack

APPLICATION LAYERS

Database Layer

Presentation Layer

Business Logic

Middleware (M,L)

RoR Stack

ActiveRecord

ActionView

Ruby / DSL

ActiveResource

  • BENEFITS:
  • Less integration hassles
  • Improvements in the framework work across layers
  • Layers are optional
default pluggable stack
Default Pluggable Stack
  • Model Mapping (ORM)
    • Active Record … or Data Mapper or Sequel
  • View Templates
    • ERb…. or Haml
  • Ajax
    • Prototype/Scriptaculous…. Or JQuery
  • Controller
    • ActionController… or Rails Metal/Rack
minimalist
Minimalist
  • Minimal instruction that performs one task well
  • Additional optional parameters
  • Core is shrinking, extensible features via plug-ins
integrated testing
Integrated Testing
  • Automated test is critical to accelerate testing and avoid regression defects
  • Test coverage (80/20) - Critical for non-compiled languages
  • RoR Testing Artifacts
    • Fixtures
    • Functional
    • Integration
    • Unit
    • Mocks
multiplatform
Multiplatform
  • MRI (Matz’s Ruby Interpreter)
    • MRI 1.8.6 is widely deployed
    • MRI 1.8.7 intended as intermediate step towards 1.9.1
    • Current Release 1.9.1 (… but wait!)
  • Jruby
    • Release version: JRuby1.1.6 (Update: JRuby1.2.0 RC2)
    • Compatible w/ MRI 1.8.6 support for 1.9
  • Rubinius
    • Not 100% Rails compatible yet
  • IronRuby
    • Still Alpha
deployments
Deployments
  • Self-hosting
    • Traditional Mongrel cluster
    • Passenger
  • Cloud Computing
  • Simple, simpler, simplest
considerations when using ror
Considerations when using RoR
  • Encapsulating elements
    • Create your own APIs (abstractions) when possible
  • Automation, automation, automation
  • Source Code Version Control
      • Old code is commented out
      • DB assets not under version control
  • Refactor code as well as your DB Schema
          • Ref: www.ambysoft.com/books/refactoringDatabases.html
getting ruby and ror
Getting Ruby and RoR
  • Your favourite database
    • SQLite (default Rails development database)
    • MySQL (appropiate for most projects)
    • PostgreSQL (transactional applications)
  • http://www.ruby-lang.org/en/downloads
  • http://www.rubyonrails.org/download
slide46

RUBY

DEMO

slide47

RoR

DEMO

living interesting times
“Living interesting times”
  • Rails - Rails 3.0 (Summer…ish 2009)
      • Merging MERB/ project into Rails
      • Progress underway with Rails 2.3
          • Rails Metal and Rack
      • Github – Social code sharing
  • Ruby
      • Ruby 1.9.1
        • Block variable scope, Additional Lambda syntax, String encoding
        • Other options materialize (Rubinius/IronRuby)
conclusions
Conclusions
  • It started as an experiment
  • It has transformed Web Applications are developed
  • It has become ‘Enterprise Ready’
  • It will continue evolving
slide53

Thanks !

Presentation available at:

www. solutionwise.ca/talks/rails-ssmic.html

ad