SlideShare a Scribd company logo
Agile RESTful Web Development




 Michael Marth Technology Evangelist   Michael Dürig Senior Developer
 michael.marth@day.com                 michael.duerig@day.com
Jugs - Agenda

REST in 15 minutes
Meet Apache Sling
demo & code
What is REST?

A API                 B Technology
C SOAP’s arch enemy   D Architectural Style
REST: An Architectural Style

One of many Architectural Styles


Architectural principles of the
web, defined a posteriori


Defined through architectural
                                                          g
constraints                                 Roy T.
                                                   Fieldin
                                   Chief
                                         Scien
                                      at Da tist
                                   Soft y
                                        ware
Styles and implementation
           examples
                                  REST style
  peer to peer style


                         the
                               we b
                       imp     re le i s t h e
                           le m v a n t o n l y
                                ent
Napster                           Tat io W
                              R ES he n eb
                                    T          of
REST ingredients

      ly the        Resources
 rough aints
  constr s thesis
from
     Roy’           Representations of resources
                    Uniform interface
                    Hypertext and links
                    Stateless communication
Resources
                  give all relevant things an ID

don’t
                 http://example.com/cars/models/320
      have
   prett to be
         y



                     Representations
             http://example.com/cars/models/320.html
             http://example.com/cars/models/320.json
             http:/ /example.com/cars/models/320.xml
              http://example.com/cars/models/320.jsp
in
    a llows s to
         diarie hes,
  terme d (cac
                       Uniform interface
     rstan es)
unde roxi
        p

                           retrieve information, possibly
                   GET                 cached

                   PUT     Update or create with known ID

                  POST     Create or append sub-resource

                 DELETE           Logically remove
in
    a llows s to
         diarie hes,
  terme d (cac
                       Uniform interface
     rstan es)
unde roxi
        p
                                    check out the URL
                           retrieve/www.youtube.com/watch?
                            http:/ information, possibly
                   GET
                                     v=oHg5SJYRHA0
                                      cached

                   PUT     Update or create with known ID
                              with method “WATCH”
                  POST     Create or append sub-resource

                 DELETE           Logically remove
Hypertext

Link the “things” / the resources
                              How?
<link rel="some-concept" ref="/some-uri">

h a rdc o de d i n c l ie n
                              t      NOT h a rdc o de d i n c l ie n t


                          Why?
A special browser for each web site?

e.g. a Wikipedia browser that hardcodes
http:/ /en.wikipedia.org/wiki/{concept}

wikipedia   amazon     jugs.ch    blogs      nzz     admin.ch   search.ch     infoq   facebook    gma
browser     browser   browser    browser   browser   browser    browser     browser    browser   brows
A REST API must not define fixed
resource names or hierarchies (an obvious
  coupling of client and server). Servers
 must have the freedom to control their
              own namespace.
If you need this
it’s (probably) not REST
Stateless communication
state is kept on the client, no ser ver-side application state
                                                                                   s c a la bil it y
requests are self-contained
                                                    r ie s
                                 i n te r me di a




client                                                       server
              GET /customer/1234/orders

     <link rel=”...” ref=” /orders/123456789”></link>


                                                                update soft ware
                                                                reboot

              POST /orders/123456789
RPC-style modelling vs.
                   REST-style modelling
                                                              /orders
                                                    GET - list all orders

m a ny ope rat io n s                               PUT - unused
                                                    POST - add new order
                                                    DELETE - unused
 fe w i ns t ance s
                                       at io n s
                                                           /orders/{id}


                                 ope r
                                                    GET - get order details


                            fe w
                                                    PUT - update order


                                         ance s
 OrderManagementService                             POST - add item

                                   ins t
                                                    DELETE - cancel order


                            m a ny
+ getOrders()
+ submitOrder()
                                                      /orders/{id}/submit
+ getOrderDetails()
                                                    GET - unused
+ getOrdersForCustomers()
                                    <<interface>>   PUT - unused
+ updateOrder()
                                      Resource      POST - submit order
+ addOrderItem()
                                    GET             DELETE - unused
+ cancelOrder()
                                    PUT
                                    POST                    /customers
                                    DELETE          GET - list all customers
CustomerManagementService                           PUT - unused
                                                    POST - add new customer
