SlideShare a Scribd company logo
1 of 65
Download to read offline
T3CON09 Frankfurt - 12 September 2009   Inspiring people to
Fluid - Templating made easy            share
Fluid - Templating made easy
                 12.09.2009



Sebastian Kurfürst <sebastian@typo3.org>
TYPO3
                                 addict




                               Inspiring people to
Fluid - Templating made easy   share
TYPO3 v4 and v5


                     v4        v5




                                    Inspiring people to
Fluid - Templating made easy        share
Einordnung - v4, v5 -
                           Transition




                                                   Inspiring people to
Fluid - Templating made easy                       share
Why are good frameworks
       important?


                                 Inspiring people to
  Fluid - Templating made easy   share
We need only
        End-User
         features
                               No!
                                     Inspiring people to
Fluid - Templating made easy         share
We need
              End-User
              features

                               Inspiring people to
Fluid - Templating made easy   share
We need
             Developer
             features,
                too!
                               Inspiring people to
Fluid - Templating made easy   share
Developing should be fun!

                               Inspiring people to
Fluid - Templating made easy   share
Productivity will
                           increase




                                               Inspiring people to
Fluid - Templating made easy                   share
Inspiring people to
Fluid - Templating made easy   share
What is a Template Engine?
          Data
         Data                           Template
         Data




                      Template Engine


                        rendered data
                            Data
                           Data
                                         Inspiring people to
Fluid - Templating made easy             share
Inspiring people to
Fluid - Templating made easy   share
Why another template engine?




                               Inspiring people to
Fluid - Templating made easy   share
Inspiring people to
Fluid - Templating made easy   share
Goals of Fluid




                                   Inspiring people to
Fluid - Templating made easy       share
The Zen of
              Templating



simple   powerful
                    http://www.sxc.hu/photo/821903
The Zen of
                  Templating



intuitive   easily extensible
                         http://www.sxc.hu/photo/821903
simple, elegant
                                                    template engine




http://www.flickr.com/photos/josefstuefer/9699426/
Help the template writer
     in many ways
Easy and clean
                  extensibility



http://www.sxc.hu/photo/338064
Support for different
  output formats
Goals of Fluid
    Simple, elegant template engine
    support for the template writer in many ways
    simple and clean extensibility
    different output formats possible




                                        Inspiring people to
Fluid - Templating made easy            share
Core
                                 Concepts

http://www.sxc.hu/photo/816749
Core Concepts

Variables
$this->view->assign(‘blogTitle’,
$blog->getTitle());


<h1>The name of the blog is:
{blogTitle}</h1>

                               Inspiring people to
Fluid - Templating made easy   share
Core Concepts

Object Accessors
$this->view->assign(‘blog’, $blog);
<h1>The name of the blog is:
         {blog.title}</h1>
Author: {blog.author}
                               $blog->getAuthor();


                                      Inspiring people to
Fluid - Templating made easy          share
Core Concepts

     ViewHelpers                    namespace
                                    declaration
     {namespace f=F3FluidViewHelpers}
v5


     <f:link.action action=“someAction“>
        Administration           ViewHelper
     </f:link>                   invocation



                                     Inspiring people to
     Fluid - Templating made easy    share
Core Concepts

     ViewHelpers                    namespace
                                    declaration
     {namespace f=Tx_Fluid_ViewHelpers}
v4


     <f:link.action action=“someAction“>
        Administration           ViewHelper
     </f:link>                   invocation



                                     Inspiring people to
     Fluid - Templating made easy    share
Fluid Core does not contain any output
    logic, and no control structures!
<f:...>

Every tag is a class!
v4



     {namespace f=Tx_Fluid_ViewHelpers}
             <f:for>...</f:for>
 Tx_Fluid_ViewHelpers_ForViewHelper
v5



      {namespace f=F3FluidViewHelpers}
              <f:for>...</f:for>
     F3FluidViewHelpersForViewHelper
v5



     {namespace f=F3FluidViewHelpers}
     <f:link.action>...</f:link.action>
F3FluidViewHelpersLinkActionViewHelper
Core Concepts

Arrays
<f:link.action action=“show“
  arguments=“{blog: blog, name:
‘Hello’}“>
  show posting
</f:link>


                               Inspiring people to
Fluid - Templating made easy   share
Core Concepts

