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

Liiptalk Neos CMS

Liiptalk Neos CMS

Neos CMS introduction at the Liiptalk on the 27th of september 2016, record available https://www.youtube.com/watch?v=J6q5Hk7Dr4k

Dominique Feyer

September 27, 2016
Tweet

More Decks by Dominique Feyer

Other Decks in Technology

Transcript

  1. View Slide

  2. building a CMS for
    ambitious editors

    View Slide

  3. history

    View Slide

  4. born under
    the TYPO3 umbrella

    View Slide

  5. goals

    View Slide

  6. foundation

    View Slide

  7. FLOW
    full stack PHP framework

    View Slide

  8. yet an other framework

    View Slide

  9. convention over
    configuration

    View Slide

  10. security framework

    View Slide

  11. privilegeTargets:
    'TYPO3\Flow\Security\Authorization\Privilege\Method\MethodPrivilege':
    'Acme.MyPackage:RestrictedController.customerAction':
    matcher: 'method(Acme\MyPackage\Controller\RestrictedController->
    customerAction())'
    'Acme.MyPackage:RestrictedController.adminAction':
    matcher: 'method(Acme\MyPackage\Controller\RestrictedController->
    (admin|drop)Action())’
    'Acme.MyPackage:editOwnPost':
    matcher: ‘method(Acme\MyPackage\Controller\PostController->
    editAction(post.owner == current.userService.currentUser))'

    View Slide

  12. roles:
    'Acme.MyPackage:Customer':
    privileges:
    -
    privilegeTarget: 'Acme.MyPackage:RestrictedController.customerAction'
    permission: GRANT
    -
    privilegeTarget: 'Acme.MyPackage:RestrictedController.adminAction'
    permission: GRANT
    -
    privilegeTarget: 'Acme.MyPackage:RestrictedController.editOwnPost'
    permission: GRANT
    'Acme.MyPackage:Customer':
    privileges:
    -
    privilegeTarget: 'Acme.MyPackage:RestrictedController.customerAction'
    permission: GRANT
    'Acme.MyPackage:PrivilegedCustomer':
    parentRoles: ['Acme.MyPackage:Customer']
    privileges:
    -
    privilegeTarget: 'Acme.MyPackage:RestrictedController.editOwnPost'
    permission: GRANT

    View Slide

  13. security CLI helpers

    View Slide

  14. $ ./flow security:showunprotectedactions
    TYPO3\Neos\Controller\Backend\ContentController
    initializeUploadAssetAction
    initializeCreateImageVariantAction
    TYPO3\Neos\Controller\LoginController
    initializeIndexAction
    TYPO3\Neos\Controller\Service\WorkspacesController
    initializeUpdateAction
    Ttree\CloudButler\Controller\JobController
    initializeRegisterAction

    View Slide

  15. AOP

    View Slide

  16. help with single
    responsibility principle

    View Slide

  17. danger zone

    View Slide

  18. We compile your code

    View Slide

  19. Powerful Reflection API

    View Slide

  20. @Flow\CompileStatic

    View Slide

  21. /**
    * Returns a map of action method names and their parameters.
    *
    * @param \TYPO3\Flow\Object\ObjectManagerInterface $objectManager
    * @return array Array of method parameters by action name
    * @Flow\CompileStatic
    */
    static public function getActionMethodParameters($objectManager) {
    $reflectionService = $objectManager->get(
    'TYPO3\Flow\Reflection\ReflectionService');
    $className = get_called_class();
    $methodParameters = $reflectionService->getMethodParameters($className,
    get_class_methods($className));
    foreach ($methodParameters as $parameterName => $parameterInfo) {
    ...
    }
    return $methodParameters;
    }

    View Slide

  22. NEOS is just a package

    View Slide

  23. NEOS Content Repository

    View Slide

  24. where content lives

    View Slide

  25. yaml configuration

    View Slide

  26. 'My.Package:SpecialHeadline':
    superTypes:
    'TYPO3.Neos:Content': true
    ui:
    label: 'Special Headline'
    group: 'general'
    properties:
    headline:
    type: 'string'
    defaultValue: 'My Headline Default'
    ui:
    inlineEditable: true
    validation:
    'TYPO3.Neos/Validation/StringLengthValidator':
    minimum: 1
    maximum: 255

    View Slide

  27. inspired by PHPCR

    View Slide

  28. editing content

    View Slide

  29. editor experience

    View Slide

  30. View Slide

  31. View Slide

  32. View Slide

  33. View Slide

  34. View Slide

  35. workspace

    View Slide

  36. View Slide

  37. View Slide

  38. View Slide

  39. content dimensions

    View Slide

  40. View Slide

  41. contents lives
    in multiple contexts

    View Slide

  42. View Slide

  43. WYSIFTW

    View Slide

  44. View Slide

  45. View Slide

  46. View Slide

  47. developer

    View Slide

  48. don’t hide features

    View Slide

  49. create values

    View Slide

  50. flexible content structure

    View Slide

  51. modern rendering stack

    View Slide

  52. fusion

    View Slide

  53. prototype(Vendor:Staff) < prototype(TYPO3.Neos:Content) {
    templatePath = ‘resource://Vendor.Site/Private/Templates/ElementName.html'
    headline = ${q(node).property('headline')}
    subheadline = ${q(node).property('subheadline')}
    text = ${q(node).property('text')}
    image = ${q(node).property('image')}
    }

    View Slide

  54. prototype(Vendor:Staff) < prototype(TYPO3.Neos:Content) {
    templatePath = ‘resource://Vendor.Site/Private/Templates/ElementName.html'
    headline = ${q(node).property('headline')}
    subheadline = ${q(node).property('subheadline')}
    text = ${q(node).property('text')}
    image = ${q(node).property(‘image’)}
    staffIdentifier = ${q(node).property(‘staffIdentifier’)}
    [email protected] = ${ErpApi.getStaffDetails(value)}
    }

    View Slide

  55. prototype(Vendor:YourTwoColumns) {
    prototype(Vendor:Staff) {
    templatePath = ‘resource://Vendor.Site/Private/Templates/Compact.html'
    }
    }
    prototype(Vendor:StaffDirectory.Document) {
    prototype(Vendor:Staff) {
    templatePath = ‘resource://Vendor.Site/Private/Templates/Square.html'
    staffPageLink = ${q(node).property(‘staffIdentifier’)}
    [email protected] = ${ErpApi.getStaffUri(value)}
    }
    }

    View Slide

  56. prototype(Vendor:StaffListing) < prototype(Flowpack.Listable:Listable) {
    @context.limit = 10
    collection = ${q(site).find('[instanceof Vendor:Staff]’).get()}
    itemRenderer = ‘Vendor:StaffListingItem'
    }
    prototype(Vendor:StaffListingItem) < prototype(Vendor:Staff) {
    templatePath = ‘resource://Vendor.Site/Private/Templates/ListingItem.html'
    }

    View Slide

  57. cache on steroid

    View Slide

  58. prototype(Vendor:StaffListingItem) {
    @cache {
    mode = 'cached'
    maximumLifetime = '86400'
    entryIdentifier {
    node = ${node}
    }
    entryTags {
    1 = ${'Node_' + documentNode.identifier}
    }
    }
    }

    View Slide

  59. much much more
    open to organize a workshop to build
    something on top of NEOS

    View Slide

  60. from the lab

    View Slide

  61. View Slide

  62. CQRS
    for the content repository

    View Slide

  63. touch points

    View Slide

  64. neos.io

    View Slide

  65. View Slide

  66. View Slide

  67. [email protected] - @ttreeagency - github.com/ttreeagency
    tt ttree
    digital beans

    View Slide