SlideShare una empresa de Scribd logo
1 de 50
Descargar para leer sin conexión
Inspiring people to
Advanced Fluid   share
Advanced Fluid
                2. October 2010


Sebastian Kurfürst <sebastian@typo3.org>
 Bastian Waidelich <bastian@typo3.org>
ttp://www.sxc.hu/photo/816749




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

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




                                                           Inspiring people to
Advanced Fluid                                             share
Object Accessors
    $this->view->assign(‘blog’, $blog);

    <h1>The name of the blog is: {blog.title}</h1>
                         Author: {blog.author}

    Getters are called automatically                 can be nested




                                                        Inspiring people to
Advanced Fluid                                          share
ViewHelpers                                                             Namespace
         Output logic is encapsulated in View Helpers (Tags)                 Declaration
         {namespace f=F3FluidViewHelpers}
v5
         <f:link.action action=“someAction“>Administration</f:link.action>

                                                                              Invocation of
v4       {namespace f=Tx_Fluid_ViewHelpers}                                       a tag
         <f:link.action action=“someAction“>Administration</f:link.action>

         Namespace f is included automatically




                                                                 Inspiring people to
     Advanced Fluid                                             share
Arrays
    <f:link action=“show“ arguments=“{blog: blog, name: ‘Hello’}“>show
    posting</f:link>

    JSON object syntax                             objects as
                                                arguments can be
                                                     used!




                                                          Inspiring people to
Advanced Fluid                                            share
Summary: Basic Ingredients
    Object accessors: {blog.title}

    ViewHelpers: <f:for each=“{blog.posts}“ as=“post“>...</f:for>

    Arrays




                                                             Inspiring people to
Advanced Fluid                                              share
http://www.flickr.com/photos/sackerman519/4248877127/




                                      Advanced Features
Forms - Edit Blog Post
                                          object bound
                                            to form

  <f:form action="update" object="{post}" name="post">
          <label for="author">Author</label><br />
          <f:form.textbox property="author.name" /><br />

         <label for="title">Title</label><br />
         <f:form.textbox property="title" /><br />

          <label for="content">Content</label><br />
          <f:form.textarea property="content" rows="5" cols="40" /><br />
  </f:form>
                                           property
                                            binding



                                                                   Inspiring people to
Advanced Fluid                                                     share
Forms - New Blog Post
                                               Used
                                           on Validation
                                               Error
  <f:form action="create" object="{newPost}" name="newPost">
          <label for="author">Author</label><br />
          <f:form.textbox property="author.name" /><br />

         <label for="title">Title</label><br />
         <f:form.textbox property="title" /><br />

          <label for="content">Content</label><br />
          <f:form.textarea property="content" rows="5" cols="40" /><br />
  </f:form>




                                                                   Inspiring people to
Advanced Fluid                                                     share
Cod
                e
<f:form action="update" object="{post}" name="post">                          <f:form action="create" object="{newPost}" name="newPost">




                                                 Dup
           <label for="author">Author</label><br />                                      <label for="author">Author</label><br />
           <f:form.textbox property="author.name" /><br />                               <f:form.textbox property="author.name" /><br />

            <label for="title">Title</label><br />                                        <label for="title">Title</label><br />




                                                                          lica
            <f:form.textbox property="title" /><br />                                     <f:form.textbox property="title" /><br />

            <label for="content">Content</label><br />                                    <label for="content">Content</label><br />




                                                                                                    tion
            <f:form.textarea property="content" rows="5" cols="40" /><br />               <f:form.textarea property="content" rows="5" cols="40" /><br />
</f:form>                                                                     </f:form>




                                                                                                                               !
Removing the Duplication
  <f:form action="create" object="{newPost}" name="newPost">
          <f:render partial="BlogPostForm" />
  </f:form>



  Resources/Private/Partials/BlogPostForm.html

  <label for="author">Author</label><br />
  <f:form.textbox property="author" /><br />

  <label for="title">Title</label><br />
  <f:form.textbox property="title" /><br />

  <label for="content">Content</label><br />
  <f:form.textarea property="content" rows="5" cols="40" /><br />




                                                                    Inspiring people to
