SlideShare a Scribd company logo
FLOW3,
Extbase &
Fluid
cook book   June 15th 2012, Québec
Bastian Waidelich
2002
2008
THEORY
DDD
D D D
omain   riven   esign
MODEL
MODEL
 MODEL
DRY
D R Y
on‘t   epeat   ourself
Duplication
is evil
KISS
K IS S
 eep   t   imple   tupid
1. Put your site in an Extension/Package

                            In Phoenix: „MyWebsiteCom“



                              Protect private folders
                              with .htaccess files:
                               deny from all
2. Use Fluid for your site template
page = PAGE
page {
  typeNum = 0

  10 = FLUIDTEMPLATE
  10.file = EXT:my_website_com/Resources/Private/Templates/Site.html
  10 {
}   file = EXT:my_website_com/Resources/Private/Templates/Site.html
    extbase.controllerExtensionName = MyWebsiteCom
  }
}
                                Specify extension name/package key
                                for localisation & resources

Phoenix:
page = TYPO3.TYPO3:Page
page.body.templatePath = 'resource://MyWebsiteCom/Private/Templates/Site.html'
DEMO
3. Layouts
Solution 1: different templates

page {
  …
  10 = FLUIDTEMPLATE
  10 {
    …
    file = CASE
    file {
       key.data = levelfield:-1,backend_layout_next_level,slide
       key.override.field = backend_layout

        default = TEXT
        default.value = EXT:my_website_com/…/Default.html

        2 = TEXT
        2.value = EXT:my_website_com/…/Wide.html
    }
}
3. Layouts
Solution 2: CSS

page {
…
  bodyTagCObject = CASE
  bodyTagCObject {
    key.data = levelfield:-1,backend_layout_next_level,slide
    key.override.field = backend_layout

        default = TEXT
        default.value = <body>

        2 = TEXT
        2.value = <body class="wide">
    }
}


Very clean, but not always possible
3. Layouts
Solution 3: Partials

10 {
  …
  variables {
     …
     layout = CASE
     layout {
       key.data = levelfield:-1,backend_layout_next_level,slide
       key.override.field = backend_layout

            default = TEXT
            default.value = Default

            2 = TEXT
            2.value = Wide
        }
    }
}


Site.html
<f:render partial="Content{layout}" />
DEMO
Extension
 Package
4. Continuously enhance model
Templates/Paper.html

<f:if condition="{paper.status} == 'accepted'">
   <p>{paper.title} is accepted</p>
</f:if>                                    This will will not work!




String comparison will be possible in Fluid!
But it‘s mostly not needed.
4. Continuously enhance model
Model/Paper.php

/**
 * @return boolean
 */
public function isAccepted() {
   return $this->status === self::STATUS_ACCEPTED;
}

Templates/Paper.html

<f:if condition="{paper.accepted} ">
   <p>{paper.title} is accepted</p>
</f:if>
DEMO
5. Encapsulate your hacks
Controller/BookController.php

public function tagCloudAction() {
  $books = $this->bookRepository->findAll();
  $tags = array();
  foreach ($books as $book) {
     foreach ($book->getTags() as $tag) {
        $tagCount = 1;
        if (isset($tags[$tag->getTitle()])) {
            $tagCount ++;
            $tags[$tag->getTitle()] = $tagCount;
     }
  }
  $this->view->assign(tags, $tags);
}
5. Encapsulate your hacks
Controller/BookController.php

public function tagCloudAction() {
  $tags = $this->tagCloudService->createTagCloud());
  $this->view->assign('tags', $tags);
}

TagCloudService interacts with Database directly

Book/TagCloud.html
<f:for each="{tags}" as="tag">
   <span class="tag popularity-{tag.popularity}">
      {tag.name}
   </span>
</f:for>
DEMO
6. Performance


CACHING!
Storage folder TSConfig:
TCEMAIN.clearCacheCmd = 1,2,3



AJAX!
DEMO
THANK YOU
@bwaidelich
github.com/bwaidelich

More Related Content

What's hot

Php mail program
Php mail programPhp mail program
Php mail program
pyingkodi maran
 
06 Php Mysql Connect Query
06 Php Mysql Connect Query06 Php Mysql Connect Query
06 Php Mysql Connect Query
Geshan Manandhar
 
Pourquoi WordPress n’est pas un CMS
Pourquoi WordPress n’est pas un CMSPourquoi WordPress n’est pas un CMS
Pourquoi WordPress n’est pas un CMS
Thomas Gasc
 
Creating WordPress Theme Faster, Smarter & Without Swearing
Creating WordPress Theme Faster, Smarter & Without SwearingCreating WordPress Theme Faster, Smarter & Without Swearing
Creating WordPress Theme Faster, Smarter & Without Swearing
martinwolak
 
07 Php Mysql Update Delete
07 Php Mysql Update Delete07 Php Mysql Update Delete
07 Php Mysql Update Delete
Geshan Manandhar
 
Session handling in php
Session handling in phpSession handling in php
Drupal 8 simple page: Mi primer proyecto en Drupal 8.
Drupal 8 simple page: Mi primer proyecto en Drupal 8.Drupal 8 simple page: Mi primer proyecto en Drupal 8.
Drupal 8 simple page: Mi primer proyecto en Drupal 8.
Samuel Solís Fuentes
 
SULTHAN's - PHP MySQL programs
SULTHAN's - PHP MySQL programsSULTHAN's - PHP MySQL programs
SULTHAN's - PHP MySQL programs
SULTHAN BASHA
 
veracruz
veracruzveracruz
veracruz
tutorialsruby
 
Hpage
HpageHpage
Empezando con Twig
Empezando con TwigEmpezando con Twig
Empezando con Twig
Ismael Ambrosi
 
7 reasons why developers should love Joomla!
7 reasons why developers should love Joomla!7 reasons why developers should love Joomla!
7 reasons why developers should love Joomla!
Bartłomiej Krztuk
 
Doing Things the WordPress Way
Doing Things the WordPress WayDoing Things the WordPress Way
Doing Things the WordPress Way
Matt Wiebe
 
Freeingwebhost
FreeingwebhostFreeingwebhost
Freeingwebhost
Mahkota Raja
 
Coding for php with mysql
Coding for php with mysqlCoding for php with mysql
Coding for php with mysql
Rajamanickam Gomathijayam
 
Gem christmas calendar
Gem christmas calendarGem christmas calendar
Gem christmas calendar
erichsen
 
kazumich@acmscamp2010spring
kazumich@acmscamp2010springkazumich@acmscamp2010spring
kazumich@acmscamp2010spring
Kazumich YAMAMOTO
 
Drupal Development (Part 2)
Drupal Development (Part 2)Drupal Development (Part 2)
Drupal Development (Part 2)
Jeff Eaton
 
Fw1
Fw1Fw1
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applications
elliando dias
 

What's hot (20)

Php mail program
Php mail programPhp mail program
Php mail program
 
06 Php Mysql Connect Query
06 Php Mysql Connect Query06 Php Mysql Connect Query
06 Php Mysql Connect Query
 
Pourquoi WordPress n’est pas un CMS
Pourquoi WordPress n’est pas un CMSPourquoi WordPress n’est pas un CMS
Pourquoi WordPress n’est pas un CMS
 
Creating WordPress Theme Faster, Smarter & Without Swearing
Creating WordPress Theme Faster, Smarter & Without SwearingCreating WordPress Theme Faster, Smarter & Without Swearing
Creating WordPress Theme Faster, Smarter & Without Swearing
 
07 Php Mysql Update Delete
07 Php Mysql Update Delete07 Php Mysql Update Delete
07 Php Mysql Update Delete
 
Session handling in php
Session handling in phpSession handling in php
Session handling in php
 
Drupal 8 simple page: Mi primer proyecto en Drupal 8.
Drupal 8 simple page: Mi primer proyecto en Drupal 8.Drupal 8 simple page: Mi primer proyecto en Drupal 8.
Drupal 8 simple page: Mi primer proyecto en Drupal 8.
 
SULTHAN's - PHP MySQL programs
SULTHAN's - PHP MySQL programsSULTHAN's - PHP MySQL programs
SULTHAN's - PHP MySQL programs
 
veracruz
veracruzveracruz
veracruz
 
Hpage
HpageHpage
Hpage
 
Empezando con Twig
Empezando con TwigEmpezando con Twig
Empezando con Twig
 
7 reasons why developers should love Joomla!
7 reasons why developers should love Joomla!7 reasons why developers should love Joomla!
7 reasons why developers should love Joomla!
 
Doing Things the WordPress Way
Doing Things the WordPress WayDoing Things the WordPress Way
Doing Things the WordPress Way
 
Freeingwebhost
FreeingwebhostFreeingwebhost
Freeingwebhost
 
Coding for php with mysql
Coding for php with mysqlCoding for php with mysql
Coding for php with mysql
 
Gem christmas calendar
Gem christmas calendarGem christmas calendar
Gem christmas calendar
 
kazumich@acmscamp2010spring
kazumich@acmscamp2010springkazumich@acmscamp2010spring
kazumich@acmscamp2010spring
 
Drupal Development (Part 2)
Drupal Development (Part 2)Drupal Development (Part 2)
Drupal Development (Part 2)
 
Fw1
Fw1Fw1
Fw1
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applications
 

Viewers also liked

Elemente Websolutions - FLOW3 Überblick
Elemente Websolutions - FLOW3 ÜberblickElemente Websolutions - FLOW3 Überblick
Elemente Websolutions - FLOW3 Überblick
elemente websolutions
 
FLOW3 Einführung auf dem TYPO3Camp Berlin 2012
FLOW3 Einführung auf dem TYPO3Camp Berlin 2012FLOW3 Einführung auf dem TYPO3Camp Berlin 2012
FLOW3 Einführung auf dem TYPO3Camp Berlin 2012Christof Rodejohann
 
Get into the FLOW with Extbase
Get into the FLOW with ExtbaseGet into the FLOW with Extbase
Get into the FLOW with Extbase
Jochen Rau
 
Domain-driven design - eine Einführung
Domain-driven design - eine EinführungDomain-driven design - eine Einführung
Domain-driven design - eine Einführung
die.agilen GmbH
 
FLOW3: Security mit AOP
FLOW3: Security mit AOPFLOW3: Security mit AOP
FLOW3: Security mit AOPnetlogix
 
Weaving aspects in PHP with the help of Go! AOP library
Weaving aspects in PHP with the help of Go! AOP libraryWeaving aspects in PHP with the help of Go! AOP library
Weaving aspects in PHP with the help of Go! AOP library
Alexander Lisachenko
 
A Practical Guide to Domain Driven Design: Presentation Slides
A Practical Guide to Domain Driven Design: Presentation SlidesA Practical Guide to Domain Driven Design: Presentation Slides
A Practical Guide to Domain Driven Design: Presentation Slides
thinkddd
 
Brand New World
Brand New WorldBrand New World
Brand New World
Torsten Henning Hensel
 

Viewers also liked (8)

Elemente Websolutions - FLOW3 Überblick
Elemente Websolutions - FLOW3 ÜberblickElemente Websolutions - FLOW3 Überblick
Elemente Websolutions - FLOW3 Überblick
 
FLOW3 Einführung auf dem TYPO3Camp Berlin 2012
FLOW3 Einführung auf dem TYPO3Camp Berlin 2012FLOW3 Einführung auf dem TYPO3Camp Berlin 2012
FLOW3 Einführung auf dem TYPO3Camp Berlin 2012
 
Get into the FLOW with Extbase
Get into the FLOW with ExtbaseGet into the FLOW with Extbase
Get into the FLOW with Extbase
 
Domain-driven design - eine Einführung
Domain-driven design - eine EinführungDomain-driven design - eine Einführung
Domain-driven design - eine Einführung
 
FLOW3: Security mit AOP
FLOW3: Security mit AOPFLOW3: Security mit AOP
FLOW3: Security mit AOP
 
Weaving aspects in PHP with the help of Go! AOP library
Weaving aspects in PHP with the help of Go! AOP libraryWeaving aspects in PHP with the help of Go! AOP library
Weaving aspects in PHP with the help of Go! AOP library
 
A Practical Guide to Domain Driven Design: Presentation Slides
A Practical Guide to Domain Driven Design: Presentation SlidesA Practical Guide to Domain Driven Design: Presentation Slides
A Practical Guide to Domain Driven Design: Presentation Slides
 
Brand New World
Brand New WorldBrand New World
Brand New World
 

Similar to FLOW3, Extbase & Fluid cook book

Prefixルーティングとthemeのススメ
PrefixルーティングとthemeのススメPrefixルーティングとthemeのススメ
Prefixルーティングとthemeのススメ
Shusuke Otomo
 
8 things to know about theming in drupal 8
8 things to know about theming in drupal 88 things to know about theming in drupal 8
8 things to know about theming in drupal 8
Logan Farr
 
Anatomy of a reusable module
Anatomy of a reusable moduleAnatomy of a reusable module
Anatomy of a reusable module
Alessandro Franceschi
 
WordPress Structure and Best Practices
WordPress Structure and Best PracticesWordPress Structure and Best Practices
WordPress Structure and Best Practices
markparolisi
 
Alfredo-PUMEX
Alfredo-PUMEXAlfredo-PUMEX
Alfredo-PUMEX
tutorialsruby
 
Alfredo-PUMEX
Alfredo-PUMEXAlfredo-PUMEX
Alfredo-PUMEX
tutorialsruby
 
Alfredo-PUMEX
Alfredo-PUMEXAlfredo-PUMEX
Alfredo-PUMEX
tutorialsruby
 
Alfredo-PUMEX
Alfredo-PUMEXAlfredo-PUMEX
Alfredo-PUMEX
tutorialsruby
 
CodeIgniter PHP MVC Framework
CodeIgniter PHP MVC FrameworkCodeIgniter PHP MVC Framework
CodeIgniter PHP MVC Framework
Bo-Yi Wu
 
Drupal 8 Every Day: An Intro to Developing With Drupal 8
Drupal 8 Every Day: An Intro to Developing With Drupal 8Drupal 8 Every Day: An Intro to Developing With Drupal 8
Drupal 8 Every Day: An Intro to Developing With Drupal 8
Acquia
 
Web applications with Catalyst
Web applications with CatalystWeb applications with Catalyst
Web applications with Catalyst
svilen.ivanov
 
How to connect redis and mule esb using spring data redis module
How to connect redis and mule esb using spring data redis moduleHow to connect redis and mule esb using spring data redis module
How to connect redis and mule esb using spring data redis module
Priyobroto Ghosh (Mule ESB Certified)
 
Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2
Hugo Hamon
 
Implement rich snippets in your webshop
Implement rich snippets in your webshopImplement rich snippets in your webshop
Implement rich snippets in your webshop
Arjen Miedema
 
Organize directories for applications with front-end and back-end with yii - ...
Organize directories for applications with front-end and back-end with yii - ...Organize directories for applications with front-end and back-end with yii - ...
Organize directories for applications with front-end and back-end with yii - ...
Framgia Vietnam
 
[Laptrinh.vn] lap trinh Spring Framework 3
[Laptrinh.vn] lap trinh Spring Framework 3[Laptrinh.vn] lap trinh Spring Framework 3
[Laptrinh.vn] lap trinh Spring Framework 3
Huu Dat Nguyen
 
D7 theming what's new - London
D7 theming what's new - LondonD7 theming what's new - London
D7 theming what's new - London
Marek Sotak
 
The Flexibility of Drupal 8 | DCNLights 2017
The Flexibility of Drupal 8 | DCNLights 2017The Flexibility of Drupal 8 | DCNLights 2017
The Flexibility of Drupal 8 | DCNLights 2017
Michael Miles
 
Drupal 8 Render Cache
Drupal 8 Render CacheDrupal 8 Render Cache
Drupal 8 Render Cache
Erik Stielstra
 
Laravel 8 export data as excel file with example
Laravel 8 export data as excel file with exampleLaravel 8 export data as excel file with example
Laravel 8 export data as excel file with example
Katy Slemon
 

Similar to FLOW3, Extbase & Fluid cook book (20)

Prefixルーティングとthemeのススメ
PrefixルーティングとthemeのススメPrefixルーティングとthemeのススメ
Prefixルーティングとthemeのススメ
 
8 things to know about theming in drupal 8
8 things to know about theming in drupal 88 things to know about theming in drupal 8
8 things to know about theming in drupal 8
 
Anatomy of a reusable module
Anatomy of a reusable moduleAnatomy of a reusable module
Anatomy of a reusable module
 
WordPress Structure and Best Practices
WordPress Structure and Best PracticesWordPress Structure and Best Practices
WordPress Structure and Best Practices
 
Alfredo-PUMEX
Alfredo-PUMEXAlfredo-PUMEX
Alfredo-PUMEX
 
Alfredo-PUMEX
Alfredo-PUMEXAlfredo-PUMEX
Alfredo-PUMEX
 
Alfredo-PUMEX
Alfredo-PUMEXAlfredo-PUMEX
Alfredo-PUMEX
 
Alfredo-PUMEX
Alfredo-PUMEXAlfredo-PUMEX
Alfredo-PUMEX
 
CodeIgniter PHP MVC Framework
CodeIgniter PHP MVC FrameworkCodeIgniter PHP MVC Framework
CodeIgniter PHP MVC Framework
 
Drupal 8 Every Day: An Intro to Developing With Drupal 8
Drupal 8 Every Day: An Intro to Developing With Drupal 8Drupal 8 Every Day: An Intro to Developing With Drupal 8
Drupal 8 Every Day: An Intro to Developing With Drupal 8
 
Web applications with Catalyst
Web applications with CatalystWeb applications with Catalyst
Web applications with Catalyst
 
How to connect redis and mule esb using spring data redis module
How to connect redis and mule esb using spring data redis moduleHow to connect redis and mule esb using spring data redis module
How to connect redis and mule esb using spring data redis module
 
Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2
 
Implement rich snippets in your webshop
Implement rich snippets in your webshopImplement rich snippets in your webshop
Implement rich snippets in your webshop
 
Organize directories for applications with front-end and back-end with yii - ...
Organize directories for applications with front-end and back-end with yii - ...Organize directories for applications with front-end and back-end with yii - ...
Organize directories for applications with front-end and back-end with yii - ...
 
[Laptrinh.vn] lap trinh Spring Framework 3
[Laptrinh.vn] lap trinh Spring Framework 3[Laptrinh.vn] lap trinh Spring Framework 3
[Laptrinh.vn] lap trinh Spring Framework 3
 
D7 theming what's new - London
D7 theming what's new - LondonD7 theming what's new - London
D7 theming what's new - London
 
The Flexibility of Drupal 8 | DCNLights 2017
The Flexibility of Drupal 8 | DCNLights 2017The Flexibility of Drupal 8 | DCNLights 2017
The Flexibility of Drupal 8 | DCNLights 2017
 
Drupal 8 Render Cache
Drupal 8 Render CacheDrupal 8 Render Cache
Drupal 8 Render Cache
 
Laravel 8 export data as excel file with example
Laravel 8 export data as excel file with exampleLaravel 8 export data as excel file with example
Laravel 8 export data as excel file with example
 

Recently uploaded

Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfAI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
Techgropse Pvt.Ltd.
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 

Recently uploaded (20)

Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfAI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 

FLOW3, Extbase & Fluid cook book

  • 1. FLOW3, Extbase & Fluid cook book June 15th 2012, Québec
  • 3.
  • 6. DDD
  • 7. D D D omain riven esign
  • 9. DRY
  • 10. D R Y on‘t epeat ourself
  • 12. KISS
  • 13. K IS S eep t imple tupid
  • 14. 1. Put your site in an Extension/Package In Phoenix: „MyWebsiteCom“ Protect private folders with .htaccess files: deny from all
  • 15. 2. Use Fluid for your site template page = PAGE page { typeNum = 0 10 = FLUIDTEMPLATE 10.file = EXT:my_website_com/Resources/Private/Templates/Site.html 10 { } file = EXT:my_website_com/Resources/Private/Templates/Site.html extbase.controllerExtensionName = MyWebsiteCom } } Specify extension name/package key for localisation & resources Phoenix: page = TYPO3.TYPO3:Page page.body.templatePath = 'resource://MyWebsiteCom/Private/Templates/Site.html'
  • 16. DEMO
  • 17. 3. Layouts Solution 1: different templates page { … 10 = FLUIDTEMPLATE 10 { … file = CASE file { key.data = levelfield:-1,backend_layout_next_level,slide key.override.field = backend_layout default = TEXT default.value = EXT:my_website_com/…/Default.html 2 = TEXT 2.value = EXT:my_website_com/…/Wide.html } }
  • 18. 3. Layouts Solution 2: CSS page { … bodyTagCObject = CASE bodyTagCObject { key.data = levelfield:-1,backend_layout_next_level,slide key.override.field = backend_layout default = TEXT default.value = <body> 2 = TEXT 2.value = <body class="wide"> } } Very clean, but not always possible
  • 19. 3. Layouts Solution 3: Partials 10 { … variables { … layout = CASE layout { key.data = levelfield:-1,backend_layout_next_level,slide key.override.field = backend_layout default = TEXT default.value = Default 2 = TEXT 2.value = Wide } } } Site.html <f:render partial="Content{layout}" />
  • 20. DEMO
  • 22. 4. Continuously enhance model Templates/Paper.html <f:if condition="{paper.status} == 'accepted'"> <p>{paper.title} is accepted</p> </f:if> This will will not work! String comparison will be possible in Fluid! But it‘s mostly not needed.
  • 23. 4. Continuously enhance model Model/Paper.php /** * @return boolean */ public function isAccepted() { return $this->status === self::STATUS_ACCEPTED; } Templates/Paper.html <f:if condition="{paper.accepted} "> <p>{paper.title} is accepted</p> </f:if>
  • 24. DEMO
  • 25. 5. Encapsulate your hacks Controller/BookController.php public function tagCloudAction() { $books = $this->bookRepository->findAll(); $tags = array(); foreach ($books as $book) { foreach ($book->getTags() as $tag) { $tagCount = 1; if (isset($tags[$tag->getTitle()])) { $tagCount ++; $tags[$tag->getTitle()] = $tagCount; } } $this->view->assign(tags, $tags); }
  • 26. 5. Encapsulate your hacks Controller/BookController.php public function tagCloudAction() { $tags = $this->tagCloudService->createTagCloud()); $this->view->assign('tags', $tags); } TagCloudService interacts with Database directly Book/TagCloud.html <f:for each="{tags}" as="tag"> <span class="tag popularity-{tag.popularity}"> {tag.name} </span> </f:for>
  • 27. DEMO
  • 28. 6. Performance CACHING! Storage folder TSConfig: TCEMAIN.clearCacheCmd = 1,2,3 AJAX!
  • 29. DEMO