SlideShare ist ein Scribd-Unternehmen logo
1 von 40
Cómo programar un blog  REST Javier Vidal Postigo http://javiervidal.net/ Conferencia Rails 2007
¿Qué es Rails?
framework  ruby  para desarrollar aplicaciones web con acceso a base de datos
framework  ruby  para desarrollar aplicaciones web con acceso a base de datos convención mejor que configuración
¿Qué es MVC?
MVC en Rails DB Enrutador Vista Modelo Controlador
MVC en Rails DB Enrutador Vista Modelo Controlador
MVC en Rails DB Enrutador Vista Modelo Controlador
MVC en Rails DB Enrutador Vista Modelo Controlador
MVC en Rails DB Enrutador Vista Modelo Controlador
MVC en Rails DB Enrutador Vista Modelo Controlador
MVC en Rails DB Enrutador Vista Modelo Controlador
[object Object],[object Object]
¿Qué es REST?
REST =>   “Representational State Transfer” ,[object Object],[object Object],[object Object]
REST =>   “Representational State Transfer” ,[object Object],[object Object],[object Object],recurso URI instancia de modelo
REST =>   “Representational State Transfer” ,[object Object],[object Object],[object Object],recurso URI instancia de modelo operación verbo HTTP acción del controlador
Create Read Update Delete
Create Read Update Delete insert find update delete
Create Read Update Delete insert find update delete POST GET UPDATE DELETE
Create Read Update Delete insert find update delete POST GET UPDATE DELETE create show update destroy
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],class  PostsController < ApplicationController
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],class  PostsController < ApplicationController
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],class  PostsController < ApplicationController
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],class  PostsController < ApplicationController
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],class  PostsController < ApplicationController
Todavía hay más
class  PostsController < ApplicationController # GET /posts def  index ...  end # GET /posts/1 def  show ...  end # GET /posts/new def  new ...  end # GET /posts/1/edit def  edit ...  end # POST /posts def  create ...  end # PUT /posts/1 def  update ...  end # DELETE /posts/1 def  destroy ...  end end
class  PostsController < ApplicationController # GET /posts def  index ...  end # GET /posts/1 def  show ...  end # GET /posts/new def  new ...  end # GET /posts/1/edit def  edit ...  end # POST /posts def  create ...  end # PUT /posts/1 def  update ...  end # DELETE /posts/1 def  destroy ...  end end
class  PostsController < ApplicationController # GET /posts def  index ...  end # GET /posts/1 def  show ...  end # GET /posts/new def  new ...  end # GET /posts/1/edit def  edit ...  end # POST /posts def  create ...  end # PUT /posts/1 def  update ...  end # DELETE /posts/1 def  destroy ...  end end
class  PostsController < ApplicationController # GET /posts def  index ...  end # GET /posts/1 def  show ...  end # GET /posts/new def  new ...  end # GET /posts/1/edit def  edit ...  end # POST /posts def  create ...  end # PUT /posts/1 def  update ...  end # DELETE /posts/1 def  destroy ...  end end
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],post membership comment
RailsConf '06: World of Resources David Heinemeier Hansson http://media.rubyonrails.org/presentations/worldofresources.pdf Desarrollo REST con Rails Ralf Wirdemann y Thomas Baustert (traducción de Juán Lupión) http://www.b-simple.de/download/restful_rails_es.pdf RESTful Web Services Leonard Richardson y Sam Ruby http://www.amazon.com/ Referencias
http://javiervidal.net/ [email_address]

Weitere ähnliche Inhalte

Was ist angesagt?

Silex: From nothing to an API
Silex: From nothing to an APISilex: From nothing to an API
Silex: From nothing to an API
chrisdkemper
 
Grape Presentation
Grape PresentationGrape Presentation
Grape Presentation
chrishein
 

Was ist angesagt? (20)

Task scheduling in laravel 8 tutorial
Task scheduling in laravel 8 tutorialTask scheduling in laravel 8 tutorial
Task scheduling in laravel 8 tutorial
 
Processing XML with Java
Processing XML with JavaProcessing XML with Java
Processing XML with Java
 
RESTful API development in Laravel 4 - Christopher Pecoraro
RESTful API development in Laravel 4 - Christopher PecoraroRESTful API development in Laravel 4 - Christopher Pecoraro
RESTful API development in Laravel 4 - Christopher Pecoraro
 
Top laravel packages to install handpicked list from expert
Top laravel packages to install handpicked list from expertTop laravel packages to install handpicked list from expert
Top laravel packages to install handpicked list from expert
 