+ getCustomers()                                    DELETE - unused
+ addCustomer()
+ getCustomerDetails()
                                                              /customers/{id}
+ updateCustomer()
                                                    GET - get customer details
+ deleteCustomer()
                                                    PUT - update customer
                                                    POST - unused
                                                    DELETE - delete customer

                                                          /customers/{id}/orders
                                                    GET - get all orders for customer
                                                    PUT - unused
                                                    POST - add order
                                                    DELETE - cancel all customer orders
Why again?
proven scalability
proven to evolve
proven cross-platform   The Web


Relevant for me?
REST for the Enterprise?
The Internet vs. The Enterprise
  One is a gigantic, uncontrollable anarchy of
  heterogeneous systems with varying quality
  that evolve independently and constantly get
  connected in new and unexpected ways.

  The other is a worldwide, publicly accessible
  series of interconnected computer networks
  that transmit data by packet switching using
  the standard Internet Protocol (IP).

                    Stefan Tilkov - Pragmatic Introduction to REST
Jugs - Agenda

REST in 15 minutes
Meet Apache Sling
demo & code
What’s Sling?

“Apache Sling is a RESTful web framework
that uses a Java Content Repository to
store and manage content.”just
                             g radu ate d
                             in Apache
                            incubator
What’s JCR?
“The API should be a standard,
implementation independent, way to
access content bi-directionally on a
granular level within a
content repository.” ?
Best of both worlds.
                     data base                  f il es ys te m
                                                          hier-
                                                        archi
         integ
              rity                 re                        es
                            structu
                                          read                    streams


         tx                             write                       access
                          query                         locking    control



multi-
value
                                                                        ning
                                                     obser-       versio
          un-structured
                          “full-text”   sort         vation
                                        order

                                  content repo sit or y
“Data First!”                        “s ch e m a le s s”
                                 ak a
          JCR s
   “stru upports
           cturef
                  irst” a
(but t
       ha
            well.        s
      t’s m
           issing
                    the p
                         oint)
Known compliant Repositories
                                                                * using third party connector

                                                                        *                   *

                                           Exo              Microsoft
Apache Jackrabbit    Oracle XML DB     ECMS Platform       Sharepoint       OpenText Livelink

                                                                                            *

    Day CRX          IBM FileNet P8   Xythos Repository   Alfresco ECM        Vignette V7

                *                                   *
                                                                                      any ors
                                                                                 ow mvend ?
                                                                                H S ed
   Interwoven                                        +hund                      DBMou ne
                                                                               R do y
                                                          r s
   Repository           IBM CM        EMC Documentum    regiede of TCKs
                                                            st
Some known JCR Applications

                                                                                Fast
 BEA Portal        Sun                            Oracle Portal          Enterprise Search
                              JBoss Portal                        Interface 21
              OpenPortal
                                            Day Communique Spring Framework
 magnolia WCMS                                    DAM
                         Apache Sling                                   Day Communique
              Alfresco ECMS                 Mindquarry                        Collab
                                          Collaboration         Apache Tapestry
                   QSLabs
 Apache          Compliance        Day Communiqué
 Cocoon                                 WCMS                                  IBM FileNet
                                Artifactory             medic-2-medic      WebSiteManager
         Apache James         Maven Proxy              mapofmedicine
                          Exo
                     ECMS Platform               TYPO3
GX WebManager                                  v5.0 WCM
                                 InfoQ                 Hippo                      Liferay
            Nuxeo ECM Online Community                 CMS                   Enterprise Portal
                                             Jahia                   Sakai
    Percussion                            Framework               E-learning
    Rhythmix             QuickWCM                                          Sourcemix
                           WCMS                     Lutece                 Sourcemix
Some known JCR Applications

                                                                                Fast
 BEA Portal        Sun                            Oracle Portal          Enterprise Search
                              JBoss Portal                        Interface 21
              OpenPortal
                                            Day Communique Spring Framework
 magnolia WCMS                                    DAM
                         Apache Sling                                   Day Communique
              Alfresco ECMS                 Mindquarry                        Collab
                                          Collaboration         Apache Tapestry
                   QSLabs
 Apache          Compliance        Day Communiqué
 Cocoon                                 WCMS                                  IBM FileNet
                                Artifactory             medic-2-medic      WebSiteManager
         Apache James         Maven Proxy              mapofmedicine
                          Exo
                     ECMS Platform               TYPO3