Basic Ingredients
    Object accessors: {blog.title}
    ViewHelpers: <f:for each=“{blog.posts}“
    as=“post“>...</f:for>
    Arrays




                                         Inspiring people to
Fluid - Templating made easy             share
simple loop




     Fluid for
professionals
Forms


v4           v5
Fluid for professionals

 Forms
/**
 * Displays a form for creating a new blog
 *
 * @param F3BlogDomainModelBlog $newBlog A fresh blog object taken as a basis for the rendering
 * @return string An HTML form for creating a new blog
 * @dontvalidate $newBlog
 */
public function newAction(F3BlogDomainModelBlog $newBlog = NULL) {
       $this->view->assign('newBlog', $newBlog);
}

/**
 * Creates a new blog
 *
 * @param F3BlogDomainModelBlog $newBlog A fresh Blog object which has not yet been added to the repository
 * @return void
 */
public function createAction(F3BlogDomainModelBlog $newBlog) {
       $this->blogRepository->add($newBlog);
       $this->pushFlashMessage('Your new blog was created.');
       $this->redirect('index');
}


                                                                                Inspiring people to
 Fluid - Templating made easy                                                  share
Fluid for professionals

     Forms
     <f:form method="post" action="create" object="{newBlog}" name="newBlog">
          <label for="identifier">Identifier<br />
          <f:form.textbox property="identifier" id="identifier" />
          <br />
          <label for="name">Title</label><br />
          <f:form.textbox property="title" id="title" />
          <br />
          <label for="description">Description</label><br />
          <f:form.textarea property="description" rows="2" cols="40"
id="description" />
          <br />
          <f:form.submit value="Create blog" />
     </f:form>
</f:section>

                                                        Inspiring people to
     Fluid - Templating made easy                       share
Fluid for professionals




Code Text




                               Inspiring people to
Fluid - Templating made easy   share
Fluid for professionals

 Forms
/**
 * Displays a form for creating a new blog
 *
 * @param F3BlogDomainModelBlog $newBlog A fresh blog object taken as a basis for the rendering
 * @return string An HTML form for creating a new blog
 * @dontvalidate $newBlog
 */
public function newAction(F3BlogDomainModelBlog $newBlog = NULL) {
       $this->view->assign('newBlog', $newBlog);
}

/**
 * Creates a new blog
 *
 * @param F3BlogDomainModelBlog $newBlog A fresh Blog object which has not yet been added to the repository
 * @return void
 */
public function createAction(F3BlogDomainModelBlog $newBlog) {
       $this->blogRepository->add($newBlog);
       $this->pushFlashMessage('Your new blog was created.');
       $this->redirect('index');
}


                                                                                Inspiring people to
 Fluid - Templating made easy                                                  share
Fluid for professionals

 Forms
/**
 * Displays a form for creating a new blog
 *
 * @param F3BlogDomainModelBlog $newBlog A fresh blog object taken as a basis for the rendering
 * @return string An HTML form for creating a new blog
 * @dontvalidate $newBlog
 */
public function newAction(F3BlogDomainModelBlog $newBlog = NULL) {
       $this->view->assign('newBlog', $newBlog);
}

/**
 * Creates a new blog
 *
 * @param F3BlogDomainModelBlog $newBlog A fresh Blog object which has not yet been added to the repository
 * @return void
 */
public function createAction(F3BlogDomainModelBlog $newBlog) {
       $this->blogRepository->add($newBlog);
       $this->pushFlashMessage('Your new blog was created.');
       $this->redirect('index');
}


                                                                                Inspiring people to
 Fluid - Templating made easy                                                  share
Layouts




                                     Inspiring people to
Fluid - Templating made easy         share
Layouts


v4             v5
Fluid for professionals

Layouts
<f:layout name="master" />
<f:section name="main">
  <h1> My content</h1>
</f:section>




                               Inspiring people to
Fluid - Templating made easy   share
Fluid for professionals

Layouts
<html> ...
<body>
  <f:render section="main" />
</body>




                               Inspiring people to
Fluid - Templating made easy   share
Custom ViewHelpers




                               Inspiring people to
Fluid - Templating made easy   share
Custom ViewHelpers

v4   Task: Gravatar ViewHelper
         should take an e-mail address and output the
         gravatar image, if any.
         Expected output:
         <img src=“http://www.gravatar.com/avatar/md5
         ($email).jpg“ />




                                             Inspiring people to
     Fluid - Templating made easy            share