Silex and Twig (PHP Dorset talk)
Silex and Twig (PHP Dorset talk)Silex and Twig (PHP Dorset talk)
Silex and Twig (PHP Dorset talk)
 
Laravel Beginners Tutorial 1
Laravel Beginners Tutorial 1Laravel Beginners Tutorial 1
Laravel Beginners Tutorial 1
 
Service approach for development Rest API in Symfony2
Service approach for development Rest API in Symfony2Service approach for development Rest API in Symfony2
Service approach for development Rest API in Symfony2
 
Web services with laravel
Web services with laravelWeb services with laravel
Web services with laravel
 
PhpSpec extension points
PhpSpec extension pointsPhpSpec extension points
PhpSpec extension points
 
Silex: From nothing to an API
Silex: From nothing to an APISilex: From nothing to an API
Silex: From nothing to an API
 
Workshop Laravel 5.2
Workshop Laravel 5.2Workshop Laravel 5.2
Workshop Laravel 5.2
 
RSpec. Part 2
RSpec. Part 2RSpec. Part 2
RSpec. Part 2
 
Laravel Beginners Tutorial 2
Laravel Beginners Tutorial 2Laravel Beginners Tutorial 2
Laravel Beginners Tutorial 2
 
Web service with Laravel
Web service with LaravelWeb service with Laravel
Web service with Laravel
 
Laravel - Website Development in Php Framework.
Laravel - Website Development in Php Framework.Laravel - Website Development in Php Framework.
Laravel - Website Development in Php Framework.
 
Grape Presentation
Grape PresentationGrape Presentation
Grape Presentation
 
PHP7 – Benefits and Drawbacks
PHP7 – Benefits and DrawbacksPHP7 – Benefits and Drawbacks
PHP7 – Benefits and Drawbacks
 
Adventurous Merb
Adventurous MerbAdventurous Merb
Adventurous Merb
 
RSpec. Part 1
RSpec. Part 1RSpec. Part 1
RSpec. Part 1
 
jQuery Plugin
jQuery PluginjQuery Plugin
jQuery Plugin
 

Ähnlich wie Como programar un blog REST

OSDC 2009 Rails Turtorial
OSDC 2009 Rails TurtorialOSDC 2009 Rails Turtorial
OSDC 2009 Rails Turtorial
Yi-Ting Cheng
 
Rails Routing and URL design
Rails Routing and URL designRails Routing and URL design
Rails Routing and URL design
hiq5
 
Action Controller Overview, Season 2
Action Controller Overview, Season 2Action Controller Overview, Season 2
Action Controller Overview, Season 2
RORLAB
 
Rails 3 overview
Rails 3 overviewRails 3 overview
Rails 3 overview
Yehuda Katz
 
Be happy with Ruby on Rails - CEUNSP Itu
Be happy with Ruby on Rails - CEUNSP ItuBe happy with Ruby on Rails - CEUNSP Itu
Be happy with Ruby on Rails - CEUNSP Itu
Lucas Renan
 
Presentation.Key
Presentation.KeyPresentation.Key
Presentation.Key
guesta2b31d
 
Rails 3: Dashing to the Finish
Rails 3: Dashing to the FinishRails 3: Dashing to the Finish
Rails 3: Dashing to the Finish
Yehuda Katz
 

Ähnlich wie Como programar un blog REST (20)

Ruby on Rails at PROMPT ISEL '11
Ruby on Rails at PROMPT ISEL '11Ruby on Rails at PROMPT ISEL '11
Ruby on Rails at PROMPT ISEL '11
 
Código Saudável => Programador Feliz - Rs on Rails 2010
Código Saudável => Programador Feliz - Rs on Rails 2010Código Saudável => Programador Feliz - Rs on Rails 2010
Código Saudável => Programador Feliz - Rs on Rails 2010
 
OSDC 2009 Rails Turtorial
OSDC 2009 Rails TurtorialOSDC 2009 Rails Turtorial
OSDC 2009 Rails Turtorial
 
Advanced Views with Erector
Advanced Views with ErectorAdvanced Views with Erector
Advanced Views with Erector
 
Ruby/Rails
Ruby/RailsRuby/Rails
Ruby/Rails
 
CICON2010: Adam Griffiths - CodeIgniter 2
CICON2010: Adam Griffiths - CodeIgniter 2CICON2010: Adam Griffiths - CodeIgniter 2
CICON2010: Adam Griffiths - CodeIgniter 2
 
