• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
eZ goes mobile - the RESTful way
 

eZ goes mobile - the RESTful way

on

  • 1,701 views

 

Statistics

Views

Total Views
1,701
Views on SlideShare
1,675
Embed Views
26

Actions

Likes
0
Downloads
6
Comments
0

2 Embeds 26

http://lanyrd.com 25
http://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    eZ goes mobile - the RESTful way eZ goes mobile - the RESTful way Presentation Transcript

    • eZ goes mobile
        ...the RESTful way
    • About me
      • Markus Birth
      • Software-Developer at silver.solutions GmbH
      • Berlin, Germany
      • silver.solutions offers great experience in connecting eZ Publish to ERP systems (Navision, Axapta, SAP R/3). We also do mobile apps.
      • I do mostly backend programming for eZ Publish sites where I'm specialized in interfaces. My second field of activity is mobile apps.
    • REST
        -> Re presentational S tate T ransfer (Google it! Or try Wikipedia: http://en.wikipedia.org/wiki/REST )
    • Things you might need
        What you need:
      • eZ 4.5 with ezpRestApiProvider
      • configured OAuth2 consumer credentials
      • user login with appropriate access rights
      • doc.ez.no
      • some client (e.g. a mobile app)
    • I am who I am (or: OAuth 2.0)
      • to communicate via REST, a valid access_token is required
      • can be retrieved via OAuth2 workflow
      • tricky for non-browser applications
        • 2 ways for apps on mobile devices:
          • a) show login window in an own WebView and watch the currently shown URL for the endpoint URI
          • b) register a new protocol handler, set the endpoint_uri and react on that (works from any mobile browser)
            • e.g. mycrapp://
    • OAuth 2.0 login
    • eZ REST URL Scheme
      • Methods: GET , POST, PUT, DELETE
      • Base URL: http://myezsite.com/api/ezp/v1
        • /content/ object / [objectID]
        • /content/ node / [nodeID]
        • /content/ ( node | object ) / [ID] / fields
        • /content/ ( node | object ) / [ID] / field / [fieldID]
        • /content/node/ [nodeID] / list /offset/…/limit/…/sort/…/…
        • /content/node/ [nodeID] / childrenCount
      • non-default language: http://… ?translation= xxx-YY
    • The first request GET /api/ezp/v1/content/node/ 2 / list Authorization: OAuth 0123456789abcdef… Accept: application/json "childrenNodes": [ { "objectName": "Awards" , "classIdentifier": "subcategory", "datePublished": 1302091069, "dateModified": 1307614988, "objectRemoteId": "d003…3e94", "objectId": 1203, "nodeId": 1257, "nodeRemoteId": "f4ef…47f2", "fullUrl": "http://…/Awards", "link": "http://…/content/node/1257" }, { … } ],
    • Thank you for listening http://lanyrd.com/sfhtw