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

5c35ea5ff0ba6e46116b1470509f96d1?s=128

Dominique Feyer

September 27, 2016
Tweet

Transcript

  1. None
  2. building a CMS for ambitious editors

  3. history

  4. born under the TYPO3 umbrella

  5. goals

  6. foundation

  7. FLOW full stack PHP framework

  8. yet an other framework

  9. convention over configuration

  10. security framework

  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))'
  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
  13. security CLI helpers

  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
  15. AOP

  16. help with single responsibility principle

  17. danger zone

  18. We compile your code

  19. Powerful Reflection API

  20. @Flow\CompileStatic

  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; }
  22. NEOS is just a package

  23. NEOS Content Repository

  24. where content lives

  25. yaml configuration

  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
  27. inspired by PHPCR

  28. editing content

  29. editor experience

  30. None
  31. None
  32. None
  33. None
  34. None
  35. workspace

  36. None
  37. None
  38. None
  39. content dimensions

  40. None
  41. contents lives in multiple contexts

  42. None
  43. WYSIFTW

  44. None
  45. None
  46. None
  47. developer

  48. don’t hide features

  49. create values

  50. flexible content structure

  51. modern rendering stack

  52. fusion

  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')} }
  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’)} staffIdentifier.@process.callErp = ${ErpApi.getStaffDetails(value)} }
  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’)} staffPageLink.@process.callErp = ${ErpApi.getStaffUri(value)} } }
  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' }
  57. cache on steroid

  58. prototype(Vendor:StaffListingItem) { @cache { mode = 'cached' maximumLifetime = '86400'

    entryIdentifier { node = ${node} } entryTags { 1 = ${'Node_' + documentNode.identifier} } } }
  59. much much more open to organize a workshop to build

    something on top of NEOS
  60. from the lab

  61. None
  62. CQRS for the content repository

  63. touch points

  64. neos.io

  65. None
  66. None
  67. hello@ttree.ch - @ttreeagency - github.com/ttreeagency tt ttree digital beans