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

Headless CMS (T3DD19)

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on. →

Headless CMS (T3DD19)

Artus Kolanowski and Susanne Moog present the current state of headless in TYPO3 and perspectives for the future.

psychomieze

August 01, 2019

Transcript

26 slides
  1. A closer look at the definition ▪ “Headless” is the

    absence of an graphical user interface ▪ Ambitions to decouple the application architecture ▪ Machines take place of the users instead Back End UI Front End Templates Plugins Back End UI API Traditional CMS Headless CMS
  2. Explanation attempt(s) for the trend Multiple Channels ▪ Social media

    ▪ Internet of things Flexibility ▪ UI technologies ▪ Stakeholder needs Scalability ▪ Large projects ▪ Long-living projects
  3. What’s missing? ▪ Convenient Read API / Default Data Models

    ▪ Write API ▪ Access / Rights Management
  4. Persistence Initiative ▪ Handling localization, workspaces and permissions combined is

    complex ▪ Unified persistence layer is missing ▪ Lack of a generic permission layer
  5. Persistence Layer ▪ Unified data schema definition ▪ GraphQL as

    query language ▪ Context as part of a query
  6. GraphQL Query { tt_content( filter: "pid = 123 and CType

    = `image`", order: "header ascending" ) { header image { # sys_file_reference [0..*] title uid_local { # sys_file [1] identifier } } } }
  7. Entity Reader use TYPO3\CMS\GraphQL; $entityReader = new EntityReader(); $result =

    $entityReader->execute( '...', # GraphQL Query new Context([ 'language' => new LanguageAspect(2, null, LanguageAspect::OVERLAYS_ON) ]) );
  8. Permission Layer ▪ Policy-based access control ▪ Define and overwrite

    policies through YAML ▪ Expression language for policy targeting ▪ Multiple combining algorithms ▪ Decision related actions
  9. Policy Definition TYPO3: CMS: Policy: description: 'Root policy set.' algorithm:

    highestPriority policies: Admin: target: 'hasAuthority("backend.role", "ADMIN")' description: 'Administrator policy' priority: 100 rules: [ {effect: permit} ]
  10. Policy Decision use TYPO3\CMS\Security\Policy\PolicyDecision; use TYPO3\CMS\Security\Policy\PolicyDecisionPoint; $policyDecisionPoint = new PolicyDecisionPoint();

    $policyDecision = $policyDecisionPoint->authorize([ 'resource' => ..., # e.g. `be_users` 'action' => ..., # e.g. `read` ]); if ($policyDecision->isApplicable() && $policyDecision->getValue() === PolicyDecision::PERMIT ) { ... }
  11. Sources / Further Reading ▪ https://usetypo3.com/json-view.html ▪ https://extensions.typo3.org/extension/slim_ty po3/ ▪

    https://usetypo3.com/psr15-middleware-in-typ o3.html ▪ https://typo3.org/community/teams/typo3-de velopment/initiatives/persistence/

More Decks by psychomieze

Other Decks in Technology