Advanced Fluid                                                      share
Use Partials to
              remove Duplication

              Ausstecher-bild




Partials
remove
duplication
XSS
Improving the Edit Form
  <h2>{post.title}</h2>




                                          ?
  <f:form action="update" object="{post}" name="post">
         <f:render partial="BlogPostForm" />
  </f:form>




                                                     Inspiring people to
Advanced Fluid                                       share
Improving the Edit Form
  <h2><script> stealSessionAndSendTo('evil@drupal.org')</script></h2>


  <f:form action="update" object="{post}" name="post">
         <f:render partial="BlogPostForm" />
  </f:form>




                                                     Inspiring people to
Advanced Fluid                                       share
Improving the Edit Form
  <h2>{post.title}</h2>


  <f:form action="update" object="{post}" name="post">
         <f:render partial="BlogPostForm" />
  </f:form>

      Automatically
        Escaped!
                                                     Inspiring people to
Advanced Fluid                                       share
Secure by
  Default
Improving the Edit Form
  <h2>{post.title}</h2>
  <f:format.date format="Y-m-d">{post.date}</f:format.date>

  <f:form action="update" object="{post}" name="post">
         <f:render partial="BlogPostForm" />
  </f:form>




                                                     Inspiring people to
Advanced Fluid                                       share
Improving the Edit Form
  <h2>{post.title}</h2>
  {post.date -> f:format.date(format:"Y-m-d")}

  <f:form action="update" object="{post}" name="post">
         <f:render partial="BlogPostForm" />
  </f:form>




                                                     Inspiring people to
Advanced Fluid                                       share
Tag Syntax vs Inline Syntax
    <link rel="stylesheet" href="<f:uri.file path='myStyle.css' />" />

    <link rel="stylesheet" href="{f:uri.file(path: 'myStyle.css')}" />




  Both have their
    use-cases!
                                                      Inspiring people to
Advanced Fluid                                        share
Don't fear
the Inline
  Syntax!
        Sushi-Bild




                     sxc.hu: 1097400_18260778.jpg
Inspiring people to
Advanced Fluid   share
Render Date as Image
  <h2>{post.title}</h2>
  {post.date -> f:format.date(format:"Y-m-d")
             -> f:cObject(typoscriptObjectPath: 'lib.dateAsImage')}

  TypoScript

  lib.dateAsImage = IMAGE
  lib.dateAsImage {
                                Use TypoScript
                                where it makes
      file = GIFBUILDER
      file {
         10 = TEXT


  }
      }
         10.current = 1
                                    sense.
                                                         Inspiring people to
Advanced Fluid                                           share
Summary: Advanced Features
    Forms

    XSS Protection

    Inline Syntax

    cObject ViewHelper




                         Inspiring people to
Advanced Fluid           share
ToDo: Developing
                                             ViewHelpers
                                             -> Bild vom Kochen /
                                             Backen?

                                             MESSERBLOCK /
                                             Messer an wand




                                                                    Developing
                                                                    ViewHelpers
http://freerangestock.com/details.php?gid=37&pid=11545
Fluid Core does not contain any output
    logic, and no control structures!
<f:...>

Every tag is a class!
v5        {namespace f=F3FluidViewHelpers}
               <f:for>...</f:for>


     F3FluidViewHelpersForViewHelper
v4    {namespace f=Tx_Fluid_ViewHelpers}
           <f:for>...</f:for>


 Tx_Fluid_ViewHelpers_ForViewHelper
v4      {namespace f=Tx_Fluid_ViewHelpers}
     <f:link.action>...</f:link.action>


Tx_Fluid_ViewHelpers_Link_ActionViewHelper
AbstractViewHelper




AbstractTagBasedViewHelper       AbstractConditionViewHelper



                  AbstractWidgetViewHelper



                                             Inspiring people to
 Advanced Fluid                              share
AbstractViewHelper
{namespace blog=Tx_BlogExample_ViewHelpers}
<blog:greeting name="Kasper" />

class Tx_BlogExample_ViewHelpers_GreetingViewHelper
   extends ...AbstractViewHelper {

      /**
       * @param string name
       */
      public function render($name) {
         return 'Hello ' . $name;
      }
}

                                               Inspiring people to
