Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Arquitectura REST

3.165 visualizaciones

Publicado el

Principios básicos de la Arquitectura Rest, haciendo especial hincapié en las 6 restricciones que permiten crear API altamente escalables (Uniform Interface, Stateless, Cacheable, Client-Server, Layered System y Code on Demand).

Estas restricciones son la base de la Arquitectura REST y aplicarlas nos ayudaran a conseguir buenos diseño: correcto nombrado de los servicios, recursos, aplicar el método (GET, POST, PUT, DELETE) apropiado a la acción, descubrir recursos basándonos únicamente en las respuestas del servidor (HATEOAS), ..

Además, conoceremos el Modelo de Madurez Richarson que nos permite conocer en que punto nos encontramos dentro de la arquitectura, algunos antipatrones de diseño y ejemplos de API REST (Twitter, Facebook).

Publicado en: Software
  • DOWNLOAD THE BOOK INTO AVAILABLE FORMAT (New Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THE can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THE is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBOOK .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, CookBOOK, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, EBOOK, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THE Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THE the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THE Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • You can hardly find a student who enjoys writing a college papers. Among all the other tasks they get assigned in college, writing essays is one of the most difficult assignments. Fortunately for students, there are many offers nowadays which help to make this process easier. The best service which can help you is HelpWriting.net
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • DOWNLOAD THE BOOK INTO AVAILABLE FORMAT (New Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THE can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THE is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBOOK .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, CookBOOK, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, EBOOK, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THE Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THE the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THE Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • DOWNLOAD THE BOOK INTO AVAILABLE FORMAT (New Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THE can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THE is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBOOK .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, CookBOOK, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, EBOOK, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THE Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THE the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THE Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • DOWNLOAD THE BOOK INTO AVAILABLE FORMAT (New Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THE can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THE is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBOOK .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, CookBOOK, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, EBOOK, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THE Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THE the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THE Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí

Arquitectura REST

  1. 1. ARQUITECTURA REST Universidad de Burgos Burgos, 3 de Diciembre de 2014
  2. 2. Arquitectura REST 2| Índice Qué no es REST Introducción Restricciónes Richardson Madurity Model Rest Anti Patterns Seguridad Documentación Algunos Frameworks Java y PHP Demo Time Q&A
  3. 3. Arquitectura REST 3| REST NO ES … REST no es un tecnología. REST no es un framework. REST no es un patrón de diseño. REST no es un protocolo. REST no es un estándar. Arquitectura REST
  4. 4. Arquitectura REST 4| ¿QUÉ ES REST? REST is a coordinated set of architectural constraints that attempts to minimize latency and network communication while at the same time maximizing the independence and scalability of component implementations. Arquitectura REST Roy Fielding Tesis Doctoral Architectural Styles and the Design of Network- based Software Architectures, University of California, Irvine, 2000
  5. 5. Arquitectura REST 5| DESCRIPCIÓN GENERAL REST == REpresentational State Transfer Basado en Recursos (Elemento de información) Representación (Formato de la información) Restricciones:  Client-Server  Stateless  Cacheable  Uniform Interface  Layered System  Code-on-demand Arquitectura REST
  6. 6. Arquitectura REST 6| RESTRICCIONES: CLIENT-SERVER Separación de responsabilidades. Mejora la portabilidad a distintas plataformas. Aumento de la escalabilidad. Componentes evolucionan de forma independiente. Arquitectura REST
  7. 7. Arquitectura REST 7| RESTRICCIONES: STATELESS Cada petición contiene toda la información necesaria para que el servidor la procese. El estado de sesión se mantiene totalmente en el cliente. Componentes evolucionan de forma independiente. Arquitectura REST
  8. 8. Arquitectura REST 8| RESTRICCIONES: CACHEABLE Respuestas del servidor (representaciones) son cacheables:  Implícita  Explicita  Negociables Arquitectura REST
  9. 9. Arquitectura REST 9| RESTRICCIONES: UNIFORM INTERFACE Principal característica diferenciadora frente a otras arquitecturas. Las implementaciones se separan de los servicios que proporcionan ¿Cómo?  Verbos HTTP  URIs (nombres de recursos)  Respuestas HTTP (status, body) Arquitectura REST
  10. 10. Arquitectura REST 10| RESTRICCIONES: LAYERED SYSTEM Los servicios REST están orientados a la escalabilidad. El cliente no sabe si la petición se realiza directamente a un servidor, un sistema de cachés o por ejemplo un balanceador que se encarga de redirigirlo hacia un servidor final. Arquitectura REST
  11. 11. Arquitectura REST 11| RESTRICCIONES: CODE-ON-DEMAND Servidor puede extender o personalizar temporalmente la funcionalidad del cliente. Transferencia de la lógica al cliente. Cliente ejecuta la lógica. Restricción opcional Ejemplos:  Java Applets  JavaScript Arquitectura REST
  12. 12. Arquitectura REST 12| OBJETIVOS Simplicidad Escalabilidad Portabilidad Independizar el cliente/servidor Sintaxis “universal” Sistemas tolerantes al cambio Minimizar la latencia Arquitectura REST
  13. 13. Arquitectura REST 13| RICHARDSON MATURITY MODEL Arquitectura REST
  14. 14. Arquitectura REST 14| LEVEL 0: THE SWAMP OF POX (PLAIN OLD XML) Arquitectura REST Una URI, un Método HTTP HTTP como un sistema de transporte para interacciones remotos Basado en Remote Procedure Invocation. XML-RPC y SOAP
  15. 15. Arquitectura REST 15| LEVEL 1: RESOURCES Arquitectura REST URI (Uniform Resource Identifier) Los nombres de URI no deben implicar una acción Evitar uso de verbos. Deben ser Únicas Independientes del formato. Deben mantener una jerarquía lógica. Los filtrados de información de un recurso no se hacen en la URI.
  16. 16. Arquitectura REST 16| LEVEL 1: RESOURCES Arquitectura REST
  17. 17. Arquitectura REST 17| LEVEL 1: RESOURCES Arquitectura REST
  18. 18. Arquitectura REST 18| LEVEL 2: HTTP VERBS GET para obtener la representacion/es de un recurso/s POST para crear un recurso PUT para modificar un recurso DELETE para eliminar un recuerso PATCH para actualizar parcialmente un recurso  Uso de HTTP Status Code para indicar el resultado:  HTTP/1.1 2xx Petición Correcta  HTTP/1.1 4xx Errores del Cliente  HTTP/1.1 5xx Errores en el Servidor Arquitectura REST
  19. 19. Arquitectura REST 19| LEVEL 2: HTTP VERBS Arquitectura REST
  20. 20. Arquitectura REST 20| LEVEL 3: HYPERMEDIA CONTROLS Arquitectura REST HATEOS (Hypermedia as the Engine of Application State) API debe poder ser navegable sin documentación
  21. 21. Arquitectura REST 21| LEVEL 3: HYPERMEDIA CONTROLS Arquitectura REST
  22. 22. Arquitectura REST 22| LEVEL 3: HYPERMEDIA CONTROLS (EJEMPLO) Arquitectura REST
  23. 23. Arquitectura REST 23| LEVEL 3: HYPERMEDIA CONTROLS (EJEMPLO) Arquitectura REST
  24. 24. Arquitectura REST 24| REST ANTI-PATTERS BY STEFAN TILKOV Todas las peticiones a través de GET Todas las peticiones mediante POST Cache, ¿qué cache????? No utilizar códigos de respuesta Mal uso de cookies Olvidarnos de Hypermedia Haciendo caso omiso de los tipos MIME Mal uso de las cabeceras HTTP Arquitectura REST
  25. 25. Arquitectura REST 25| SEGURIDAD Arquitectura REST Recordad que nuestros servicios web deben ser stateless (sin estado):  No utilizar cookies o HTTP Session.  El cliente debe enviar las credenciales de autenticación en cada llamada. Opciones:  HTTP Security  OAuth
  26. 26. Arquitectura REST 26| DOCUMENTACIÓN Arquitectura REST JavadocTagsForExtendedWADL  Permite añadir más información al WADL.  Se puede aplicar un transformada para generar documentación ad hoc. Swagger  Ampliamente extendido y estable.  Independiente del lenguaje de programación.  UI para probar los servicios.
  27. 27. Arquitectura REST 27| ALGUNOS FRAMEWORKS JAVA Y PHP Arquitectura REST
  28. 28. Arquitectura REST 28| https://github.com/hfuentepe/basic-jersey.git
  29. 29. Arquitectura REST 29|
  30. 30. Arquitectura REST 30| LECTURAS RECOMENDADAS Arquitectura REST
  31. 31. Héctor Fuente Pérez fuenteperez.es @hfuentepe

×