Custom ViewHelpers

v4   Task: Gravatar ViewHelper
         Expected usage:

         {namespace blog=Tx_Blog_ViewHelpers}
         <blog:gravatar email=“sebastian@typo3.org“ />




                                            Inspiring people to
     Fluid - Templating made easy           share
Custom ViewHelpers

v4   1. Create a ViewHelper skeleton
     class Tx_Blog_ViewHelpers_GravatarViewHelper
       extends Tx_Fluid_Core_AbstractViewHelper {
        public function render() {
           return ‘Hello World‘;
        }
     }




                                           Inspiring people to
     Fluid - Templating made easy          share
Custom ViewHelpers

v4     Implement the ViewHelper!
                              The PHPDoc must
     /**                    exist (for validation)

      * @param string $email The email to render as gravatar
      */
     public function render($email) {
        return ‘http://www.gravatar.com/gravatar/‘ . md5($email);
     }
                                           All method parameters will be
                                               ViewHelper arguments
                                                   automatically




                                                               Inspiring people to
       Fluid - Templating made easy                            share
Fluid internals

                        TemplateView        View Helpers (Tags)
v5           v4      TemplateView       View Helpers (Tags)


     v5 v4                         Fluid Core




                                                 Inspiring people to
 Fluid - Templating made easy                    share
http://www.sxc.hu/photo/1132907
Autocompletion
Balance
????
   ??
   ??
    ?
 ??
  ?
 ?
inspiring people to share.

More Related Content

Viewers also liked

Avatar Minihompy Proposal
Avatar Minihompy ProposalAvatar Minihompy Proposal
Avatar Minihompy ProposalJeongha Lee
 
Lineamientos para el uso y aplicacion de los recursos educativos digitales
Lineamientos para el uso y aplicacion de los recursos educativos digitalesLineamientos para el uso y aplicacion de los recursos educativos digitales
Lineamientos para el uso y aplicacion de los recursos educativos digitalesCarlos Alzate
 
36th auction for old stocks ands bonds / Scripophily / Historische Wertpapier...
36th auction for old stocks ands bonds / Scripophily / Historische Wertpapier...36th auction for old stocks ands bonds / Scripophily / Historische Wertpapier...
36th auction for old stocks ands bonds / Scripophily / Historische Wertpapier...Matthias Schmitt
 
Marketing de atracción 2.0 (Inbound Marketing) - Oscar del Santo y Daniel Álv...
Marketing de atracción 2.0 (Inbound Marketing) - Oscar del Santo y Daniel Álv...Marketing de atracción 2.0 (Inbound Marketing) - Oscar del Santo y Daniel Álv...
Marketing de atracción 2.0 (Inbound Marketing) - Oscar del Santo y Daniel Álv...Juan Carlos Mejía Llano
 
Pelan Hebat Produk Hebat e-naco
Pelan Hebat Produk Hebat e-nacoPelan Hebat Produk Hebat e-naco
Pelan Hebat Produk Hebat e-nacoSuccess Profile
 
Modelos de investigación cualitativa y cuantitativa
Modelos de investigación cualitativa y cuantitativaModelos de investigación cualitativa y cuantitativa
Modelos de investigación cualitativa y cuantitativaRaah Yhwh
 
Funciones mentales superiores 4 to trimestre psicologia
Funciones mentales superiores 4 to trimestre psicologiaFunciones mentales superiores 4 to trimestre psicologia
Funciones mentales superiores 4 to trimestre psicologiaUBA
 
Bob Dylan on Creativity
Bob Dylan on CreativityBob Dylan on Creativity
Bob Dylan on CreativityChris Landry
 
A Brief History of God
A Brief History of GodA Brief History of God
A Brief History of Godpiero scaruffi
 
Minna no-nihongo (práctica)
Minna no-nihongo (práctica)Minna no-nihongo (práctica)
Minna no-nihongo (práctica)Sophie Kisuki
 

Viewers also liked (15)

Avatar Minihompy Proposal
Avatar Minihompy ProposalAvatar Minihompy Proposal
Avatar Minihompy Proposal
 
Lineamientos para el uso y aplicacion de los recursos educativos digitales
Lineamientos para el uso y aplicacion de los recursos educativos digitalesLineamientos para el uso y aplicacion de los recursos educativos digitales
Lineamientos para el uso y aplicacion de los recursos educativos digitales
 