Advanced Fluid                                 share
Example: <f:image src="myImage.png" width="200" />

    With AbstractViewHelper:
    public function render($src) {




                 XSS
       return '<img src="' . $src . '" />'; // TODO: Scaling
    }




Advanced Fluid
                                          !              Inspiring people to
                                                         share
TagBasedViewHelper
    Example: <f:image src="myImage.png" width="200" />

    With TagBasedViewHelper:

    protected $tagName = 'img';

    public function render($src) {
      $this->tag->addAttribute('src', $src);
      return $this->tag->render();
    }




                                               Inspiring people to
Advanced Fluid                                 share
TagBasedViewHelper
Additional Goodies
    Default Arguments: class, id, style, ...

    additionalAttributes

     <f:form.textbox
         additionalAttributes="{dojoType: 'dijit.form.TextBox'}" />




                                                      Inspiring people to
Advanced Fluid                                        share
IfViewHelper
    <f:if condition="{blog.posts}">
       <f:then>
          ... display blog posts ...
       </f:then>
       <f:else>
          No Blog Posts Available
       </f:else>
    </f:if>

    <li class="{f:if(condition: iteration.isFirst, then:
    'isFirstElement')}">Some Element</li>




                                                           Inspiring people to
Advanced Fluid                                             share
IfViewHelper
  class IfViewHelper extends ...AbstractConditionViewHelper {
        /**
         * @param boolean $condition View helper condition
         */
        public function render($condition) {
             if ($condition) {
                  return $this->renderThenChild();
             } else {
                  return $this->renderElseChild();
             }
        }
  }


                                                   Inspiring people to
Advanced Fluid                                     share
Widgets




                           Inspiring people to
Advanced Fluid             share
Sortable g
                               rid

                                          nd ar
                                     Ca le
         a ti on
 ag in                                            AJAX
P                                            Autoco
                                                    mpleti
                                                          on
           Widgets encapsulate
          complex (view-related)
              functionality.
                                             Alph
                      ps                          abe
              le   Ma                                     tica
                                                                   l lis
      Go   og                                                             ting


                                                    Inspiring people to
Advanced Fluid                                      share
It's simple to use them!




                              Inspiring people to
Advanced Fluid                share
It's simple to write them!




                              Inspiring people to
Advanced Fluid                share
http://www.sxc.hu/photo/983682

                                 Creating ViewHelpers is easy!
The Future
http://center.gordonswine.com /stuff/contentmgr/files/fce82a1b415a4b47138a8b5e58b74dc2/images/33_smoking_cosmos_on_the_bar.jpg
TA




                      Inspiring people to
Advanced Fluid        share
Autocompletion




                                  Inspiring people to
Advanced Fluid                    share
Autocompletion




                                  Inspiring people to
Advanced Fluid                    share
????
                    ??
                    ??
                     ?
                  ??
                   ?
                  ?


                         Inspiring people to
Advanced Fluid           share
inspiring people to share.

Más contenido relacionado

Similar a Advanced Fluid

HTML5, The Open Web, and what it means for you - Altran
HTML5, The Open Web, and what it means for you - AltranHTML5, The Open Web, and what it means for you - Altran
HTML5, The Open Web, and what it means for you - Altran
Robert Nyman
 

Similar a Advanced Fluid (20)

AnkaraJUG Kasım 2012 - PrimeFaces
AnkaraJUG Kasım 2012 - PrimeFacesAnkaraJUG Kasım 2012 - PrimeFaces
AnkaraJUG Kasım 2012 - PrimeFaces
 
WordPress Structure and Best Practices
WordPress Structure and Best PracticesWordPress Structure and Best Practices
WordPress Structure and Best Practices
 
Lecture1and2
Lecture1and2Lecture1and2
Lecture1and2
 
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
 
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine Development
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine DevelopmentEECI2009 - From Design to Dynamic - Rapid ExpressionEngine Development
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine Development
 
Schulung Fluid Templating
Schulung Fluid TemplatingSchulung Fluid Templating
Schulung Fluid Templating
 
Flask – Python
Flask – PythonFlask – Python
Flask – Python
 
