SlideShare uma empresa Scribd logo
1 de 95
Baixar para ler offline
Launching
content in
mobility with
REST &
    eZ Publish
Launching
content in
mobility with
REST &
    eZ Publish
       Nicolas Pastorino - nfrp@ez.no
       Director Community - eZ Systems
       @jeanvoye - http://share.ez.no
#dpc11

         Launching
         content in
         mobility with
          Mobile
         REST &
           Dutch PHP Conference 2011 - Amsterdam - May 21st


             eZ Publish
                                 Nicolas Pastorino - nfrp@ez.no
                                 Director Community - eZ Systems
                                 @jeanvoye - http://share.ez.no
#dpc11

         Launching
         content in
         mobility with
          Mobile
         REST &
           Dutch PHP Conference 2011 - Amsterdam - May 21st


             eZ Publish
                                 Nicolas Pastorino - nfrp@ez.no
                                 Director Community - eZ Systems
                                 @jeanvoye - http://share.ez.no
Our agenda :
Our agenda :




Multichannel : why ?
Our agenda :




Multichannel : why ?
       REST
Our agenda :




Multichannel : why ?
       REST
Extensible REST API
Our agenda :




Multichannel : why ?
       REST
Extensible REST API
       Demo
Multichannel : why ?



                       3
How would you
feel playing
Pacman on a
single, straight line
of dots ?
How would you
feel playing
Pacman on a
single, straight line
of dots ?
How would you
feel playing
       Boring,
Pacman on a
       right ? line
single, straight
of dots ?
Multichannel
content
distribution is
the real Pacman
Multichannel
content
distribution is
the real Pacman
Pre-requisites to multichannel distribution




Nicolas Pastorino - DPC11   21/05/2011        7
Pre-requisites to multichannel distribution

Separation of layout
and content at the   1
content source level




 Nicolas Pastorino - DPC11   21/05/2011        7
Pre-requisites to multichannel distribution

Separation of layout
and content at the   1
content source level




 Nicolas Pastorino - DPC11   21/05/2011        7
Pre-requisites to multichannel distribution

Separation of layout
and content at the   1
content source level




Do not compromise on
user experience    2




 Nicolas Pastorino - DPC11   21/05/2011        7
Pre-requisites to multichannel distribution

Separation of layout
and content at the   1
content source level



                             “The Superman Effect”   Aral Balkan, DPC11
Do not compromise on
user experience    2




 Nicolas Pastorino - DPC11       21/05/2011                               7
Pre-requisites to multichannel distribution

Separation of layout
and content at the   1
content source level



                             “The Superman Effect”     Aral Balkan, DPC11
Do not compromise on
user experience    2
                             “There is a lot of effort going into improving
                             customer experience. It is key to get
                             consistency across different channels so their
                             experience does not vary”              Jim Daviesni




 Nicolas Pastorino - DPC11        21/05/2011                                       7
Pre-requisites to multichannel distribution

Separation of layout
and content at the   1
content source level



                             “The Superman Effect”     Aral Balkan, DPC11
Do not compromise on
user experience    2
                             “There is a lot of effort going into improving
                             customer experience. It is key to get
                             consistency across different channels so their
Have a single source         experience does not vary”              Jim Daviesni
of content           3




 Nicolas Pastorino - DPC11        21/05/2011                                       7
Pre-requisites to multichannel distribution

Separation of layout
and content at the   1
content source level



                             “The Superman Effect”     Aral Balkan, DPC11
Do not compromise on
user experience    2
                             “There is a lot of effort going into improving
                             customer experience. It is key to get
                             consistency across different channels so their
Have a single source         experience does not vary”              Jim Daviesni
of content           3
                             “Publishers usually can't afford a dedicated
                             editorial team per channel”

 Nicolas Pastorino - DPC11        21/05/2011                                       7
Ready to
   tackle
     your
channels
    yet ?
Ready to
   tackle
     your
channels
    yet ?

            We’re hardly
            off the
            ground. Let’s
            dig further...
Single
Content
Source    /   CMS
Single
Content
Source    /   CMS
Monetized
                    Content
                    Streams



Single
Content
Source    /   CMS
Monetized
                    Content
                    Streams
                    Mobile
                    Applications
Single

          /
                    Smartphones, Tablets

Content
Source
              CMS
Monetized
                    Content
                    Streams
                    Mobile
                    Applications
Single

          /
                    Smartphones, Tablets

Content
Source
              CMS   Push 3rd party
                         CRM, ERP
                    Content
                    Newsletters
Monetized
                    Content
                    Streams
                    Mobile
                    Applications
Single

          /
                    Smartphones, Tablets

Content
Source
              CMS   Push 3rd party
                         CRM, ERP
                    Content
                    Newsletters


                    Print
                    Legacy publication chains
Monetized
                    Content
                    Streams
                    Mobile
                    Applications
