Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Inspiring conference 2016 - Automation & external service integration

Inspiring conference 2016 - Automation & external service integration

How to integration External Service in your web project ? Example based on PHP project by using Flow Framework or Neos CMS, but should be useful in any kind of language.

Dominique Feyer

April 22, 2016
Tweet

More Decks by Dominique Feyer

Other Decks in Technology

Transcript

  1. Text
    Automation and External
    services Integration in Neos
    explore
    tt ttree
    digital beans

    View Slide

  2. tt ttree
    digital beans

    View Slide

  3. Building website
    since 2000

    View Slide

  4. View Slide

  5. Back then a website
    were just an island

    View Slide

  6. But everything changed

    View Slide

  7. View Slide

  8. Define « external service »

    View Slide

  9. Why you need external service ?

    View Slide

  10. not invented here

    View Slide

  11. simple does not mean easy

    View Slide

  12. pay as you go

    View Slide

  13. Give me some
    good external service ?

    View Slide

  14. filepreviews.io

    View Slide

  15. https://dl.dropboxusercontent.com/s/opcxbgkl4znvdc3/2016-04-19%20at%2022.43.png?dl=0

    View Slide

  16. FilePreviews
    github.com/ttreeagency

    View Slide

  17. View Slide

  18. cloudconvert.com

    View Slide

  19. View Slide

  20. moltin.com

    View Slide

  21. View Slide

  22. AWS Lambda
    and many many more

    View Slide

  23. But how ?

    View Slide

  24. has an editor,
    I need to preview link to external
    website in my blog post

    View Slide

  25. Let’s build a web scrapper

    View Slide

  26. or try to integrate embed.ly

    View Slide

  27. /**
    * Embedly Helper
    */
    class EmbedlyHelper implements ProtectedContextAwareInterface
    {
    /**
    * @param string $url
    * @return array
    */
    public function oembed($url)
    {
    $embedly = new Embedly();
    $response = $embedly->oembed([
    'url' => $url
    ]);
    $data = json_decode(json_encode(reset($response)), true);
    return $data;
    }
    /**
    * All methods are considered safe
    *
    * @param string $methodName
    * @return boolean
    */
    public function allowsCallOfMethod($methodName)
    {

    View Slide

  28. prototype(Ttree.Embedly:Oembed) {
    @override.response = ${Embedly.oembed(q(node).property('url'))}
    content = TYPO3.TypoScript:Case {
    link {
    condition = ${response.type == 'link'}
    type = 'Ttree.Embedly:Oembed.Link'
    }
    video {
    condition = ${response.type == 'video'}
    type = 'Ttree.Embedly:Oembed.Video'
    }
    photo {
    condition = ${response.type == 'photo'}
    type = 'Ttree.Embedly:Oembed.Photo'
    }
    }
    }

    View Slide

  29. View Slide

  30. Embedly
    github.com/ttreeagency

    View Slide

  31. This world is full of Unicorns

    View Slide

  32. View Slide

  33. Pitfalls and Pain points

    View Slide

  34. vendor lock in

    View Slide

  35. external downtime

    View Slide

  36. pricing

    View Slide

  37. hard to code
    with external dependencies

    View Slide


  38. ngrok is your best friend
    make your web hooks available online

    View Slide

  39. # ngrok http -host-header=rewrite \
    -subdomain=cloud-butler \
    master-dev.neos-workplace.dev:80

    View Slide

  40. View Slide

  41. View Slide

  42. What about automation ?

    View Slide

  43. web hook in Neos

    View Slide

  44. CloudButler
    project under development

    View Slide

  45. trigger based on temporal data

    View Slide

  46. Scheduler
    github.com/ttreeagency

    View Slide

  47. sync data from external source

    View Slide

  48. Aggregator
    github.com/ttreeagency

    View Slide

  49. Aggregator
    github.com/ttreeagency

    View Slide

  50. opensource & sharing

    is part of our DNA
    we love client project
    to support our open source efforts

    View Slide

  51. [email protected] - @ttreeagency - github.com/ttreeagency
    tt ttree
    digital beans
    you are welcome in our office @ lausanne
    don’t be shy ping us is you are in the area

    View Slide