36th auction for old stocks ands bonds / Scripophily / Historische Wertpapier...
36th auction for old stocks ands bonds / Scripophily / Historische Wertpapier...36th auction for old stocks ands bonds / Scripophily / Historische Wertpapier...
36th auction for old stocks ands bonds / Scripophily / Historische Wertpapier...
 
Kotler pom 15e_inppt_09
Kotler pom 15e_inppt_09Kotler pom 15e_inppt_09
Kotler pom 15e_inppt_09
 
2013 july gac webinar for tom
2013 july gac webinar for tom2013 july gac webinar for tom
2013 july gac webinar for tom
 
Apnea pulmon
Apnea pulmonApnea pulmon
Apnea pulmon
 
Marketing de atracción 2.0 (Inbound Marketing) - Oscar del Santo y Daniel Álv...
Marketing de atracción 2.0 (Inbound Marketing) - Oscar del Santo y Daniel Álv...Marketing de atracción 2.0 (Inbound Marketing) - Oscar del Santo y Daniel Álv...
Marketing de atracción 2.0 (Inbound Marketing) - Oscar del Santo y Daniel Álv...
 
Pelan Hebat Produk Hebat e-naco
Pelan Hebat Produk Hebat e-nacoPelan Hebat Produk Hebat e-naco
Pelan Hebat Produk Hebat e-naco
 
Modelos de investigación cualitativa y cuantitativa
Modelos de investigación cualitativa y cuantitativaModelos de investigación cualitativa y cuantitativa
Modelos de investigación cualitativa y cuantitativa
 
Gymkana los derechos del niño
Gymkana los derechos del niñoGymkana los derechos del niño
Gymkana los derechos del niño
 
96084535 informe-final-serums
96084535 informe-final-serums96084535 informe-final-serums
96084535 informe-final-serums
 
Funciones mentales superiores 4 to trimestre psicologia
Funciones mentales superiores 4 to trimestre psicologiaFunciones mentales superiores 4 to trimestre psicologia
Funciones mentales superiores 4 to trimestre psicologia
 
Bob Dylan on Creativity
Bob Dylan on CreativityBob Dylan on Creativity
Bob Dylan on Creativity
 
A Brief History of God
A Brief History of GodA Brief History of God
A Brief History of God
 
Minna no-nihongo (práctica)
Minna no-nihongo (práctica)Minna no-nihongo (práctica)
Minna no-nihongo (práctica)
 

Similar to Fluid - Templating for professionals - T3CON09

T3CON11 - Extreme Fluid - Patrick Lobacher typovision
T3CON11 - Extreme Fluid - Patrick Lobacher typovision T3CON11 - Extreme Fluid - Patrick Lobacher typovision
T3CON11 - Extreme Fluid - Patrick Lobacher typovision die.agilen GmbH
 
Django Introduction & Tutorial
Django Introduction & TutorialDjango Introduction & Tutorial
Django Introduction & Tutorial之宇 趙
 
WebCenter Portal - Integrate Custom taskflows
WebCenter Portal - Integrate Custom taskflowsWebCenter Portal - Integrate Custom taskflows
WebCenter Portal - Integrate Custom taskflowsenpit GmbH & Co. KG
 
WebCenter Portal - Integrate Custom Taskflows
WebCenter Portal - Integrate Custom TaskflowsWebCenter Portal - Integrate Custom Taskflows
WebCenter Portal - Integrate Custom TaskflowsAndreas Koop
 
Accessibility & WordPress: Developing for the whole world.
Accessibility & WordPress: Developing for the whole world.Accessibility & WordPress: Developing for the whole world.
Accessibility & WordPress: Developing for the whole world.Joseph Dolson
 
Expression Engine Designer
Expression Engine   DesignerExpression Engine   Designer
Expression Engine DesignerMatias
 
Why ExpressionEngine is Great for Designers
Why ExpressionEngine is Great for DesignersWhy ExpressionEngine is Great for Designers
Why ExpressionEngine is Great for DesignersFortySeven Media
 
Ikenna Okpala: Scala's Lift Web Framework - 03/11/2010
Ikenna Okpala: Scala's Lift Web Framework - 03/11/2010Ikenna Okpala: Scala's Lift Web Framework - 03/11/2010
Ikenna Okpala: Scala's Lift Web Framework - 03/11/2010Skills Matter
 
WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1Yoav Farhi
 
Java EE & Glass Fish User Group: Digital JavaEE 7 - New and Noteworthy
Java EE & Glass Fish User Group: Digital JavaEE 7 - New and NoteworthyJava EE & Glass Fish User Group: Digital JavaEE 7 - New and Noteworthy
Java EE & Glass Fish User Group: Digital JavaEE 7 - New and NoteworthyPeter Pilgrim
 
JavaEE & GlassFish UG - Digital JavaEE 7 New & Noteworthy by P.Pilgrim
JavaEE & GlassFish UG - Digital JavaEE 7 New & Noteworthy by P.PilgrimJavaEE & GlassFish UG - Digital JavaEE 7 New & Noteworthy by P.Pilgrim
JavaEE & GlassFish UG - Digital JavaEE 7 New & Noteworthy by P.PilgrimPayara
 
How to create a local Android open source project mirror in 6 easy steps
How to create a local Android open source project mirror in 6 easy stepsHow to create a local Android open source project mirror in 6 easy steps
How to create a local Android open source project mirror in 6 easy stepsDeveo
 
Enable seo friendly url in websphere portal
Enable seo friendly url in websphere portalEnable seo friendly url in websphere portal
Enable seo friendly url in websphere portalmichele buccarello
 
Open Writing! Collaborative Authoring for CloudStack Documentation by Jessica...
Open Writing! Collaborative Authoring for CloudStack Documentation by Jessica...Open Writing! Collaborative Authoring for CloudStack Documentation by Jessica...
Open Writing! Collaborative Authoring for CloudStack Documentation by Jessica...buildacloud
 

Similar to Fluid - Templating for professionals - T3CON09 (20)

Fluid - The Zen of Templating
Fluid - The Zen of TemplatingFluid - The Zen of Templating
Fluid - The Zen of Templating
 
T3CON11 - Extreme Fluid - Patrick Lobacher typovision
T3CON11 - Extreme Fluid - Patrick Lobacher typovision T3CON11 - Extreme Fluid - Patrick Lobacher typovision
T3CON11 - Extreme Fluid - Patrick Lobacher typovision
 
Kickass
KickassKickass
Kickass
 
Django Introduction & Tutorial
Django Introduction & TutorialDjango Introduction & Tutorial
Django Introduction & Tutorial
 
WebCenter Portal - Integrate Custom taskflows
WebCenter Portal - Integrate Custom taskflowsWebCenter Portal - Integrate Custom taskflows
WebCenter Portal - Integrate Custom taskflows
 
WebCenter Portal - Integrate Custom Taskflows
WebCenter Portal - Integrate Custom TaskflowsWebCenter Portal - Integrate Custom Taskflows
WebCenter Portal - Integrate Custom Taskflows
 
Using Wireframes
Using WireframesUsing Wireframes
Using Wireframes
 
Accessibility & WordPress: Developing for the whole world.
Accessibility & WordPress: Developing for the whole world.Accessibility & WordPress: Developing for the whole world.
Accessibility & WordPress: Developing for the whole world.
 
Expression Engine Designer
Expression Engine   DesignerExpression Engine   Designer
Expression Engine Designer
 
Why ExpressionEngine is Great for Designers
Why ExpressionEngine is Great for DesignersWhy ExpressionEngine is Great for Designers
Why ExpressionEngine is Great for Designers
 
Lift
LiftLift
Lift
 
Ikenna Okpala: Scala's Lift Web Framework - 03/11/2010
Ikenna Okpala: Scala's Lift Web Framework - 03/11/2010Ikenna Okpala: Scala's Lift Web Framework - 03/11/2010
Ikenna Okpala: Scala's Lift Web Framework - 03/11/2010
 
Why Startups Are Still On AWS
Why Startups Are Still On AWSWhy Startups Are Still On AWS
Why Startups Are Still On AWS
 
WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1
 
Atomic design
Atomic designAtomic design
Atomic design
 
Java EE & Glass Fish User Group: Digital JavaEE 7 - New and Noteworthy
Java EE & Glass Fish User Group: Digital JavaEE 7 - New and NoteworthyJava EE & Glass Fish User Group: Digital JavaEE 7 - New and Noteworthy
Java EE & Glass Fish User Group: Digital JavaEE 7 - New and Noteworthy
 