Single

          /
                    Smartphones, Tablets

Content
Source
              CMS   Push 3rd party
                         CRM, ERP
                    Content
                    Newsletters


                    Print
                    Legacy publication chains


                    Social Media
"Multichannel media consumers have higher levels
of engagement than those present in only one
channel.

The more one watches TV, listens to the radio,
spends time online, etc., the more advertising they
consume.

This shows that multichannel content
distribution will also have an important impact
on the publishers revenue structure. It will
evolve to become a competitive, critical, enabling
technology for marketing communications."
Having a
 REST ?
   :)
Having a
 REST ?
   :)

              A touch
              more of
           insight will
                help...
“Media companies as well as consumer brands must
recognize that adding mobile to the multichannel mix
does not mean creating a mini-channel. Those
building mobile strategies should recognize that:

  • Mobile is not just about shrinking the
  desktop experience,

  • The user environment is an element of the
  mobile experience,

  • Mobile users are not simply a subset of
  online users – some are new.”
Least
  Common
Denominator :
Least
  Common
Denominator :
a REST API
Those
were the
basics to
increase
     your
 REACH
 through
 multiple
channels
Those
were the
basics to
increase
     your
 REACH
 through
 multiple
channels    Right
            Chris ?
REST


       15
REpresentational
State
Transfer
REpresentational
State
Transfer
REST is a set of principles that define how Web standards, such as
HTTP and URIs, are supposed to be used.

•   Give every “thing” an ID
•   Link things together
•   Use standard methods
•   Resources with multiple representations
•   Communicate statelessly
REpresentational
State
Transfer
REST is a set of principles that define how Web standards, such as
HTTP and URIs, are supposed to be used.

•   Give every “thing” an ID
•   Link things together
•   Use standard methods
•   Resources with multiple representations
•   Communicate statelessly

                                   h"p://www.infoq.com/ar4cles/rest-­‐introduc4on
                                   h"p://en.wikipedia.org/wiki/Representa4onal_State_Transfer
REpresentational
State
Transfer




                   h"p://www.infoq.com/ar4cles/rest-­‐introduc4on
                   h"p://en.wikipedia.org/wiki/Representa4onal_State_Transfer
REpresentational
State
Transfer
Key goals of REST include:

• Scalability of component interactions
• Generality of interfaces
• Independent deployment of components
• Intermediary components to reduce latency, enforce security and
encapsulate legacy systems


                                 h"p://www.infoq.com/ar4cles/rest-­‐introduc4on
                                 h"p://en.wikipedia.org/wiki/Representa4onal_State_Transfer
Extensible REST API
at the core of the eZ Publish CMS




                                    18
At the core of the eZ Publish CMS
Extensible REST API




    REST                    as a core feature


Nicolas Pastorino - DPC11        21.05.2011     19
At the core of the eZ Publish CMS
Extensible REST API




Dedicated front-controller


Nicolas Pastorino - DPC11   21.05.2011   20
At the core of the eZ Publish CMS
Extensible REST API



                                                              REST   setup

                                            REST
                                                                             eZP
                        REST	
  request
                                            FC



                            eZ	
  Publish
                            web-­‐request

Nicolas Pastorino - DPC11                        21.05.2011                        21
At the core of the eZ Publish CMS
Extensible REST API



                                                              REST   setup

                                            REST
                                                                             eZP
                        REST	
  request
                                            FC



                            eZ	
  Publish
                            web-­‐request

Nicolas Pastorino - DPC11                        21.05.2011                        21
At the core of the eZ Publish CMS
Extensible REST API




                    Mapping content into
                        resources


Nicolas Pastorino - DPC11    21.05.2011    22
At the core of the eZ Publish CMS
Extensible REST API




                     Makes data available



Nicolas Pastorino - DPC11     21.05.2011    23
At the core of the eZ Publish CMS
Extensible REST API




                      Makes data reusable



Nicolas Pastorino - DPC11      21.05.2011   23
At the core of the eZ Publish CMS
Extensible REST API




                   Content is essentially
                        liberated


Nicolas Pastorino - DPC11    21.05.2011     24
At the core of the eZ Publish CMS
Extensible REST API




                            URI pattern


Nicolas Pastorino - DPC11        21.05.2011   25
At the core of the eZ Publish CMS
Extensible REST API


                                       Just a token to trigger your rewrite rule




                                                                                          Call +
     GET                    Host   /     Prefix       /    Provider    /    Version   /   params



                                            ezpRestPrefixFilterInterface




Nicolas Pastorino - DPC11                                21.05.2011                                26
At the core of the eZ Publish CMS
Extensible REST API


                            Just a token to trigger your rewrite rule




                              Prefix           Provider          Version




                                 ezpRestPrefixFilterInterface