GX WebManager                                  v5.0 WCM
                                 InfoQ                 Hippo                      Liferay
            Nuxeo ECM Online Community                 CMS                   Enterprise Portal
                                             Jahia                   Sakai
    Percussion                            Framework               E-learning
    Rhythmix             QuickWCM                                          Sourcemix
                           WCMS                     Lutece                 Sourcemix
JCR - Weatherforecast
2009
       -5°   2010
                    -8°   2011
                                 -12°
JCR 2.0
http://www.day.com/jsr283
A node is a resource

GET /cars/audi/s4.txt



User-agent
Repository
A node is a resource

  POST /cars/audi/s48
                   write




User-agent                 Your content
Repository                  is your web
                               server
Web apps and Sling scripting

              /cars/audi/s4.details.html



User-agent
Repository
Web apps and Sling scripting

              /cars/audi/s4.details.html



User-agent
Repository
                                                       d
                                           1 file neede



                                       Convention ove
                                        configuration r
Web apps and Sling scripting

              /cars/audi/s4.details.html



User-agent
Repository
                                              .esp



                                             .erb


                                            .scala
Web apps and Sling scripting
URLsdo matter!


      /cars/audi/s4.details.html

                                  vs.

       /product.jsp?id=/audi/s4

                                        Passing in “this”
        Addressing the                   (the resource)
                       “ cript”
                       s
Bonus
Sling is OSGi-based
                                                  e
                                        (not just “ nabled”)

                         Apache Felix
                       OSGi container
extensible     my                              my
                            my
             bundles      bundles            scripts


               Sling        Sling           Sling


                            JCR
Sling is OSGi-based
                                                   e
                                         (not just “ nabled”)

                          Apache Felix
                        OSGi container
 extensible     my                              my
                             my
              bundles      bundles            scripts

 modular        Sling        Sling           Sling


                             JCR
hot deploy
S EE
DEMO

More Related Content

Viewers also liked

Zwei Notenbank-Bilanzen
Zwei Notenbank-BilanzenZwei Notenbank-Bilanzen
Zwei Notenbank-BilanzenGapa News
 
两只熊猫和一只蓝色的猫 Two Pandas and A Blue Cat
两只熊猫和一只蓝色的猫 Two Pandas and A Blue Cat 两只熊猫和一只蓝色的猫 Two Pandas and A Blue Cat
两只熊猫和一只蓝色的猫 Two Pandas and A Blue Cat
Ping Wu
 
EVOLVE'16 | Deploy | Abhishek Dwevedi | Introduction to AEM Assets
EVOLVE'16 | Deploy | Abhishek Dwevedi | Introduction to AEM AssetsEVOLVE'16 | Deploy | Abhishek Dwevedi | Introduction to AEM Assets
EVOLVE'16 | Deploy | Abhishek Dwevedi | Introduction to AEM Assets
Evolve The Adobe Digital Marketing Community
 
Lost on Journey Part 4 阿兰的作业
Lost on Journey Part 4 阿兰的作业Lost on Journey Part 4 阿兰的作业
Lost on Journey Part 4 阿兰的作业
Ping Wu
 
第三课 Lesson 3 D1 Pre-dting Monologue
第三课 Lesson 3 D1 Pre-dting Monologue第三课 Lesson 3 D1 Pre-dting Monologue
第三课 Lesson 3 D1 Pre-dting Monologue
Ping Wu
 
忙忙的派对 Mang Mang's Party
忙忙的派对 Mang Mang's Party 忙忙的派对 Mang Mang's Party
忙忙的派对 Mang Mang's Party
Ping Wu
 
2 Tongue Twisters Challenge
2 Tongue Twisters Challenge2 Tongue Twisters Challenge
2 Tongue Twisters Challenge
Ping Wu
 
Grupo de procesos
Grupo de procesosGrupo de procesos
Grupo de procesos
documentos
 
Acta de-constitución-del-proyecto-relatos-inesperados
Acta de-constitución-del-proyecto-relatos-inesperadosActa de-constitución-del-proyecto-relatos-inesperados
Acta de-constitución-del-proyecto-relatos-inesperados
documentos
 