JavaEE & GlassFish UG - Digital JavaEE 7 New & Noteworthy by P.Pilgrim
JavaEE & GlassFish UG - Digital JavaEE 7 New & Noteworthy by P.PilgrimJavaEE & GlassFish UG - Digital JavaEE 7 New & Noteworthy by P.Pilgrim
JavaEE & GlassFish UG - Digital JavaEE 7 New & Noteworthy by P.Pilgrim
 
How to create a local Android open source project mirror in 6 easy steps
How to create a local Android open source project mirror in 6 easy stepsHow to create a local Android open source project mirror in 6 easy steps
How to create a local Android open source project mirror in 6 easy steps
 
Enable seo friendly url in websphere portal
Enable seo friendly url in websphere portalEnable seo friendly url in websphere portal
Enable seo friendly url in websphere portal
 
Open Writing! Collaborative Authoring for CloudStack Documentation by Jessica...
Open Writing! Collaborative Authoring for CloudStack Documentation by Jessica...Open Writing! Collaborative Authoring for CloudStack Documentation by Jessica...
Open Writing! Collaborative Authoring for CloudStack Documentation by Jessica...
 

More from Sebastian Kurfürst

The Current State of TYPO3 Phoenix -- T3CON11
The Current State of TYPO3 Phoenix -- T3CON11The Current State of TYPO3 Phoenix -- T3CON11
The Current State of TYPO3 Phoenix -- T3CON11Sebastian Kurfürst
 
Workshop Extension-Entwicklung mit Extbase und Fluid
Workshop Extension-Entwicklung mit Extbase und FluidWorkshop Extension-Entwicklung mit Extbase und Fluid
Workshop Extension-Entwicklung mit Extbase und FluidSebastian Kurfürst
 
FLOW3 - der aktuelle Stand. TYPO3 Usergroup Dresden
FLOW3 - der aktuelle Stand. TYPO3 Usergroup DresdenFLOW3 - der aktuelle Stand. TYPO3 Usergroup Dresden
FLOW3 - der aktuelle Stand. TYPO3 Usergroup DresdenSebastian Kurfürst
 
Continuous Integration at T3CON08
Continuous Integration at T3CON08Continuous Integration at T3CON08
Continuous Integration at T3CON08Sebastian Kurfürst
 

More from Sebastian Kurfürst (8)

The Current State of TYPO3 Phoenix -- T3CON11
The Current State of TYPO3 Phoenix -- T3CON11The Current State of TYPO3 Phoenix -- T3CON11
The Current State of TYPO3 Phoenix -- T3CON11
 
FLOW3 Goes Semantic
FLOW3 Goes SemanticFLOW3 Goes Semantic
FLOW3 Goes Semantic
 
Advanced Fluid
Advanced FluidAdvanced Fluid
Advanced Fluid
 
Fluid for Designers
Fluid for DesignersFluid for Designers
Fluid for Designers
 
Workshop Extension-Entwicklung mit Extbase und Fluid
Workshop Extension-Entwicklung mit Extbase und FluidWorkshop Extension-Entwicklung mit Extbase und Fluid
Workshop Extension-Entwicklung mit Extbase und Fluid
 
MVC for TYPO3 4.3 with extbase
MVC for TYPO3 4.3 with extbaseMVC for TYPO3 4.3 with extbase
MVC for TYPO3 4.3 with extbase
 
FLOW3 - der aktuelle Stand. TYPO3 Usergroup Dresden
FLOW3 - der aktuelle Stand. TYPO3 Usergroup DresdenFLOW3 - der aktuelle Stand. TYPO3 Usergroup Dresden
FLOW3 - der aktuelle Stand. TYPO3 Usergroup Dresden
 
Continuous Integration at T3CON08
Continuous Integration at T3CON08Continuous Integration at T3CON08
Continuous Integration at T3CON08
 

Recently uploaded

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