Nicolas Pastorino - DPC11                    21.05.2011                   26
At the core of the eZ Publish CMS
Extensible REST API


  Prefix                     Just a token to trigger your rewrite rule




                                              Provider          Version




                                 ezpRestPrefixFilterInterface




Nicolas Pastorino - DPC11                    21.05.2011                   26
At the core of the eZ Publish CMS
Extensible REST API


  Prefix                     Just a token to trigger your rewrite rule




Provider                                                        Version




                                 ezpRestPrefixFilterInterface




Nicolas Pastorino - DPC11                    21.05.2011                   26
At the core of the eZ Publish CMS
Extensible REST API


  Prefix                     Just a token to trigger your rewrite rule




Provider




                                 ezpRestPrefixFilterInterface




Version

Nicolas Pastorino - DPC11                    21.05.2011                 26
At the core of the eZ Publish CMS
Extensible REST API


  Prefix                     Just a token to trigger your rewrite rule




Provider




                                 ezpRestPrefixFilterInterface




Version

Nicolas Pastorino - DPC11                    21.05.2011                 26
At the core of the eZ Publish CMS
Extensible REST API


  Prefix                     Just a token to trigger your rewrite rule




Provider




                                 ezpRestPrefixFilterInterface




Version

Nicolas Pastorino - DPC11                    21.05.2011                 26
Prefix filter




ezpRestPrefixFilterInterface
Current provider

Current parsed version value




Nicolas Pastorino - DPC11      21.05.2011   27
Versioned API


class ezpRestRouter extends ezcMvcRouter
{
    public function createRoutes()
    {
        // ezpRestApiProvider
        $routes = array(
            new ezcMvcRailsRoute( '/content/node/:nodeId/listAtom', 'ezpRestAtomController', 'collection' ),
            new ezcMvcRailsRoute( '/content/node/:nodeId/list', 'ezpRestContentController', 'list' ),
            new ezcMvcRailsRoute( '/content/node/:nodeId', 'ezpRestContentController', 'viewContent' ),
            new ezcMvcRailsRoute( '/content/node/:nodeId/fields', 'ezpRestContentController',
                                                                                       'viewFields' ),
            new ezcMvcRailsRoute( '/content/node/:nodeId/field/:fieldIdentifier',
                                                            'ezpRestContentController', 'viewField' ),
            new ezcMvcRailsRoute( '/content/object/:objectId', 'ezpRestContentController', 'viewContent' ),
            new ezcMvcRailsRoute( '/content/object/:objectId/fields', 'ezpRestContentController',
                                                                                       'viewFields' ),
            new ezcMvcRailsRoute( '/content/object/:objectId/field/:fieldIdentifier',
                                                                 'ezpRestContentController', 'viewField' ),

                new ezpRestVersionedRoute( new ezcMvcRailsRoute( '/foo', 'myController', 'myActionOne' ), 1 ),
                new ezpRestVersionedRoute( new ezcMvcRailsRoute( 'e/foo',
                                                        'myController2 or myControlerWhichExtendsmyController',
                                                                            'myBetterAndScalingAction' ), 2 ),
          );
          return ezcMvcRouter::prefix( '/api', $routes );
    }
}   Nicolas Pastorino - DPC11                            21.05.2011                                         28
Versioned API




ezpRestVersionedRoute
                            Version




  makes the notion version a
  part of the routing decision
Nicolas Pastorino - DPC11      21.05.2011   29
At the core of the eZ Publish CMS
Extensible REST API




 Extending the interface


Nicolas Pastorino - DPC11   21.05.2011   30
Extending the interface




                            REST providers




Nicolas Pastorino - DPC11         21.05.2011   31
Extending the interface




ezpRestProviderInterface


Nicolas Pastorino - DPC11   21.05.2011   32
Overview of hooks


Nicolas Pastorino - DPC11   21.05.2011   33
Nicolas Pastorino - DPC11   21.05.2011   34
Route setup - Example
class ezpRestRouter extends ezcMvcRouter
{
    public function createRoutes()
    {
        $providerRoutes = ezpRestProvider::getProvider
( ezpRestPrefixFilterInterface::getApiProviderName() )->getRoutes();

           $routes       = array(
               new       ezpMvcRailsRoute(   '/fatal', 'ezpRestErrorController', 'show' ),
               new       ezpMvcRailsRoute(   '/http-basic-auth', 'ezpRestAuthController', 'basicAuth' ),
               new       ezpMvcRailsRoute(   '/login/oauth', 'ezpRestAuthController', 'oauthRequired' ),
               new       ezpMvcRailsRoute(   '/oauth/token', 'ezpRestOauthTokenController', 'handleRequest'),

            // ezpRestVersionedRoute( $route, $version )
            // $version == 1 should be the same as if the only the $route had been present
            new ezpRestVersionedRoute( new ezpMvcRailsRoute( '/foo', 'myController',
'myActionOne' ), 1 ),
            new ezpRestVersionedRoute( new ezpMvcRailsRoute( '/foo', 'myController',
'myActionOneBetter' ), 2 ),

           );

           return ezcMvcRouter::prefix( '/api', array_merge( $providerRoutes, $routes ) );
     }
}

    Nicolas Pastorino - DPC11                               21.05.2011                                     35