Viewers also liked (10)

Página 8
Página 8Página 8
Página 8
 
Zwei Notenbank-Bilanzen
Zwei Notenbank-BilanzenZwei Notenbank-Bilanzen
Zwei Notenbank-Bilanzen
 
两只熊猫和一只蓝色的猫 Two Pandas and A Blue Cat
两只熊猫和一只蓝色的猫 Two Pandas and A Blue Cat 两只熊猫和一只蓝色的猫 Two Pandas and A Blue Cat
两只熊猫和一只蓝色的猫 Two Pandas and A Blue Cat
 
EVOLVE'16 | Deploy | Abhishek Dwevedi | Introduction to AEM Assets
EVOLVE'16 | Deploy | Abhishek Dwevedi | Introduction to AEM AssetsEVOLVE'16 | Deploy | Abhishek Dwevedi | Introduction to AEM Assets
EVOLVE'16 | Deploy | Abhishek Dwevedi | Introduction to AEM Assets
 
Lost on Journey Part 4 阿兰的作业
Lost on Journey Part 4 阿兰的作业Lost on Journey Part 4 阿兰的作业
Lost on Journey Part 4 阿兰的作业
 
第三课 Lesson 3 D1 Pre-dting Monologue
第三课 Lesson 3 D1 Pre-dting Monologue第三课 Lesson 3 D1 Pre-dting Monologue
第三课 Lesson 3 D1 Pre-dting Monologue
 
忙忙的派对 Mang Mang's Party
忙忙的派对 Mang Mang's Party 忙忙的派对 Mang Mang's Party
忙忙的派对 Mang Mang's Party
 
2 Tongue Twisters Challenge
2 Tongue Twisters Challenge2 Tongue Twisters Challenge
2 Tongue Twisters Challenge
 
Grupo de procesos
Grupo de procesosGrupo de procesos
Grupo de procesos
 
Acta de-constitución-del-proyecto-relatos-inesperados
Acta de-constitución-del-proyecto-relatos-inesperadosActa de-constitución-del-proyecto-relatos-inesperados
Acta de-constitución-del-proyecto-relatos-inesperados
 

Similar to Agile RESTful Web Development

Apex REST
Apex RESTApex REST
Apex REST
Boris Bachovski
 
An introduction to Struts 2 and RESTful applications
An introduction to Struts 2 and RESTful applicationsAn introduction to Struts 2 and RESTful applications
An introduction to Struts 2 and RESTful applications
mrdon
 
OpenTravel Advisory Forum 2012 REST XML Resources
OpenTravel Advisory Forum 2012 REST XML ResourcesOpenTravel Advisory Forum 2012 REST XML Resources
OpenTravel Advisory Forum 2012 REST XML Resources
OpenTravel Alliance
 
RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座
Li Yi
 
Design Summit - RESTful API Overview - John Hardy
Design Summit - RESTful API Overview - John HardyDesign Summit - RESTful API Overview - John Hardy
Design Summit - RESTful API Overview - John Hardy
ManageIQ
 
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy Clarkson
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy ClarksonMulti Client Development with Spring for SpringOne 2GX 2013 with Roy Clarkson
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy Clarkson
Joshua Long
 
