Your SlideShare is downloading. ×
0
Launchingcontent inmobility withREST &    eZ Publish
Launchingcontent inmobility withREST &    eZ Publish       Nicolas Pastorino - nfrp@ez.no       Director Community - eZ Sy...
#dpc11         Launching         content in         mobility with          Mobile         REST &           Dutch PHP Confe...
#dpc11         Launching         content in         mobility with          Mobile         REST &           Dutch PHP Confe...
Our agenda :
Our agenda :Multichannel : why ?
Our agenda :Multichannel : why ?       REST
Our agenda :Multichannel : why ?       RESTExtensible REST API
Our agenda :Multichannel : why ?       RESTExtensible REST API       Demo
Multichannel : why ?                       3
How would youfeel playingPacman on asingle, straight lineof dots ?
How would youfeel playingPacman on asingle, straight lineof dots ?
How would youfeel playing       Boring,Pacman on a       right ? linesingle, straightof dots ?
Multichannelcontentdistribution isthe real Pacman
Multichannelcontentdistribution isthe real Pacman
Pre-requisites to multichannel distributionNicolas Pastorino - DPC11   21/05/2011        7
Pre-requisites to multichannel distributionSeparation of layoutand content at the   1content source level Nicolas Pastorin...
Pre-requisites to multichannel distributionSeparation of layoutand content at the   1content source level Nicolas Pastorin...
Pre-requisites to multichannel distributionSeparation of layoutand content at the   1content source levelDo not compromise...
Pre-requisites to multichannel distributionSeparation of layoutand content at the   1content source level                 ...
Pre-requisites to multichannel distributionSeparation of layoutand content at the   1content source level                 ...
Pre-requisites to multichannel distributionSeparation of layoutand content at the   1content source level                 ...
Pre-requisites to multichannel distributionSeparation of layoutand content at the   1content source level                 ...
Ready to   tackle     yourchannels    yet ?
Ready to   tackle     yourchannels    yet ?            We’re hardly            off the            ground. Let’s           ...
SingleContentSource    /   CMS
SingleContentSource    /   CMS
Monetized                    Content                    StreamsSingleContentSource    /   CMS
Monetized                    Content                    Streams                    Mobile                    ApplicationsS...
Monetized                    Content                    Streams                    Mobile                    ApplicationsS...
Monetized                    Content                    Streams                    Mobile                    ApplicationsS...
Monetized                    Content                    Streams                    Mobile                    ApplicationsS...
"Multichannel media consumers have higher levelsof engagement than those present in only onechannel.The more one watches T...
Having a REST ?   :)
Having a REST ?   :)              A touch              more of           insight will                help...
“Media companies as well as consumer brands mustrecognize that adding mobile to the multichannel mixdoes not mean creating...
Least  CommonDenominator :
Least  CommonDenominator :a REST API
Thosewere thebasics toincrease     your REACH through multiplechannels
Thosewere thebasics toincrease     your REACH through multiplechannels    Right            Chris ?
REST       15
REpresentationalStateTransfer
REpresentationalStateTransferREST is a set of principles that define how Web standards, such asHTTP and URIs, are supposed...
REpresentationalStateTransferREST is a set of principles that define how Web standards, such asHTTP and URIs, are supposed...
REpresentationalStateTransfer                   h"p://www.infoq.com/ar4cles/rest-­‐introduc4on                   h"p://en....
REpresentationalStateTransferKey goals of REST include:• Scalability of component interactions• Generality of interfaces• ...
Extensible REST APIat the core of the eZ Publish CMS                                    18
At the core of the eZ Publish CMSExtensible REST API    REST                    as a core featureNicolas Pastorino - DPC11...
At the core of the eZ Publish CMSExtensible REST APIDedicated front-controllerNicolas Pastorino - DPC11   21.05.2011   20
At the core of the eZ Publish CMSExtensible REST API                                                              REST   s...
At the core of the eZ Publish CMSExtensible REST API                                                              REST   s...
At the core of the eZ Publish CMSExtensible REST API                    Mapping content into                        resour...
At the core of the eZ Publish CMSExtensible REST API                     Makes data availableNicolas Pastorino - DPC11    ...
At the core of the eZ Publish CMSExtensible REST API                      Makes data reusableNicolas Pastorino - DPC11    ...
At the core of the eZ Publish CMSExtensible REST API                   Content is essentially                        liber...
At the core of the eZ Publish CMSExtensible REST API                            URI patternNicolas Pastorino - DPC11      ...
At the core of the eZ Publish CMSExtensible REST API                                       Just a token to trigger your re...
At the core of the eZ Publish CMSExtensible REST API                            Just a token to trigger your rewrite rule ...
At the core of the eZ Publish CMSExtensible REST API  Prefix                     Just a token to trigger your rewrite rule ...
At the core of the eZ Publish CMSExtensible REST API  Prefix                     Just a token to trigger your rewrite ruleP...
At the core of the eZ Publish CMSExtensible REST API  Prefix                     Just a token to trigger your rewrite ruleP...
At the core of the eZ Publish CMSExtensible REST API  Prefix                     Just a token to trigger your rewrite ruleP...
At the core of the eZ Publish CMSExtensible REST API  Prefix                     Just a token to trigger your rewrite ruleP...
Prefix filterezpRestPrefixFilterInterfaceCurrent providerCurrent parsed version valueNicolas Pastorino - DPC11      21.05.201...
Versioned APIclass ezpRestRouter extends ezcMvcRouter{    public function createRoutes()    {        // ezpRestApiProvider...
Versioned APIezpRestVersionedRoute                            Version  makes the notion version a  part of the routing dec...
At the core of the eZ Publish CMSExtensible REST API Extending the interfaceNicolas Pastorino - DPC11   21.05.2011   30
Extending the interface                            REST providersNicolas Pastorino - DPC11         21.05.2011   31
Extending the interfaceezpRestProviderInterfaceNicolas Pastorino - DPC11   21.05.2011   32
Overview of hooksNicolas Pastorino - DPC11   21.05.2011   33
Nicolas Pastorino - DPC11   21.05.2011   34
Route setup - Exampleclass ezpRestRouter extends ezcMvcRouter{    public function createRoutes()    {        $providerRout...
Extensible REST APIKey features                      36
Key featuresExtensible REST API                 Content resourcesNicolas Pastorino - DPC11   21.05.2011   37
Key featuresGET /[api]/v1/content/object/ <objectId>/fields HTTP/1.1Nicolas Pastorino - DPC11   21.05.2011   38
Key featuresfields/<fieldname>        type (datatype string)        identifier (attribute identifier)        value (string rep...
Key features   GET /[api]/v1/content/object/         <objectId>/field/    <FieldIdentifier> HTTP/1.1Nicolas Pastorino - DP...
DemoWeb + Android, eZ Publish powered                                    41
Famous Last Slides                     42
RECAPMultichannel : why ?       RESTExtensible REST API       Demo
You won’t everplay Pacmanthe same wayagain :)
You won’t everplay Pacmanthe same wayagain :)
You won’t everplay Pacmanthe same wayagain :)
Find me on Twitter : @jeanvoyeRate this talk : http://joind.in/talk/view/3255,Slides available soon at http://slideshare.n...
Nicolas Pastorino - Launching content in mobility with REST & eZ Publish
Nicolas Pastorino - Launching content in mobility with REST & eZ Publish
Nicolas Pastorino - Launching content in mobility with REST & eZ Publish
Nicolas Pastorino - Launching content in mobility with REST & eZ Publish
Nicolas Pastorino - Launching content in mobility with REST & eZ Publish
Nicolas Pastorino - Launching content in mobility with REST & eZ Publish
Nicolas Pastorino - Launching content in mobility with REST & eZ Publish
Nicolas Pastorino - Launching content in mobility with REST & eZ Publish
Nicolas Pastorino - Launching content in mobility with REST & eZ Publish
Nicolas Pastorino - Launching content in mobility with REST & eZ Publish
Nicolas Pastorino - Launching content in mobility with REST & eZ Publish
Upcoming SlideShare
Loading in...5
×

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

755

Published on

Talk given at the Dutch PHP Conference 2011.

Pure-web is not an option anymore when publishing content: addressing the broader internet and its multiple channels is key to a great diffusion. As a Content Management Platform, eZ Publish now exposes an extensible REST API for mobile devices to consume and create content. This session will show how content & functionalities are made available to mobile applications on such platforms as Android phones, iPhones, iPads and tablets.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
755
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

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

  1. 1. Launchingcontent inmobility withREST & eZ Publish
  2. 2. Launchingcontent inmobility withREST & eZ Publish Nicolas Pastorino - nfrp@ez.no Director Community - eZ Systems @jeanvoye - http://share.ez.no
  3. 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. 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
  5. 5. Our agenda :
  6. 6. Our agenda :Multichannel : why ?
  7. 7. Our agenda :Multichannel : why ? REST
  8. 8. Our agenda :Multichannel : why ? RESTExtensible REST API
  9. 9. Our agenda :Multichannel : why ? RESTExtensible REST API Demo
  10. 10. Multichannel : why ? 3
  11. 11. How would youfeel playingPacman on asingle, straight lineof dots ?
  12. 12. How would youfeel playingPacman on asingle, straight lineof dots ?
  13. 13. How would youfeel playing Boring,Pacman on a right ? linesingle, straightof dots ?
  14. 14. Multichannelcontentdistribution isthe real Pacman
  15. 15. Multichannelcontentdistribution isthe real Pacman
  16. 16. Pre-requisites to multichannel distributionNicolas Pastorino - DPC11 21/05/2011 7
  17. 17. Pre-requisites to multichannel distributionSeparation of layoutand content at the 1content source level Nicolas Pastorino - DPC11 21/05/2011 7
  18. 18. Pre-requisites to multichannel distributionSeparation of layoutand content at the 1content source level Nicolas Pastorino - DPC11 21/05/2011 7
  19. 19. Pre-requisites to multichannel distributionSeparation of layoutand content at the 1content source levelDo not compromise onuser experience 2 Nicolas Pastorino - DPC11 21/05/2011 7
  20. 20. Pre-requisites to multichannel distributionSeparation of layoutand content at the 1content source level “The Superman Effect” Aral Balkan, DPC11Do not compromise onuser experience 2 Nicolas Pastorino - DPC11 21/05/2011 7
  21. 21. Pre-requisites to multichannel distributionSeparation of layoutand content at the 1content source level “The Superman Effect” Aral Balkan, DPC11Do not compromise onuser 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
  22. 22. Pre-requisites to multichannel distributionSeparation of layoutand content at the 1content source level “The Superman Effect” Aral Balkan, DPC11Do not compromise onuser experience 2 “There is a lot of effort going into improving customer experience. It is key to get consistency across different channels so theirHave a single source experience does not vary” Jim Daviesniof content 3 Nicolas Pastorino - DPC11 21/05/2011 7
  23. 23. Pre-requisites to multichannel distributionSeparation of layoutand content at the 1content source level “The Superman Effect” Aral Balkan, DPC11Do not compromise onuser experience 2 “There is a lot of effort going into improving customer experience. It is key to get consistency across different channels so theirHave a single source experience does not vary” Jim Daviesniof content 3 “Publishers usually cant afford a dedicated editorial team per channel” Nicolas Pastorino - DPC11 21/05/2011 7
  24. 24. Ready to tackle yourchannels yet ?
  25. 25. Ready to tackle yourchannels yet ? We’re hardly off the ground. Let’s dig further...
  26. 26. SingleContentSource / CMS
  27. 27. SingleContentSource / CMS
  28. 28. Monetized Content StreamsSingleContentSource / CMS
  29. 29. Monetized Content Streams Mobile ApplicationsSingle / Smartphones, TabletsContentSource CMS
  30. 30. Monetized Content Streams Mobile ApplicationsSingle / Smartphones, TabletsContentSource CMS Push 3rd party CRM, ERP Content Newsletters
  31. 31. Monetized Content Streams Mobile ApplicationsSingle / Smartphones, TabletsContentSource CMS Push 3rd party CRM, ERP Content Newsletters Print Legacy publication chains
  32. 32. Monetized Content Streams Mobile ApplicationsSingle / Smartphones, TabletsContentSource CMS Push 3rd party CRM, ERP Content Newsletters Print Legacy publication chains Social Media
  33. 33. "Multichannel media consumers have higher levelsof engagement than those present in only onechannel.The more one watches TV, listens to the radio,spends time online, etc., the more advertising theyconsume.This shows that multichannel contentdistribution will also have an important impacton the publishers revenue structure. It willevolve to become a competitive, critical, enablingtechnology for marketing communications."
  34. 34. Having a REST ? :)
  35. 35. Having a REST ? :) A touch more of insight will help...
  36. 36. “Media companies as well as consumer brands mustrecognize that adding mobile to the multichannel mixdoes not mean creating a mini-channel. Thosebuilding 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.”
  37. 37. Least CommonDenominator :
  38. 38. Least CommonDenominator :a REST API
  39. 39. Thosewere thebasics toincrease your REACH through multiplechannels
  40. 40. Thosewere thebasics toincrease your REACH through multiplechannels Right Chris ?
  41. 41. REST 15
  42. 42. REpresentationalStateTransfer
  43. 43. REpresentationalStateTransferREST is a set of principles that define how Web standards, such asHTTP and URIs, are supposed to be used.• Give every “thing” an ID• Link things together• Use standard methods• Resources with multiple representations• Communicate statelessly
  44. 44. REpresentationalStateTransferREST is a set of principles that define how Web standards, such asHTTP 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
  45. 45. REpresentationalStateTransfer h"p://www.infoq.com/ar4cles/rest-­‐introduc4on h"p://en.wikipedia.org/wiki/Representa4onal_State_Transfer
  46. 46. REpresentationalStateTransferKey goals of REST include:• Scalability of component interactions• Generality of interfaces• Independent deployment of components• Intermediary components to reduce latency, enforce security andencapsulate legacy systems h"p://www.infoq.com/ar4cles/rest-­‐introduc4on h"p://en.wikipedia.org/wiki/Representa4onal_State_Transfer
  47. 47. Extensible REST APIat the core of the eZ Publish CMS 18
  48. 48. At the core of the eZ Publish CMSExtensible REST API REST as a core featureNicolas Pastorino - DPC11 21.05.2011 19
  49. 49. At the core of the eZ Publish CMSExtensible REST APIDedicated front-controllerNicolas Pastorino - DPC11 21.05.2011 20
  50. 50. At the core of the eZ Publish CMSExtensible REST API REST setup REST eZP REST  request FC eZ  Publish web-­‐requestNicolas Pastorino - DPC11 21.05.2011 21
  51. 51. At the core of the eZ Publish CMSExtensible REST API REST setup REST eZP REST  request FC eZ  Publish web-­‐requestNicolas Pastorino - DPC11 21.05.2011 21
  52. 52. At the core of the eZ Publish CMSExtensible REST API Mapping content into resourcesNicolas Pastorino - DPC11 21.05.2011 22
  53. 53. At the core of the eZ Publish CMSExtensible REST API Makes data availableNicolas Pastorino - DPC11 21.05.2011 23
  54. 54. At the core of the eZ Publish CMSExtensible REST API Makes data reusableNicolas Pastorino - DPC11 21.05.2011 23
  55. 55. At the core of the eZ Publish CMSExtensible REST API Content is essentially liberatedNicolas Pastorino - DPC11 21.05.2011 24
  56. 56. At the core of the eZ Publish CMSExtensible REST API URI patternNicolas Pastorino - DPC11 21.05.2011 25
  57. 57. At the core of the eZ Publish CMSExtensible REST API Just a token to trigger your rewrite rule Call + GET Host / Prefix / Provider / Version / params ezpRestPrefixFilterInterfaceNicolas Pastorino - DPC11 21.05.2011 26
  58. 58. At the core of the eZ Publish CMSExtensible REST API Just a token to trigger your rewrite rule Prefix Provider Version ezpRestPrefixFilterInterfaceNicolas Pastorino - DPC11 21.05.2011 26
  59. 59. At the core of the eZ Publish CMSExtensible REST API Prefix Just a token to trigger your rewrite rule Provider Version ezpRestPrefixFilterInterfaceNicolas Pastorino - DPC11 21.05.2011 26
  60. 60. At the core of the eZ Publish CMSExtensible REST API Prefix Just a token to trigger your rewrite ruleProvider Version ezpRestPrefixFilterInterfaceNicolas Pastorino - DPC11 21.05.2011 26
  61. 61. At the core of the eZ Publish CMSExtensible REST API Prefix Just a token to trigger your rewrite ruleProvider ezpRestPrefixFilterInterfaceVersionNicolas Pastorino - DPC11 21.05.2011 26
  62. 62. At the core of the eZ Publish CMSExtensible REST API Prefix Just a token to trigger your rewrite ruleProvider ezpRestPrefixFilterInterfaceVersionNicolas Pastorino - DPC11 21.05.2011 26
  63. 63. At the core of the eZ Publish CMSExtensible REST API Prefix Just a token to trigger your rewrite ruleProvider ezpRestPrefixFilterInterfaceVersionNicolas Pastorino - DPC11 21.05.2011 26
  64. 64. Prefix filterezpRestPrefixFilterInterfaceCurrent providerCurrent parsed version valueNicolas Pastorino - DPC11 21.05.2011 27
  65. 65. Versioned APIclass 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
  66. 66. Versioned APIezpRestVersionedRoute Version makes the notion version a part of the routing decisionNicolas Pastorino - DPC11 21.05.2011 29
  67. 67. At the core of the eZ Publish CMSExtensible REST API Extending the interfaceNicolas Pastorino - DPC11 21.05.2011 30
  68. 68. Extending the interface REST providersNicolas Pastorino - DPC11 21.05.2011 31
  69. 69. Extending the interfaceezpRestProviderInterfaceNicolas Pastorino - DPC11 21.05.2011 32
  70. 70. Overview of hooksNicolas Pastorino - DPC11 21.05.2011 33
  71. 71. Nicolas Pastorino - DPC11 21.05.2011 34
  72. 72. Route setup - Exampleclass 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
  73. 73. Extensible REST APIKey features 36
  74. 74. Key featuresExtensible REST API Content resourcesNicolas Pastorino - DPC11 21.05.2011 37
  75. 75. Key featuresGET /[api]/v1/content/object/ <objectId>/fields HTTP/1.1Nicolas Pastorino - DPC11 21.05.2011 38
  76. 76. Key featuresfields/<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
  77. 77. Key features GET /[api]/v1/content/object/ <objectId>/field/ <FieldIdentifier> HTTP/1.1Nicolas Pastorino - DPC11 21.05.2011 40
  78. 78. DemoWeb + Android, eZ Publish powered 41
  79. 79. Famous Last Slides 42
  80. 80. RECAPMultichannel : why ? RESTExtensible REST API Demo
  81. 81. You won’t everplay Pacmanthe same wayagain :)
  82. 82. You won’t everplay Pacmanthe same wayagain :)
  83. 83. You won’t everplay Pacmanthe same wayagain :)
  84. 84. Find me on Twitter : @jeanvoyeRate this talk : http://joind.in/talk/view/3255,Slides available soon at http://slideshare.net/jeanvoyeeZ 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.noeZ Communityhttp://share.ez.noeZ Publish Community Projecthttp://share.ez.no/download & http://share.ez.no/get-involvedeZ Systems & eZ Publish Enterprise Editionhttp://ez.no
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×