Extensible REST API
Key features




                      36
Key features
Extensible REST API




                 Content resources


Nicolas Pastorino - DPC11   21.05.2011   37
Key features




GET /[api]/v1/content/object/
 <objectId>/fields HTTP/1.1




Nicolas Pastorino - DPC11   21.05.2011   38
Key features


fields/<fieldname>

        type (datatype string)

        identifier (attribute identifier)

        value (string representation of data)

        id (object attribute numerical ID)

        classattribute_id (class attribute numerical ID)




Nicolas Pastorino - DPC11                    21.05.2011    39
Key features




   GET /[api]/v1/content/object/
         <objectId>/field/
    <FieldIdentifier> HTTP/1.1




Nicolas Pastorino - DPC11   21.05.2011   40
Demo
Web + Android, eZ Publish powered




                                    41
Famous Last Slides




                     42
RECAP




Multichannel : why ?
       REST
Extensible REST API
       Demo
You won’t ever
play Pacman
the same way
again :)
You won’t ever
play Pacman
the same way
again :)
You won’t ever
play Pacman
the same way
again :)
Find me on Twitter : @jeanvoye

Rate this talk : http://joind.in/talk/view/3255,
Slides available soon at http://slideshare.net/jeanvoye

eZ Conference, June 16th&17th, London :
     Rasmus Lerdorf,
     Derick Rethans,
                                                            Thank you !
     Tobias Schlitt
  Get a 20% off coupon at the eZ Booth in the hall, and register :
     http://london2011.ez.no

eZ Community
http://share.ez.no

eZ Publish Community Project
http://share.ez.no/download & http://share.ez.no/get-involved

eZ Systems & eZ Publish Enterprise Edition
http://ez.no

Mais conteúdo relacionado

Destaque

'Meet the investor' workshop @ Startup Week 2011
'Meet the investor' workshop @ Startup Week 2011'Meet the investor' workshop @ Startup Week 2011
'Meet the investor' workshop @ Startup Week 2011
STARTeurope
 

Destaque (11)

Nicolas Pastorino - eZ Community - Innovation and Open-source inside
Nicolas Pastorino - eZ Community - Innovation and Open-source insideNicolas Pastorino - eZ Community - Innovation and Open-source inside
Nicolas Pastorino - eZ Community - Innovation and Open-source inside
 
Sell Twice As Much Sd Version
Sell Twice As Much Sd VersionSell Twice As Much Sd Version
Sell Twice As Much Sd Version
 
A REST Layer on Top of the World - IPC13 Munich
A REST Layer on Top of the World - IPC13 MunichA REST Layer on Top of the World - IPC13 Munich
A REST Layer on Top of the World - IPC13 Munich
 
Symfony and eZ Publish: boarding now!
Symfony and eZ Publish: boarding now!Symfony and eZ Publish: boarding now!
Symfony and eZ Publish: boarding now!
 
2013.04.12 Symfony et eZ Publish, embarquement immédiat - AFUP Lyon Conference
2013.04.12 Symfony et eZ Publish, embarquement immédiat - AFUP Lyon Conference2013.04.12 Symfony et eZ Publish, embarquement immédiat - AFUP Lyon Conference
2013.04.12 Symfony et eZ Publish, embarquement immédiat - AFUP Lyon Conference
 
What's up for 2012 and 'Commun-engineering'
What's up for 2012 and 'Commun-engineering'What's up for 2012 and 'Commun-engineering'
What's up for 2012 and 'Commun-engineering'
 
Mini sandwich clasicos la haut
Mini sandwich clasicos la hautMini sandwich clasicos la haut
Mini sandwich clasicos la haut
 
Nicolas Pastorino - The Open-source roar in the eZ Community
Nicolas Pastorino - The Open-source roar in the eZ CommunityNicolas Pastorino - The Open-source roar in the eZ Community
Nicolas Pastorino - The Open-source roar in the eZ Community
 
'Meet the investor' workshop @ Startup Week 2011
'Meet the investor' workshop @ Startup Week 2011'Meet the investor' workshop @ Startup Week 2011
'Meet the investor' workshop @ Startup Week 2011
 
Nicolas Pastorino - Launching Content in mobility with REST and eZ Publish
Nicolas Pastorino - Launching Content in mobility with REST and eZ PublishNicolas Pastorino - Launching Content in mobility with REST and eZ Publish
Nicolas Pastorino - Launching Content in mobility with REST and eZ Publish
 
Tutorial STARTup Live Pitch
Tutorial STARTup Live PitchTutorial STARTup Live Pitch
Tutorial STARTup Live Pitch
 