Building Web Services with Zend Framework (PHP Benelux meeting 20100713 Vliss...
Building Web Services with Zend Framework (PHP Benelux meeting 20100713 Vliss...Building Web Services with Zend Framework (PHP Benelux meeting 20100713 Vliss...
Building Web Services with Zend Framework (PHP Benelux meeting 20100713 Vliss...
King Foo
 
RESTful for opentravel.org by HP
RESTful for opentravel.org by HPRESTful for opentravel.org by HP
RESTful for opentravel.org by HP
Roni Schuetz
 
REST with Eve and Python
REST with Eve and PythonREST with Eve and Python
REST with Eve and Python
PiXeL16
 
REST presentation
REST presentationREST presentation
REST presentation
Arnon Rotem-Gal-Oz
 
Building RESTful applications using Spring MVC
Building RESTful applications using Spring MVCBuilding RESTful applications using Spring MVC
Building RESTful applications using Spring MVC
IndicThreads
 
RESTful SCA with Apache Tuscany
RESTful SCA with Apache TuscanyRESTful SCA with Apache Tuscany
RESTful SCA with Apache Tuscany
Raymond Feng
 
RESTful API 제대로 만들기
RESTful API 제대로 만들기RESTful API 제대로 만들기
RESTful API 제대로 만들기
Juwon Kim
 
Ws rest
Ws restWs rest
Ws rest
patriknw
 
Doing REST Right
Doing REST RightDoing REST Right
Doing REST Right
Kerry Buckley
 
Server-side Technologies in Java
Server-side Technologies in JavaServer-side Technologies in Java
Server-side Technologies in Java
Anirban Majumdar
 
Why Integrate using an API? | MuleSoft
Why Integrate using an API? | MuleSoftWhy Integrate using an API? | MuleSoft
Why Integrate using an API? | MuleSoft
MuleSoft
 
Great APIs - Future of Your Progress App
Great APIs - Future of Your Progress AppGreat APIs - Future of Your Progress App
Great APIs - Future of Your Progress App
Gabriel Lucaciu
 
WebApp #3 : API
WebApp #3 : APIWebApp #3 : API
WebApp #3 : API
Jean Michel
 
REST Web Sebvice
REST Web SebviceREST Web Sebvice
REST Web Sebvice
khmerforge
 

Similar to Agile RESTful Web Development (20)

Apex REST
Apex RESTApex REST
Apex REST
 
An introduction to Struts 2 and RESTful applications
An introduction to Struts 2 and RESTful applicationsAn introduction to Struts 2 and RESTful applications
An introduction to Struts 2 and RESTful applications
 
OpenTravel Advisory Forum 2012 REST XML Resources
OpenTravel Advisory Forum 2012 REST XML ResourcesOpenTravel Advisory Forum 2012 REST XML Resources
OpenTravel Advisory Forum 2012 REST XML Resources
 
RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座
 
Design Summit - RESTful API Overview - John Hardy
Design Summit - RESTful API Overview - John HardyDesign Summit - RESTful API Overview - John Hardy
Design Summit - RESTful API Overview - John Hardy
 
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy Clarkson
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy ClarksonMulti Client Development with Spring for SpringOne 2GX 2013 with Roy Clarkson
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy Clarkson
 
Building Web Services with Zend Framework (PHP Benelux meeting 20100713 Vliss...
Building Web Services with Zend Framework (PHP Benelux meeting 20100713 Vliss...Building Web Services with Zend Framework (PHP Benelux meeting 20100713 Vliss...
Building Web Services with Zend Framework (PHP Benelux meeting 20100713 Vliss...
 
RESTful for opentravel.org by HP
RESTful for opentravel.org by HPRESTful for opentravel.org by HP
RESTful for opentravel.org by HP
 
REST with Eve and Python
REST with Eve and PythonREST with Eve and Python
REST with Eve and Python
 
REST presentation
REST presentationREST presentation
REST presentation
 
Building RESTful applications using Spring MVC
Building RESTful applications using Spring MVCBuilding RESTful applications using Spring MVC
Building RESTful applications using Spring MVC
 
RESTful SCA with Apache Tuscany
RESTful SCA with Apache TuscanyRESTful SCA with Apache Tuscany
RESTful SCA with Apache Tuscany
 
RESTful API 제대로 만들기
RESTful API 제대로 만들기RESTful API 제대로 만들기
RESTful API 제대로 만들기
 
Ws rest
Ws restWs rest
Ws rest
 
Doing REST Right
Doing REST RightDoing REST Right
Doing REST Right
 
Server-side Technologies in Java
Server-side Technologies in JavaServer-side Technologies in Java
Server-side Technologies in Java
 
Why Integrate using an API? | MuleSoft
Why Integrate using an API? | MuleSoftWhy Integrate using an API? | MuleSoft
Why Integrate using an API? | MuleSoft
 
Great APIs - Future of Your Progress App
Great APIs - Future of Your Progress AppGreat APIs - Future of Your Progress App
Great APIs - Future of Your Progress App
 
WebApp #3 : API
WebApp #3 : APIWebApp #3 : API
WebApp #3 : API
 
REST Web Sebvice
REST Web SebviceREST Web Sebvice
REST Web Sebvice
 

Recently uploaded

Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
LucaBarbaro3
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
Intelisync
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
GDSC PJATK
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
saastr
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
Pravash Chandra Das
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Hiike
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 

Recently uploaded (20)

Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 

Agile RESTful Web Development

  • 1. Agile RESTful Web Development Michael Marth Technology Evangelist Michael Dürig Senior Developer michael.marth@day.com michael.duerig@day.com
  • 2. Jugs - Agenda REST in 15 minutes Meet Apache Sling demo & code
  • 3. What is REST? A API B Technology C SOAP’s arch enemy D Architectural Style
  • 4. REST: An Architectural Style One of many Architectural Styles Architectural principles of the web, defined a posteriori Defined through architectural g constraints Roy T. Fieldin Chief Scien at Da tist Soft y ware
  • 5. Styles and implementation examples REST style peer to peer style the we b imp re le i s t h e le m v a n t o n l y ent Napster Tat io W R ES he n eb T of
  • 6. REST ingredients ly the Resources rough aints constr s thesis from Roy’ Representations of resources Uniform interface Hypertext and links Stateless communication
  • 7. Resources give all relevant things an ID don’t http://example.com/cars/models/320 have prett to be y Representations http://example.com/cars/models/320.html http://example.com/cars/models/320.json http:/ /example.com/cars/models/320.xml http://example.com/cars/models/320.jsp
  • 8. in a llows s to diarie hes, terme d (cac Uniform interface rstan es) unde roxi p retrieve information, possibly GET cached PUT Update or create with known ID POST Create or append sub-resource DELETE Logically remove
  • 9. in a llows s to diarie hes, terme d (cac Uniform interface rstan es) unde roxi p check out the URL retrieve/www.youtube.com/watch? http:/ information, possibly GET v=oHg5SJYRHA0 cached PUT Update or create with known ID with method “WATCH” POST Create or append sub-resource DELETE Logically remove
  • 10. Hypertext Link the “things” / the resources How? <link rel="some-concept" ref="/some-uri"> h a rdc o de d i n c l ie n t NOT h a rdc o de d i n c l ie n t Why?
  • 11. A special browser for each web site? e.g. a Wikipedia browser that hardcodes http:/ /en.wikipedia.org/wiki/{concept} wikipedia amazon jugs.ch blogs nzz admin.ch search.ch infoq facebook gma browser browser browser browser browser browser browser browser browser brows
  • 12. A REST API must not define fixed resource names or hierarchies (an obvious coupling of client and server). Servers must have the freedom to control their own namespace.
  • 13. If you need this it’s (probably) not REST
  • 14. Stateless communication state is kept on the client, no ser ver-side application state s c a la bil it y requests are self-contained r ie s i n te r me di a client server GET /customer/1234/orders <link rel=”...” ref=” /orders/123456789”></link> update soft ware reboot POST /orders/123456789
  • 15. RPC-style modelling vs. REST-style modelling /orders GET - list all orders m a ny ope rat io n s PUT - unused POST - add new order DELETE - unused fe w i ns t ance s at io n s /orders/{id} ope r GET - get order details fe w PUT - update order ance s OrderManagementService POST - add item ins t DELETE - cancel order m a ny + getOrders() + submitOrder() /orders/{id}/submit + getOrderDetails() GET - unused + getOrdersForCustomers() <<interface>> PUT - unused + updateOrder() Resource POST - submit order + addOrderItem() GET DELETE - unused + cancelOrder() PUT POST /customers DELETE GET - list all customers CustomerManagementService PUT - unused POST - add new customer + getCustomers() DELETE - unused + addCustomer() + getCustomerDetails() /customers/{id} + updateCustomer() GET - get customer details + deleteCustomer() PUT - update customer POST - unused DELETE - delete customer /customers/{id}/orders GET - get all orders for customer PUT - unused POST - add order DELETE - cancel all customer orders
  • 16. Why again? proven scalability proven to evolve proven cross-platform The Web Relevant for me?
  • 17. REST for the Enterprise?
  • 18. The Internet vs. The Enterprise One is a gigantic, uncontrollable anarchy of heterogeneous systems with varying quality that evolve independently and constantly get connected in new and unexpected ways. The other is a worldwide, publicly accessible series of interconnected computer networks that transmit data by packet switching using the standard Internet Protocol (IP). Stefan Tilkov - Pragmatic Introduction to REST
  • 19. Jugs - Agenda REST in 15 minutes Meet Apache Sling demo & code
  • 20. What’s Sling? “Apache Sling is a RESTful web framework that uses a Java Content Repository to store and manage content.”just g radu ate d in Apache incubator
  • 21. What’s JCR? “The API should be a standard, implementation independent, way to access content bi-directionally on a granular level within a content repository.” ?
  • 22. Best of both worlds. data base f il es ys te m hier- archi integ rity re es structu read streams tx write access query locking control multi- value ning obser- versio un-structured “full-text” sort vation order content repo sit or y
  • 23. “Data First!” “s ch e m a le s s” ak a JCR s “stru upports cturef irst” a (but t ha well. s t’s m issing the p oint)
  • 24. Known compliant Repositories * using third party connector * * Exo Microsoft Apache Jackrabbit Oracle XML DB ECMS Platform Sharepoint OpenText Livelink * Day CRX IBM FileNet P8 Xythos Repository Alfresco ECM Vignette V7 * * any ors ow mvend ? H S ed Interwoven +hund DBMou ne R do y r s Repository IBM CM EMC Documentum regiede of TCKs st
  • 25. Some known JCR Applications Fast BEA Portal Sun Oracle Portal Enterprise Search JBoss Portal Interface 21 OpenPortal Day Communique Spring Framework magnolia WCMS DAM Apache Sling Day Communique Alfresco ECMS Mindquarry Collab Collaboration Apache Tapestry QSLabs Apache Compliance Day Communiqué Cocoon WCMS IBM FileNet Artifactory medic-2-medic WebSiteManager Apache James Maven Proxy mapofmedicine Exo ECMS Platform TYPO3 GX WebManager v5.0 WCM InfoQ Hippo Liferay Nuxeo ECM Online Community CMS Enterprise Portal Jahia Sakai Percussion Framework E-learning Rhythmix QuickWCM Sourcemix WCMS Lutece Sourcemix
  • 26. Some known JCR Applications Fast BEA Portal Sun Oracle Portal Enterprise Search JBoss Portal Interface 21 OpenPortal Day Communique Spring Framework magnolia WCMS DAM Apache Sling Day Communique Alfresco ECMS Mindquarry Collab Collaboration Apache Tapestry QSLabs Apache Compliance Day Communiqué Cocoon WCMS IBM FileNet Artifactory medic-2-medic WebSiteManager Apache James Maven Proxy mapofmedicine Exo ECMS Platform TYPO3 GX WebManager v5.0 WCM InfoQ Hippo Liferay Nuxeo ECM Online Community CMS Enterprise Portal Jahia Sakai Percussion Framework E-learning Rhythmix QuickWCM Sourcemix WCMS Lutece Sourcemix
  • 27. JCR - Weatherforecast 2009 -5° 2010 -8° 2011 -12°
  • 29. A node is a resource GET /cars/audi/s4.txt User-agent Repository
  • 30. A node is a resource POST /cars/audi/s48 write User-agent Your content Repository is your web server
  • 31. Web apps and Sling scripting /cars/audi/s4.details.html User-agent Repository
  • 32. Web apps and Sling scripting /cars/audi/s4.details.html User-agent Repository d 1 file neede Convention ove configuration r
  • 33. Web apps and Sling scripting /cars/audi/s4.details.html User-agent Repository .esp .erb .scala
  • 34. Web apps and Sling scripting URLsdo matter! /cars/audi/s4.details.html vs. /product.jsp?id=/audi/s4 Passing in “this” Addressing the (the resource) “ cript” s
  • 35. Bonus
  • 36. Sling is OSGi-based e (not just “ nabled”) Apache Felix OSGi container extensible my my my bundles bundles scripts Sling Sling Sling JCR
  • 37. Sling is OSGi-based e (not just “ nabled”) Apache Felix OSGi container extensible my my my bundles bundles scripts modular Sling Sling Sling JCR hot deploy
  • 38. S EE
  • 39. DEMO