TOSSUG HTML5 讀書會 新標籤與表單
TOSSUG HTML5 讀書會 新標籤與表單TOSSUG HTML5 讀書會 新標籤與表單
TOSSUG HTML5 讀書會 新標籤與表單
 
X tag with web components - joe ssekono
X tag with web components - joe ssekonoX tag with web components - joe ssekono
X tag with web components - joe ssekono
 
Deliverance talk at plone meetup
Deliverance talk at plone meetupDeliverance talk at plone meetup
Deliverance talk at plone meetup
 
An Introduction To HTML5
An Introduction To HTML5An Introduction To HTML5
An Introduction To HTML5
 
Hyperproductive JSF 2.0 @ JavaOne Brazil 2010
Hyperproductive JSF 2.0 @ JavaOne Brazil 2010Hyperproductive JSF 2.0 @ JavaOne Brazil 2010
Hyperproductive JSF 2.0 @ JavaOne Brazil 2010
 
Create a simple and elegant bootstrap registration page
Create a simple and elegant bootstrap registration pageCreate a simple and elegant bootstrap registration page
Create a simple and elegant bootstrap registration page
 
Stop reinventing the wheel: Build Responsive Websites Using Bootstrap
Stop reinventing the wheel: Build Responsive Websites Using BootstrapStop reinventing the wheel: Build Responsive Websites Using Bootstrap
Stop reinventing the wheel: Build Responsive Websites Using Bootstrap
 
HTML5, The Open Web, and what it means for you - Altran
HTML5, The Open Web, and what it means for you - AltranHTML5, The Open Web, and what it means for you - Altran
HTML5, The Open Web, and what it means for you - Altran
 
Intro to WordPress Plugin Development
Intro to WordPress Plugin DevelopmentIntro to WordPress Plugin Development
Intro to WordPress Plugin Development
 
Facebook Open Graph implementation in the Harvard Gazette
Facebook Open Graph implementation in the Harvard GazetteFacebook Open Graph implementation in the Harvard Gazette
Facebook Open Graph implementation in the Harvard Gazette
 
FLOW3, Extbase & Fluid cook book
FLOW3, Extbase & Fluid cook bookFLOW3, Extbase & Fluid cook book
FLOW3, Extbase & Fluid cook book
 
Jsf
JsfJsf
Jsf
 
Introduction to backbone presentation
Introduction to backbone presentationIntroduction to backbone presentation
Introduction to backbone presentation
 

Más de Sebastian Kurfürst

Más de Sebastian Kurfürst (9)

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
 
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
 
Fluid - Templating for professionals - T3CON09
Fluid - Templating for professionals - T3CON09Fluid - Templating for professionals - T3CON09
Fluid - Templating for professionals - T3CON09
 
Fluid - The Zen of Templating
Fluid - The Zen of TemplatingFluid - The Zen of Templating
Fluid - The Zen of Templating
 
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
 