Semelhante a Nicolas Pastorino - Launching content in mobility with REST & eZ Publish

John Newton DevCon 2011 London Keynote
John Newton DevCon 2011 London KeynoteJohn Newton DevCon 2011 London Keynote
John Newton DevCon 2011 London Keynote
Alfresco Software
 
SOA an architecture on the Desktop
SOA an architecture on the DesktopSOA an architecture on the Desktop
SOA an architecture on the Desktop
Vincent Perrin
 

Semelhante a Nicolas Pastorino - Launching content in mobility with REST & eZ Publish (20)

Xmanager (Service Delivery Platform)
Xmanager (Service Delivery Platform)Xmanager (Service Delivery Platform)
Xmanager (Service Delivery Platform)
 
Rosinski ibm ai overview with several examples of projects in the media and l...
Rosinski ibm ai overview with several examples of projects in the media and l...Rosinski ibm ai overview with several examples of projects in the media and l...
Rosinski ibm ai overview with several examples of projects in the media and l...
 
Real World WEM Solutions Using Alfresco and Crafter Rivet
Real World WEM Solutions Using Alfresco and Crafter RivetReal World WEM Solutions Using Alfresco and Crafter Rivet
Real World WEM Solutions Using Alfresco and Crafter Rivet
 
Introduction to (web) APIs - definitions, examples, concepts and trends
Introduction to (web) APIs - definitions, examples, concepts and trendsIntroduction to (web) APIs - definitions, examples, concepts and trends
Introduction to (web) APIs - definitions, examples, concepts and trends
 
John Newton DevCon 2011 London Keynote
John Newton DevCon 2011 London KeynoteJohn Newton DevCon 2011 London Keynote
John Newton DevCon 2011 London Keynote
 
Why stop Open Source in the Enterprise?
Why stop Open Source in the Enterprise?Why stop Open Source in the Enterprise?
Why stop Open Source in the Enterprise?
 
Jarkko Moilanen, APInf, “Get Control of Your IoT Cruisers” - Mindtrek 2017
Jarkko Moilanen, APInf, “Get Control of Your IoT Cruisers” - Mindtrek 2017Jarkko Moilanen, APInf, “Get Control of Your IoT Cruisers” - Mindtrek 2017
Jarkko Moilanen, APInf, “Get Control of Your IoT Cruisers” - Mindtrek 2017
 
The Get Satisfaction Product Roadmap
The Get Satisfaction Product RoadmapThe Get Satisfaction Product Roadmap
The Get Satisfaction Product Roadmap
 
Evolve 19 | Amol Anand & Daniel Gordon | Author in AEM Once - Deliver Everywhere
Evolve 19 | Amol Anand & Daniel Gordon | Author in AEM Once - Deliver EverywhereEvolve 19 | Amol Anand & Daniel Gordon | Author in AEM Once - Deliver Everywhere
Evolve 19 | Amol Anand & Daniel Gordon | Author in AEM Once - Deliver Everywhere
 
SOA an architecture on the Desktop
SOA an architecture on the DesktopSOA an architecture on the Desktop
SOA an architecture on the Desktop
 
Spagic3 Presentation En
Spagic3 Presentation EnSpagic3 Presentation En
Spagic3 Presentation En
 
Webinar: Spagic Universal Middleware
Webinar: Spagic Universal MiddlewareWebinar: Spagic Universal Middleware
Webinar: Spagic Universal Middleware
 
Kristiaan De Roeck at UX Antwerp Meetup - 30 January 2018
Kristiaan De Roeck at UX Antwerp Meetup - 30 January 2018Kristiaan De Roeck at UX Antwerp Meetup - 30 January 2018
Kristiaan De Roeck at UX Antwerp Meetup - 30 January 2018
 
Mobile alternative opacs_computers in libraries 2010
Mobile alternative opacs_computers in libraries 2010Mobile alternative opacs_computers in libraries 2010
Mobile alternative opacs_computers in libraries 2010
 
Os Pittaro
Os PittaroOs Pittaro
Os Pittaro
 
eZ Product Vision Keynote
eZ Product Vision KeynoteeZ Product Vision Keynote
eZ Product Vision Keynote
 
The Why and How of Applications with APIs and microservices
The Why and How of Applications with APIs and microservicesThe Why and How of Applications with APIs and microservices
The Why and How of Applications with APIs and microservices
 
Spagic3 Presentation En
Spagic3 Presentation EnSpagic3 Presentation En
Spagic3 Presentation En
 
Why apis
Why apisWhy apis
Why apis
 
Fall2010 producer summit_openpbs_final
Fall2010 producer summit_openpbs_finalFall2010 producer summit_openpbs_final
Fall2010 producer summit_openpbs_final
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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...
 
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
 
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 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 