Fluid - Templating for professionals - T3CON09

  • 1. T3CON09 Frankfurt - 12 September 2009 Inspiring people to Fluid - Templating made easy share
  • 2. Fluid - Templating made easy 12.09.2009 Sebastian Kurfürst <sebastian@typo3.org>
  • 3. TYPO3 addict Inspiring people to Fluid - Templating made easy share
  • 4. TYPO3 v4 and v5 v4 v5 Inspiring people to Fluid - Templating made easy share
  • 5.
  • 6. Einordnung - v4, v5 - Transition Inspiring people to Fluid - Templating made easy share
  • 7. Why are good frameworks important? Inspiring people to Fluid - Templating made easy share
  • 8. We need only End-User features No! Inspiring people to Fluid - Templating made easy share
  • 9. We need End-User features Inspiring people to Fluid - Templating made easy share
  • 10. We need Developer features, too! Inspiring people to Fluid - Templating made easy share
  • 11. Developing should be fun! Inspiring people to Fluid - Templating made easy share
  • 12. Productivity will increase Inspiring people to Fluid - Templating made easy share
  • 13. Inspiring people to Fluid - Templating made easy share
  • 14. What is a Template Engine? Data Data Template Data Template Engine rendered data Data Data Inspiring people to Fluid - Templating made easy share
  • 15. Inspiring people to Fluid - Templating made easy share
  • 16. Why another template engine? Inspiring people to Fluid - Templating made easy share
  • 17. Inspiring people to Fluid - Templating made easy share
  • 18. Goals of Fluid Inspiring people to Fluid - Templating made easy share
  • 19. The Zen of Templating simple powerful http://www.sxc.hu/photo/821903
  • 20. The Zen of Templating intuitive easily extensible http://www.sxc.hu/photo/821903
  • 21. simple, elegant template engine http://www.flickr.com/photos/josefstuefer/9699426/
  • 22. Help the template writer in many ways
  • 23. Easy and clean extensibility http://www.sxc.hu/photo/338064
  • 24. Support for different output formats
  • 25. Goals of Fluid Simple, elegant template engine support for the template writer in many ways simple and clean extensibility different output formats possible Inspiring people to Fluid - Templating made easy share
  • 26. Core Concepts http://www.sxc.hu/photo/816749
  • 27. Core Concepts Variables $this->view->assign(‘blogTitle’, $blog->getTitle()); <h1>The name of the blog is: {blogTitle}</h1> Inspiring people to Fluid - Templating made easy share
  • 28. Core Concepts Object Accessors $this->view->assign(‘blog’, $blog); <h1>The name of the blog is: {blog.title}</h1> Author: {blog.author} $blog->getAuthor(); Inspiring people to Fluid - Templating made easy share
  • 29. Core Concepts ViewHelpers namespace declaration {namespace f=F3FluidViewHelpers} v5 <f:link.action action=“someAction“> Administration ViewHelper </f:link> invocation Inspiring people to Fluid - Templating made easy share
  • 30. Core Concepts ViewHelpers namespace declaration {namespace f=Tx_Fluid_ViewHelpers} v4 <f:link.action action=“someAction“> Administration ViewHelper </f:link> invocation Inspiring people to Fluid - Templating made easy share
  • 31. Fluid Core does not contain any output logic, and no control structures!
  • 33. v4 {namespace f=Tx_Fluid_ViewHelpers} <f:for>...</f:for> Tx_Fluid_ViewHelpers_ForViewHelper
  • 34. v5 {namespace f=F3FluidViewHelpers} <f:for>...</f:for> F3FluidViewHelpersForViewHelper
  • 35. v5 {namespace f=F3FluidViewHelpers} <f:link.action>...</f:link.action> F3FluidViewHelpersLinkActionViewHelper
  • 36. Core Concepts Arrays <f:link.action action=“show“ arguments=“{blog: blog, name: ‘Hello’}“> show posting </f:link> Inspiring people to Fluid - Templating made easy share
  • 37. Core Concepts Basic Ingredients Object accessors: {blog.title} ViewHelpers: <f:for each=“{blog.posts}“ as=“post“>...</f:for> Arrays Inspiring people to Fluid - Templating made easy share
  • 38. simple loop Fluid for professionals
  • 39. Forms v4 v5
  • 40.
  • 41. Fluid for professionals Forms /** * Displays a form for creating a new blog * * @param F3BlogDomainModelBlog $newBlog A fresh blog object taken as a basis for the rendering * @return string An HTML form for creating a new blog * @dontvalidate $newBlog */ public function newAction(F3BlogDomainModelBlog $newBlog = NULL) { $this->view->assign('newBlog', $newBlog); } /** * Creates a new blog * * @param F3BlogDomainModelBlog $newBlog A fresh Blog object which has not yet been added to the repository * @return void */ public function createAction(F3BlogDomainModelBlog $newBlog) { $this->blogRepository->add($newBlog); $this->pushFlashMessage('Your new blog was created.'); $this->redirect('index'); } Inspiring people to Fluid - Templating made easy share
  • 42. Fluid for professionals Forms <f:form method="post" action="create" object="{newBlog}" name="newBlog"> <label for="identifier">Identifier<br /> <f:form.textbox property="identifier" id="identifier" /> <br /> <label for="name">Title</label><br /> <f:form.textbox property="title" id="title" /> <br /> <label for="description">Description</label><br /> <f:form.textarea property="description" rows="2" cols="40" id="description" /> <br /> <f:form.submit value="Create blog" /> </f:form> </f:section> Inspiring people to Fluid - Templating made easy share
  • 43. Fluid for professionals Code Text Inspiring people to Fluid - Templating made easy share
  • 44. Fluid for professionals Forms /** * Displays a form for creating a new blog * * @param F3BlogDomainModelBlog $newBlog A fresh blog object taken as a basis for the rendering * @return string An HTML form for creating a new blog * @dontvalidate $newBlog */ public function newAction(F3BlogDomainModelBlog $newBlog = NULL) { $this->view->assign('newBlog', $newBlog); } /** * Creates a new blog * * @param F3BlogDomainModelBlog $newBlog A fresh Blog object which has not yet been added to the repository * @return void */ public function createAction(F3BlogDomainModelBlog $newBlog) { $this->blogRepository->add($newBlog); $this->pushFlashMessage('Your new blog was created.'); $this->redirect('index'); } Inspiring people to Fluid - Templating made easy share
  • 45. Fluid for professionals Forms /** * Displays a form for creating a new blog * * @param F3BlogDomainModelBlog $newBlog A fresh blog object taken as a basis for the rendering * @return string An HTML form for creating a new blog * @dontvalidate $newBlog */ public function newAction(F3BlogDomainModelBlog $newBlog = NULL) { $this->view->assign('newBlog', $newBlog); } /** * Creates a new blog * * @param F3BlogDomainModelBlog $newBlog A fresh Blog object which has not yet been added to the repository * @return void */ public function createAction(F3BlogDomainModelBlog $newBlog) { $this->blogRepository->add($newBlog); $this->pushFlashMessage('Your new blog was created.'); $this->redirect('index'); } Inspiring people to Fluid - Templating made easy share
  • 46.
  • 47. Layouts Inspiring people to Fluid - Templating made easy share
  • 49. Fluid for professionals Layouts <f:layout name="master" /> <f:section name="main"> <h1> My content</h1> </f:section> Inspiring people to Fluid - Templating made easy share
  • 50. Fluid for professionals Layouts <html> ... <body> <f:render section="main" /> </body> Inspiring people to Fluid - Templating made easy share
  • 51.
  • 52. Custom ViewHelpers Inspiring people to Fluid - Templating made easy share
  • 53. Custom ViewHelpers v4 Task: Gravatar ViewHelper should take an e-mail address and output the gravatar image, if any. Expected output: <img src=“http://www.gravatar.com/avatar/md5 ($email).jpg“ /> Inspiring people to Fluid - Templating made easy share
  • 54. Custom ViewHelpers v4 Task: Gravatar ViewHelper Expected usage: {namespace blog=Tx_Blog_ViewHelpers} <blog:gravatar email=“sebastian@typo3.org“ /> Inspiring people to Fluid - Templating made easy share
  • 55. Custom ViewHelpers v4 1. Create a ViewHelper skeleton class Tx_Blog_ViewHelpers_GravatarViewHelper extends Tx_Fluid_Core_AbstractViewHelper { public function render() { return ‘Hello World‘; } } Inspiring people to Fluid - Templating made easy share
  • 56. Custom ViewHelpers v4 Implement the ViewHelper! The PHPDoc must /** exist (for validation) * @param string $email The email to render as gravatar */ public function render($email) { return ‘http://www.gravatar.com/gravatar/‘ . md5($email); } All method parameters will be ViewHelper arguments automatically Inspiring people to Fluid - Templating made easy share
  • 57.
  • 58. Fluid internals TemplateView View Helpers (Tags) v5 v4 TemplateView View Helpers (Tags) v5 v4 Fluid Core Inspiring people to Fluid - Templating made easy share
  • 61.
  • 63.
  • 64. ???? ?? ?? ? ?? ? ?