Advanced Fluid

  • 2. Advanced Fluid 2. October 2010 Sebastian Kurfürst <sebastian@typo3.org> Bastian Waidelich <bastian@typo3.org>
  • 3. ttp://www.sxc.hu/photo/816749 Basic Ingredients
  • 4. Variables $this->view->assign(‘blogTitle’, $blog->getTitle()); <h1>The name of the blog is: {blogTitle}</h1> Inspiring people to Advanced Fluid share
  • 5. Object Accessors $this->view->assign(‘blog’, $blog); <h1>The name of the blog is: {blog.title}</h1> Author: {blog.author} Getters are called automatically can be nested Inspiring people to Advanced Fluid share
  • 6. ViewHelpers Namespace Output logic is encapsulated in View Helpers (Tags) Declaration {namespace f=F3FluidViewHelpers} v5 <f:link.action action=“someAction“>Administration</f:link.action> Invocation of v4 {namespace f=Tx_Fluid_ViewHelpers} a tag <f:link.action action=“someAction“>Administration</f:link.action> Namespace f is included automatically Inspiring people to Advanced Fluid share
  • 7. Arrays <f:link action=“show“ arguments=“{blog: blog, name: ‘Hello’}“>show posting</f:link> JSON object syntax objects as arguments can be used! Inspiring people to Advanced Fluid share
  • 8. Summary: Basic Ingredients Object accessors: {blog.title} ViewHelpers: <f:for each=“{blog.posts}“ as=“post“>...</f:for> Arrays Inspiring people to Advanced Fluid share
  • 10. Forms - Edit Blog Post object bound to form <f:form action="update" object="{post}" name="post"> <label for="author">Author</label><br /> <f:form.textbox property="author.name" /><br /> <label for="title">Title</label><br /> <f:form.textbox property="title" /><br /> <label for="content">Content</label><br /> <f:form.textarea property="content" rows="5" cols="40" /><br /> </f:form> property binding Inspiring people to Advanced Fluid share
  • 11. Forms - New Blog Post Used on Validation Error <f:form action="create" object="{newPost}" name="newPost"> <label for="author">Author</label><br /> <f:form.textbox property="author.name" /><br /> <label for="title">Title</label><br /> <f:form.textbox property="title" /><br /> <label for="content">Content</label><br /> <f:form.textarea property="content" rows="5" cols="40" /><br /> </f:form> Inspiring people to Advanced Fluid share
  • 12. Cod e <f:form action="update" object="{post}" name="post"> <f:form action="create" object="{newPost}" name="newPost"> Dup <label for="author">Author</label><br /> <label for="author">Author</label><br /> <f:form.textbox property="author.name" /><br /> <f:form.textbox property="author.name" /><br /> <label for="title">Title</label><br /> <label for="title">Title</label><br /> lica <f:form.textbox property="title" /><br /> <f:form.textbox property="title" /><br /> <label for="content">Content</label><br /> <label for="content">Content</label><br /> tion <f:form.textarea property="content" rows="5" cols="40" /><br /> <f:form.textarea property="content" rows="5" cols="40" /><br /> </f:form> </f:form> !
  • 13. Removing the Duplication <f:form action="create" object="{newPost}" name="newPost"> <f:render partial="BlogPostForm" /> </f:form> Resources/Private/Partials/BlogPostForm.html <label for="author">Author</label><br /> <f:form.textbox property="author" /><br /> <label for="title">Title</label><br /> <f:form.textbox property="title" /><br /> <label for="content">Content</label><br /> <f:form.textarea property="content" rows="5" cols="40" /><br /> Inspiring people to Advanced Fluid share
  • 14. Use Partials to remove Duplication Ausstecher-bild Partials remove duplication
  • 15. XSS Improving the Edit Form <h2>{post.title}</h2> ? <f:form action="update" object="{post}" name="post"> <f:render partial="BlogPostForm" /> </f:form> Inspiring people to Advanced Fluid share
  • 16. Improving the Edit Form <h2><script> stealSessionAndSendTo('evil@drupal.org')</script></h2> <f:form action="update" object="{post}" name="post"> <f:render partial="BlogPostForm" /> </f:form> Inspiring people to Advanced Fluid share
  • 17. Improving the Edit Form <h2>{post.title}</h2> <f:form action="update" object="{post}" name="post"> <f:render partial="BlogPostForm" /> </f:form> Automatically Escaped! Inspiring people to Advanced Fluid share
  • 18. Secure by Default
  • 19. Improving the Edit Form <h2>{post.title}</h2> <f:format.date format="Y-m-d">{post.date}</f:format.date> <f:form action="update" object="{post}" name="post"> <f:render partial="BlogPostForm" /> </f:form> Inspiring people to Advanced Fluid share
  • 20. Improving the Edit Form <h2>{post.title}</h2> {post.date -> f:format.date(format:"Y-m-d")} <f:form action="update" object="{post}" name="post"> <f:render partial="BlogPostForm" /> </f:form> Inspiring people to Advanced Fluid share
  • 21. Tag Syntax vs Inline Syntax <link rel="stylesheet" href="<f:uri.file path='myStyle.css' />" /> <link rel="stylesheet" href="{f:uri.file(path: 'myStyle.css')}" /> Both have their use-cases! Inspiring people to Advanced Fluid share
  • 22. Don't fear the Inline Syntax! Sushi-Bild sxc.hu: 1097400_18260778.jpg
  • 24. Render Date as Image <h2>{post.title}</h2> {post.date -> f:format.date(format:"Y-m-d") -> f:cObject(typoscriptObjectPath: 'lib.dateAsImage')} TypoScript lib.dateAsImage = IMAGE lib.dateAsImage { Use TypoScript where it makes file = GIFBUILDER file { 10 = TEXT } } 10.current = 1 sense. Inspiring people to Advanced Fluid share
  • 25. Summary: Advanced Features Forms XSS Protection Inline Syntax cObject ViewHelper Inspiring people to Advanced Fluid share
  • 26. ToDo: Developing ViewHelpers -> Bild vom Kochen / Backen? MESSERBLOCK / Messer an wand Developing ViewHelpers http://freerangestock.com/details.php?gid=37&pid=11545
  • 27. Fluid Core does not contain any output logic, and no control structures!
  • 29. v5 {namespace f=F3FluidViewHelpers} <f:for>...</f:for> F3FluidViewHelpersForViewHelper
  • 30. v4 {namespace f=Tx_Fluid_ViewHelpers} <f:for>...</f:for> Tx_Fluid_ViewHelpers_ForViewHelper
  • 31. v4 {namespace f=Tx_Fluid_ViewHelpers} <f:link.action>...</f:link.action> Tx_Fluid_ViewHelpers_Link_ActionViewHelper
  • 32. AbstractViewHelper AbstractTagBasedViewHelper AbstractConditionViewHelper AbstractWidgetViewHelper Inspiring people to Advanced Fluid share
  • 33. AbstractViewHelper {namespace blog=Tx_BlogExample_ViewHelpers} <blog:greeting name="Kasper" /> class Tx_BlogExample_ViewHelpers_GreetingViewHelper extends ...AbstractViewHelper { /** * @param string name */ public function render($name) { return 'Hello ' . $name; } } Inspiring people to Advanced Fluid share
  • 34. Example: <f:image src="myImage.png" width="200" /> With AbstractViewHelper: public function render($src) { XSS return '<img src="' . $src . '" />'; // TODO: Scaling } Advanced Fluid ! Inspiring people to share
  • 35. TagBasedViewHelper Example: <f:image src="myImage.png" width="200" /> With TagBasedViewHelper: protected $tagName = 'img'; public function render($src) { $this->tag->addAttribute('src', $src); return $this->tag->render(); } Inspiring people to Advanced Fluid share
  • 36. TagBasedViewHelper Additional Goodies Default Arguments: class, id, style, ... additionalAttributes <f:form.textbox additionalAttributes="{dojoType: 'dijit.form.TextBox'}" /> Inspiring people to Advanced Fluid share
  • 37. IfViewHelper <f:if condition="{blog.posts}"> <f:then> ... display blog posts ... </f:then> <f:else> No Blog Posts Available </f:else> </f:if> <li class="{f:if(condition: iteration.isFirst, then: 'isFirstElement')}">Some Element</li> Inspiring people to Advanced Fluid share
  • 38. IfViewHelper class IfViewHelper extends ...AbstractConditionViewHelper { /** * @param boolean $condition View helper condition */ public function render($condition) { if ($condition) { return $this->renderThenChild(); } else { return $this->renderElseChild(); } } } Inspiring people to Advanced Fluid share
  • 39. Widgets Inspiring people to Advanced Fluid share
  • 40.
  • 41. Sortable g rid nd ar Ca le a ti on ag in AJAX P Autoco mpleti on Widgets encapsulate complex (view-related) functionality. Alph ps abe le Ma tica l lis Go og ting Inspiring people to Advanced Fluid share
  • 42. It's simple to use them! Inspiring people to Advanced Fluid share
  • 43. It's simple to write them! Inspiring people to Advanced Fluid share
  • 44. http://www.sxc.hu/photo/983682 Creating ViewHelpers is easy!
  • 46. TA Inspiring people to Advanced Fluid share
  • 47. Autocompletion Inspiring people to Advanced Fluid share
  • 48. Autocompletion Inspiring people to Advanced Fluid share
  • 49. ???? ?? ?? ? ?? ? ? Inspiring people to Advanced Fluid share