Nicolas Pastorino - Launching content in mobility with REST & eZ Publish

  • 2. Launching content in mobility with REST & eZ Publish Nicolas Pastorino - nfrp@ez.no Director Community - eZ Systems @jeanvoye - http://share.ez.no
  • 3. #dpc11 Launching content in mobility with Mobile REST & Dutch PHP Conference 2011 - Amsterdam - May 21st eZ Publish Nicolas Pastorino - nfrp@ez.no Director Community - eZ Systems @jeanvoye - http://share.ez.no
  • 4. #dpc11 Launching content in mobility with Mobile REST & Dutch PHP Conference 2011 - Amsterdam - May 21st eZ Publish Nicolas Pastorino - nfrp@ez.no Director Community - eZ Systems @jeanvoye - http://share.ez.no
  • 8. Our agenda : Multichannel : why ? REST Extensible REST API
  • 9. Our agenda : Multichannel : why ? REST Extensible REST API Demo
  • 11.
  • 12. How would you feel playing Pacman on a single, straight line of dots ?
  • 13. How would you feel playing Pacman on a single, straight line of dots ?
  • 14. How would you feel playing Boring, Pacman on a right ? line single, straight of dots ?
  • 15.
  • 18.
  • 19. Pre-requisites to multichannel distribution Nicolas Pastorino - DPC11 21/05/2011 7
  • 20. Pre-requisites to multichannel distribution Separation of layout and content at the 1 content source level Nicolas Pastorino - DPC11 21/05/2011 7
  • 21. Pre-requisites to multichannel distribution Separation of layout and content at the 1 content source level Nicolas Pastorino - DPC11 21/05/2011 7
  • 22. Pre-requisites to multichannel distribution Separation of layout and content at the 1 content source level Do not compromise on user experience 2 Nicolas Pastorino - DPC11 21/05/2011 7
  • 23. Pre-requisites to multichannel distribution Separation of layout and content at the 1 content source level “The Superman Effect” Aral Balkan, DPC11 Do not compromise on user experience 2 Nicolas Pastorino - DPC11 21/05/2011 7
  • 24. Pre-requisites to multichannel distribution Separation of layout and content at the 1 content source level “The Superman Effect” Aral Balkan, DPC11 Do not compromise on user experience 2 “There is a lot of effort going into improving customer experience. It is key to get consistency across different channels so their experience does not vary” Jim Daviesni Nicolas Pastorino - DPC11 21/05/2011 7
  • 25. Pre-requisites to multichannel distribution Separation of layout and content at the 1 content source level “The Superman Effect” Aral Balkan, DPC11 Do not compromise on user experience 2 “There is a lot of effort going into improving customer experience. It is key to get consistency across different channels so their Have a single source experience does not vary” Jim Daviesni of content 3 Nicolas Pastorino - DPC11 21/05/2011 7
  • 26. Pre-requisites to multichannel distribution Separation of layout and content at the 1 content source level “The Superman Effect” Aral Balkan, DPC11 Do not compromise on user experience 2 “There is a lot of effort going into improving customer experience. It is key to get consistency across different channels so their Have a single source experience does not vary” Jim Daviesni of content 3 “Publishers usually can't afford a dedicated editorial team per channel” Nicolas Pastorino - DPC11 21/05/2011 7
  • 27.
  • 28. Ready to tackle your channels yet ?
  • 29. Ready to tackle your channels yet ? We’re hardly off the ground. Let’s dig further...
  • 32. Monetized Content Streams Single Content Source / CMS
  • 33. Monetized Content Streams Mobile Applications Single / Smartphones, Tablets Content Source CMS
  • 34. Monetized Content Streams Mobile Applications Single / Smartphones, Tablets Content Source CMS Push 3rd party CRM, ERP Content Newsletters
  • 35. Monetized Content Streams Mobile Applications Single / Smartphones, Tablets Content Source CMS Push 3rd party CRM, ERP Content Newsletters Print Legacy publication chains
  • 36. Monetized Content Streams Mobile Applications Single / Smartphones, Tablets Content Source CMS Push 3rd party CRM, ERP Content Newsletters Print Legacy publication chains Social Media
  • 37.
  • 38. "Multichannel media consumers have higher levels of engagement than those present in only one channel. The more one watches TV, listens to the radio, spends time online, etc., the more advertising they consume. This shows that multichannel content distribution will also have an important impact on the publishers revenue structure. It will evolve to become a competitive, critical, enabling technology for marketing communications."
  • 39.
  • 41. Having a REST ? :) A touch more of insight will help...
  • 42.
  • 43. “Media companies as well as consumer brands must recognize that adding mobile to the multichannel mix does not mean creating a mini-channel. Those building mobile strategies should recognize that: • Mobile is not just about shrinking the desktop experience, • The user environment is an element of the mobile experience, • Mobile users are not simply a subset of online users – some are new.”
  • 44.
  • 46. Least Common Denominator : a REST API
  • 47.
  • 48.
  • 49. Those were the basics to increase your REACH through multiple channels
  • 50. Those were the basics to increase your REACH through multiple channels Right Chris ?
  • 51. REST 15
  • 53. REpresentational State Transfer REST is a set of principles that define how Web standards, such as HTTP and URIs, are supposed to be used. • Give every “thing” an ID • Link things together • Use standard methods • Resources with multiple representations • Communicate statelessly
  • 54. REpresentational State Transfer REST is a set of principles that define how Web standards, such as HTTP and URIs, are supposed to be used. • Give every “thing” an ID • Link things together • Use standard methods • Resources with multiple representations • Communicate statelessly h"p://www.infoq.com/ar4cles/rest-­‐introduc4on h"p://en.wikipedia.org/wiki/Representa4onal_State_Transfer
  • 55. REpresentational State Transfer h"p://www.infoq.com/ar4cles/rest-­‐introduc4on h"p://en.wikipedia.org/wiki/Representa4onal_State_Transfer
  • 56. REpresentational State Transfer Key goals of REST include: • Scalability of component interactions • Generality of interfaces • Independent deployment of components • Intermediary components to reduce latency, enforce security and encapsulate legacy systems h"p://www.infoq.com/ar4cles/rest-­‐introduc4on h"p://en.wikipedia.org/wiki/Representa4onal_State_Transfer
  • 57. Extensible REST API at the core of the eZ Publish CMS 18
  • 58. At the core of the eZ Publish CMS Extensible REST API REST as a core feature Nicolas Pastorino - DPC11 21.05.2011 19
  • 59. At the core of the eZ Publish CMS Extensible REST API Dedicated front-controller Nicolas Pastorino - DPC11 21.05.2011 20
  • 60. At the core of the eZ Publish CMS Extensible REST API REST setup REST eZP REST  request FC eZ  Publish web-­‐request Nicolas Pastorino - DPC11 21.05.2011 21
  • 61. At the core of the eZ Publish CMS Extensible REST API REST setup REST eZP REST  request FC eZ  Publish web-­‐request Nicolas Pastorino - DPC11 21.05.2011 21
  • 62. At the core of the eZ Publish CMS Extensible REST API Mapping content into resources Nicolas Pastorino - DPC11 21.05.2011 22
  • 63. At the core of the eZ Publish CMS Extensible REST API Makes data available Nicolas Pastorino - DPC11 21.05.2011 23
  • 64. At the core of the eZ Publish CMS Extensible REST API Makes data reusable Nicolas Pastorino - DPC11 21.05.2011 23
  • 65. At the core of the eZ Publish CMS Extensible REST API Content is essentially liberated Nicolas Pastorino - DPC11 21.05.2011 24
  • 66. At the core of the eZ Publish CMS Extensible REST API URI pattern Nicolas Pastorino - DPC11 21.05.2011 25
  • 67. At the core of the eZ Publish CMS Extensible REST API Just a token to trigger your rewrite rule Call + GET Host / Prefix / Provider / Version / params ezpRestPrefixFilterInterface Nicolas Pastorino - DPC11 21.05.2011 26
  • 68. At the core of the eZ Publish CMS Extensible REST API Just a token to trigger your rewrite rule Prefix Provider Version ezpRestPrefixFilterInterface Nicolas Pastorino - DPC11 21.05.2011 26
  • 69. At the core of the eZ Publish CMS Extensible REST API Prefix Just a token to trigger your rewrite rule Provider Version ezpRestPrefixFilterInterface Nicolas Pastorino - DPC11 21.05.2011 26
  • 70. At the core of the eZ Publish CMS Extensible REST API Prefix Just a token to trigger your rewrite rule Provider Version ezpRestPrefixFilterInterface Nicolas Pastorino - DPC11 21.05.2011 26
  • 71. At the core of the eZ Publish CMS Extensible REST API Prefix Just a token to trigger your rewrite rule Provider ezpRestPrefixFilterInterface Version Nicolas Pastorino - DPC11 21.05.2011 26
  • 72. At the core of the eZ Publish CMS Extensible REST API Prefix Just a token to trigger your rewrite rule Provider ezpRestPrefixFilterInterface Version Nicolas Pastorino - DPC11 21.05.2011 26
  • 73. At the core of the eZ Publish CMS Extensible REST API Prefix Just a token to trigger your rewrite rule Provider ezpRestPrefixFilterInterface Version Nicolas Pastorino - DPC11 21.05.2011 26
  • 74. Prefix filter ezpRestPrefixFilterInterface Current provider Current parsed version value Nicolas Pastorino - DPC11 21.05.2011 27
  • 75. Versioned API class ezpRestRouter extends ezcMvcRouter { public function createRoutes() { // ezpRestApiProvider $routes = array( new ezcMvcRailsRoute( '/content/node/:nodeId/listAtom', 'ezpRestAtomController', 'collection' ), new ezcMvcRailsRoute( '/content/node/:nodeId/list', 'ezpRestContentController', 'list' ), new ezcMvcRailsRoute( '/content/node/:nodeId', 'ezpRestContentController', 'viewContent' ), new ezcMvcRailsRoute( '/content/node/:nodeId/fields', 'ezpRestContentController', 'viewFields' ), new ezcMvcRailsRoute( '/content/node/:nodeId/field/:fieldIdentifier', 'ezpRestContentController', 'viewField' ), new ezcMvcRailsRoute( '/content/object/:objectId', 'ezpRestContentController', 'viewContent' ), new ezcMvcRailsRoute( '/content/object/:objectId/fields', 'ezpRestContentController', 'viewFields' ), new ezcMvcRailsRoute( '/content/object/:objectId/field/:fieldIdentifier', 'ezpRestContentController', 'viewField' ), new ezpRestVersionedRoute( new ezcMvcRailsRoute( '/foo', 'myController', 'myActionOne' ), 1 ), new ezpRestVersionedRoute( new ezcMvcRailsRoute( 'e/foo', 'myController2 or myControlerWhichExtendsmyController', 'myBetterAndScalingAction' ), 2 ), ); return ezcMvcRouter::prefix( '/api', $routes ); } } Nicolas Pastorino - DPC11 21.05.2011 28
  • 76. Versioned API ezpRestVersionedRoute Version makes the notion version a part of the routing decision Nicolas Pastorino - DPC11 21.05.2011 29
  • 77. At the core of the eZ Publish CMS Extensible REST API Extending the interface Nicolas Pastorino - DPC11 21.05.2011 30
  • 78. Extending the interface REST providers Nicolas Pastorino - DPC11 21.05.2011 31
  • 80. Overview of hooks Nicolas Pastorino - DPC11 21.05.2011 33
  • 81. Nicolas Pastorino - DPC11 21.05.2011 34
  • 82. Route setup - Example class ezpRestRouter extends ezcMvcRouter { public function createRoutes() { $providerRoutes = ezpRestProvider::getProvider ( ezpRestPrefixFilterInterface::getApiProviderName() )->getRoutes(); $routes = array( new ezpMvcRailsRoute( '/fatal', 'ezpRestErrorController', 'show' ), new ezpMvcRailsRoute( '/http-basic-auth', 'ezpRestAuthController', 'basicAuth' ), new ezpMvcRailsRoute( '/login/oauth', 'ezpRestAuthController', 'oauthRequired' ), new ezpMvcRailsRoute( '/oauth/token', 'ezpRestOauthTokenController', 'handleRequest'), // ezpRestVersionedRoute( $route, $version ) // $version == 1 should be the same as if the only the $route had been present new ezpRestVersionedRoute( new ezpMvcRailsRoute( '/foo', 'myController', 'myActionOne' ), 1 ), new ezpRestVersionedRoute( new ezpMvcRailsRoute( '/foo', 'myController', 'myActionOneBetter' ), 2 ), ); return ezcMvcRouter::prefix( '/api', array_merge( $providerRoutes, $routes ) ); } } Nicolas Pastorino - DPC11 21.05.2011 35
  • 83. Extensible REST API Key features 36
  • 84. Key features Extensible REST API Content resources Nicolas Pastorino - DPC11 21.05.2011 37
  • 85. Key features GET /[api]/v1/content/object/ <objectId>/fields HTTP/1.1 Nicolas Pastorino - DPC11 21.05.2011 38
  • 86. Key features fields/<fieldname> type (datatype string) identifier (attribute identifier) value (string representation of data) id (object attribute numerical ID) classattribute_id (class attribute numerical ID) Nicolas Pastorino - DPC11 21.05.2011 39
  • 87. Key features GET /[api]/v1/content/object/ <objectId>/field/ <FieldIdentifier> HTTP/1.1 Nicolas Pastorino - DPC11 21.05.2011 40
  • 88. Demo Web + Android, eZ Publish powered 41
  • 90. RECAP Multichannel : why ? REST Extensible REST API Demo
  • 91.
  • 92. You won’t ever play Pacman the same way again :)
  • 93. You won’t ever play Pacman the same way again :)
  • 94. You won’t ever play Pacman the same way again :)
  • 95. Find me on Twitter : @jeanvoye Rate this talk : http://joind.in/talk/view/3255, Slides available soon at http://slideshare.net/jeanvoye eZ Conference, June 16th&17th, London : Rasmus Lerdorf, Derick Rethans, Thank you ! Tobias Schlitt Get a 20% off coupon at the eZ Booth in the hall, and register : http://london2011.ez.no eZ Community http://share.ez.no eZ Publish Community Project http://share.ez.no/download & http://share.ez.no/get-involved eZ Systems & eZ Publish Enterprise Edition http://ez.no