Introduction à Ruby
Introduction à RubyIntroduction à Ruby
Introduction à Ruby
 
Rails Routing and URL design
Rails Routing and URL designRails Routing and URL design
Rails Routing and URL design
 
Action Controller Overview, Season 2
Action Controller Overview, Season 2Action Controller Overview, Season 2
Action Controller Overview, Season 2
 
ActiveResource & REST
ActiveResource & RESTActiveResource & REST
ActiveResource & REST
 
Ruby - Design patterns tdc2011
Ruby - Design patterns tdc2011Ruby - Design patterns tdc2011
Ruby - Design patterns tdc2011
 
Rails 3 overview
Rails 3 overviewRails 3 overview
Rails 3 overview
 
Be happy with Ruby on Rails - CEUNSP Itu
Be happy with Ruby on Rails - CEUNSP ItuBe happy with Ruby on Rails - CEUNSP Itu
Be happy with Ruby on Rails - CEUNSP Itu
 
Presentation.Key
Presentation.KeyPresentation.Key
Presentation.Key
 
Rails 3: Dashing to the Finish
Rails 3: Dashing to the FinishRails 3: Dashing to the Finish
Rails 3: Dashing to the Finish
 
Getting started with Rails (2), Season 2
Getting started with Rails (2), Season 2Getting started with Rails (2), Season 2
Getting started with Rails (2), Season 2
 
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
 
Rails 3
Rails 3Rails 3
Rails 3
 
Rails antipatterns
Rails antipatternsRails antipatterns
Rails antipatterns
 
Rails antipattern-public
Rails antipattern-publicRails antipattern-public
Rails antipattern-public
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

Como programar un blog REST

  • 1. Cómo programar un blog REST Javier Vidal Postigo http://javiervidal.net/ Conferencia Rails 2007
  • 3. framework ruby para desarrollar aplicaciones web con acceso a base de datos
  • 4. framework ruby para desarrollar aplicaciones web con acceso a base de datos convención mejor que configuración
  • 6. MVC en Rails DB Enrutador Vista Modelo Controlador
  • 7. MVC en Rails DB Enrutador Vista Modelo Controlador
  • 8. MVC en Rails DB Enrutador Vista Modelo Controlador
  • 9. MVC en Rails DB Enrutador Vista Modelo Controlador
  • 10. MVC en Rails DB Enrutador Vista Modelo Controlador
  • 11. MVC en Rails DB Enrutador Vista Modelo Controlador
  • 12. MVC en Rails DB Enrutador Vista Modelo Controlador
  • 13.
  • 15.
  • 16.
  • 17.
  • 19. Create Read Update Delete insert find update delete
  • 20. Create Read Update Delete insert find update delete POST GET UPDATE DELETE
  • 21. Create Read Update Delete insert find update delete POST GET UPDATE DELETE create show update destroy
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 29. class PostsController < ApplicationController # GET /posts def index ... end # GET /posts/1 def show ... end # GET /posts/new def new ... end # GET /posts/1/edit def edit ... end # POST /posts def create ... end # PUT /posts/1 def update ... end # DELETE /posts/1 def destroy ... end end
  • 30. class PostsController < ApplicationController # GET /posts def index ... end # GET /posts/1 def show ... end # GET /posts/new def new ... end # GET /posts/1/edit def edit ... end # POST /posts def create ... end # PUT /posts/1 def update ... end # DELETE /posts/1 def destroy ... end end
  • 31. class PostsController < ApplicationController # GET /posts def index ... end # GET /posts/1 def show ... end # GET /posts/new def new ... end # GET /posts/1/edit def edit ... end # POST /posts def create ... end # PUT /posts/1 def update ... end # DELETE /posts/1 def destroy ... end end
  • 32. class PostsController < ApplicationController # GET /posts def index ... end # GET /posts/1 def show ... end # GET /posts/new def new ... end # GET /posts/1/edit def edit ... end # POST /posts def create ... end # PUT /posts/1 def update ... end # DELETE /posts/1 def destroy ... end end
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39. RailsConf '06: World of Resources David Heinemeier Hansson http://media.rubyonrails.org/presentations/worldofresources.pdf Desarrollo REST con Rails Ralf Wirdemann y Thomas Baustert (traducción de Juán Lupión) http://www.b-simple.de/download/restful_rails_es.pdf RESTful Web Services Leonard Richardson y Sam Ruby http://www.amazon.com/ Referencias