investigación de los Avances tecnológicos del siglo XXI
WorkshopCamp Mexico 09 - Uniendo los puntos con Ruby on Rails
1. Uniendo los
puntos
en Ruby On
Rails
Rubén Medellín
@chubas
WorkshopCamp México
25 – 10 – 09
Bajo licencia Creative Commons Attribution-Non-Commercial-Share Alike 2.5
8. ¿Qué es Rails?
“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, fundador
de O'Reilly Media
9. Una que me gusta más
“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,
O'Reilly Program Chair for
OSCON
10. Mi propia definición
Rails es una plataforma
de desarrollo cuyo
principal objectivo es
eliminar la complejidad
innecesaria, haciendo el
proceso más ágil y al
desarrollador más feliz
11. La “magia” de Ruby on Rails está en
sus principios:
• Convention over configuration
• Complex framework, simple logic
• Test, then code
• Don't repeat yourself
• Don't reinvent the wheel
• entre otros
12. MVC en Rails
ActiveRecord
+
ActionController
+
ActionView
21. Controladores
Tienen acceso al objeto request y sus
atributos
Headers, cookies, sesión, parámetros (GET o POST),
response
Filtros y wrappers
Se encargan de preparar la respuesta
22. Respuesta
Por convención, rails
regresará una vista con el
nombre de la acción
Se puede regresar otra vista,
datos (archivos, streams),
redirecciones, errores, AJAX