SlideShare a Scribd company logo
Lo sviluppo agile di
  applicazioni web
(su database Oracle)


Conferenza Annuale OUGIT
 Parma – 1 dicembre 2006

     Luca Mearelli
Ruby on Rails




Perchè? Come? Cosa?
Perchè?
Motivazione  Produttività
Troppa quot;Enterprisequot;
Liberare le Buone Idee
Come?
Predire il futuro è per gli oracoli




      Distillato da un servizio reale
È l'unico modo di creare un framework
    Occorre provare le API sul campo
Principi

        Less Is More

    Don't Repeat Yourself

Convention Over Configuration

  Constraints Are Liberating

   Flexibility Is Overrated
Ruby !?!
  Tutto è un oggetto
Espressività dei blocchi
     Introspezione
 Estensione a runtime
    Librerie ricche
Cosa?
Un ambiente per la creazione di applicazioni
                     web


    Una soluzione completa per un problema
    Focalizzata sugli obiettivi non sui mezzi
      Non una singola grossa innovazione
       Infrastruttura NON Business Logic
Integrato




       Dalle pagine al database
 un linguaggio solo per tutti i livelli
si prende cura dei piccoli particolari
Model View Controller
    (completo!)
Un insieme di
Domain Specific Language(s)
ActiveRecord
      ORM che implementa il pattern ActiveRecord

                    ActionPack
Controllo del flusso e gestione delle viste (il VC nel MVC).

                   ActionMailer
       Gestione delle email (invio, ricezione, test)

              ActionWebService
               Supporto per i Web service.

                 ActiveSupport
            Utility di supporto del framework.

                       Plugins
In Azione!
ActiveRecord
utente = User.new
 utente.name = “Scott Tiger”
         utente.save


 User.create( { :login=>’luca’,
        :name=>’Luca Mearelli’
                    })
lm = User.find_by_login(‘luca’)
  lm.name #‘Luca Mearelli’
Introduzione a Ruby On Rails
Introduzione a Ruby On Rails
Introduzione a Ruby On Rails
Introduzione a Ruby On Rails
Introduzione a Ruby On Rails
Introduzione a Ruby On Rails
Introduzione a Ruby On Rails
Database Migrations
Introduzione a Ruby On Rails
Introduzione a Ruby On Rails
Introduzione a Ruby On Rails
Introduzione a Ruby On Rails
Introduzione a Ruby On Rails
ActionController
wget http://myhost/guestbook/index


POST su http://myhost/guestbook/sign con parametri
Introduzione a Ruby On Rails
Introduzione a Ruby On Rails
Introduzione a Ruby On Rails
Views
Introduzione a Ruby On Rails
Introduzione a Ruby On Rails
Introduzione a Ruby On Rails
Capistrano
Introduzione a Ruby On Rails
Il risultato

quot;Most web frameworks force the developer to focus on the needs of the
 framework. You spend your time configuring X, or interfacing between
 Y and Z. Rails isn't like that. With Rails you focus on delivering value
 to your users. Everything else just gets taken care of. Rails finally
 brings agility to the web.quot;
Dave Thomas

quot;Rails has become a standard to which even well-established tools are
comparing themselves to.quot;
Martin Fowler, Autore di Refactoring, PoEAA, XP Explained


quot;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.quot;
Tim O'Reilly, Fondatore di O'Reilly Media

quot;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.“
… bello ma?
Issues (reali)

Bind variables in oracle

Integration o legacy databases

Deploy su windows / IIS

Accettazione in ambienti enterprise
Non-Issues

Scalabilità (shared nothing)

I18N (Globalize plugin, rails 1.2)

Integrazione con J2EE (Jruby!)

Curva di apprendimento (e Java ?!)
Strategie di adozione

Progetti interni

Prototipazione

Nuove applicazioni
Domande?



l.mearelli@spazidigitali.com
  http://spazidigitali.com
Sul Web
http://gettingreal.37signals.com/
http://rubyonrails.com
http://peepcode.com
http://www.therubymine.com/
http://google.com
                                     Libri
Agile Web Development with Rails
Dave Thomas, David Heinmeir Hansson (The Pragmatic Programmers)

Rails Recipes
Chad Fowler (The Pragmatic Programmers)

Ruby for Rails
David A. Black (Manning)

RJS Templates for Rails
Cody Fauser (O'Reilly)
THE END

More Related Content

Introduzione a Ruby On Rails

Editor's Notes