SlideShare uma empresa Scribd logo
1 de 166
Baixar para ler offline
TYPO3 User Group Dresden - 21. Januar 2009   Inspiring people to
FLOW3 - der aktuelle Stand                   share
TYPO3 User Group Dresden - 21. Januar 2009   Inspiring people to
FLOW3 - der aktuelle Stand                   share
FLOW3 - Der aktuelle Stand
                        21.01.2009



Sebastian Kurfürst <sebastian@typo3.org>

      Vielen Dank an Robert Lemke für seine Slides
Inspiring people to
FLOW3 - der aktuelle Stand   share
Inspiring people to
FLOW3 - der aktuelle Stand   share
Inspiring people to
FLOW3 - der aktuelle Stand   share
Inspiring people to
FLOW3 - der aktuelle Stand   share
Inspiring people to
FLOW3 - der aktuelle Stand   share
Inspiring people to
FLOW3 - der aktuelle Stand   share
- ACHTUNG -
                             TYPO3-Evangelist




                               Inspiring people to
FLOW3 - der aktuelle Stand     share
Inhalt                             Test Driven
     TYPO3 - Einführung           Development

                                  Dependency
            FLOW3                  Injection

                                Aspektorientierte
                                Programmierung
Fluid - The Zen of Templating
                                 Domain Driven
  Synergien TYPO3 v4 und v5       Design & MVC

                                    Inspiring people to
FLOW3 - der aktuelle Stand          share
Inhalt                             Test Driven
     TYPO3 - Einführung           Development

                                  Dependency
            FLOW3                  Injection

                                Aspektorientierte
                                Programmierung
Fluid - The Zen of Templating
                                 Domain Driven
  Synergien TYPO3 v4 und v5       Design & MVC

                                    Inspiring people to
FLOW3 - der aktuelle Stand          share
TYPO3
    Open Source Content Management System

    Aktuelle stabile Version: TYPO3 4.2.3

    60.000 bis 80.000 Downloads pro Monat

    mehr als 30.000 Nutzer auf typo3.org registriert

    Höchste Verbreitung im Mittelstand, jedoch auch Nutzung in großen Firmen:
    Dassault Systems, 3M, Sixt, Unesco, Unicef, WWF




                                                                   Inspiring people to
FLOW3 - der aktuelle Stand                                         share
Die Geschichte von TYPO3
    seit 1998

    33 Kernentwickler

    bisher 500.000 Zeilen Code committed

    aktuelle Codebase: 300.000 Zeilen




                                           Inspiring people to
FLOW3 - der aktuelle Stand                 share
Warum benötigen wir TYPO3 v5?




                                     Inspiring people to
FLOW3 - der aktuelle Stand           share
TYPO3 Heute
    TYPO3 v4 ist nahezu vollständig ausgereift

    Letzte Releases: Fokus auf Usability-Verbesserungen für Benutzer




                                                                       Inspiring people to
FLOW3 - der aktuelle Stand                                         share
© K. Tuck at http://www.sxc.hu/photo/1135191




Gewachsene Architektur
TYPO3 Heute
    TYPO3 v4 ist nahezu vollständig ausgereift

    Letzte Releases: Fokus auf Usability-Verbesserungen für Benutzer

    Gewachsene Architektur, keine Unit Tests

    Große Änderungen sind daher risikoreich / unmöglich

    TYPO3 wird oft als Anwendungsframework verwendet - es ist jedoch ein CMS




                                                                       Inspiring people to
FLOW3 - der aktuelle Stand                                         share
TYPO3 in der Zukunft?




                             Inspiring people to
FLOW3 - der aktuelle Stand   share
Warum sollte man von Null anfangen?




                                   Inspiring people to
FLOW3 - der aktuelle Stand         share
Source: The Secret Archives of TYPO3
„We need a new framework!“
Zwei auf einen Streich




                             Inspiring people to
FLOW3 - der aktuelle Stand   share
TYPO3 in der Zukunft!


               TYPO3 v5      Enterprise CMS

                 FLOW3       Enterprise Application Framework




                                        Inspiring people to
FLOW3 - der aktuelle Stand              share
Inspiring people to
FLOW3 - der aktuelle Stand   share
Inhalt                             Test Driven
     TYPO3 - Einführung           Development

                                  Dependency
            FLOW3                  Injection

                                Aspektorientierte
                                Programmierung
Fluid - The Zen of Templating
                                 Domain Driven
  Synergien TYPO3 v4 und v5       Design & MVC

                                    Inspiring people to
FLOW3 - der aktuelle Stand          share
Flow [flō] (engl. fließen, rinnen, strömen)
                                    bedeutet das Gefühl des völligen Aufgehens in
                                    einer Tätigkeit. In diesem Zustand besteht
                                    völlige Harmonie zwischen dem limbischen
                                    System, das die Emotionen steuert, und dem
                                    kortikalen System, dem der Sitz für Bewusstsein
                                    und Verstand zugeordnet wird.




FLOW3 [flō'three] Das Web-
Anwendungsframework, welches
alle Schwierigkeiten löst, sodass
man sich auf das Wesentliche
konzentrieren kann.
                                               Inspiring people to
       FLOW3 - der aktuelle Stand              share                 http://www.sxc.hu/photo/768249
FLOW3 = Anwendungsframework
    Nicht nur eine Zusammenstellung von Komponenten oder eine „Snippet-Library“

    geliefert mit einsatzfähiger Standardkonfiguration

    Paketbasiert
                                  Alph
    benötigt mindestens PHP 5.3       a3
    mit einem mächtigen JSR-283-basierten Content Repository geliefert




                                                                  Inspiring people to
FLOW3 - der aktuelle Stand                                        share
Genieße das FLOW3-Erlebnis
    Intuitive APIs

    Lesbarer Quellcode (wie ein Buch)

    Konsistente Benennung für Klassen, Methoden und Eigenschaften




                                                                    Inspiring people to
FLOW3 - der aktuelle Stand                                          share
Fokus auf das
Wesentliche



  das Framework
  kümmert sich
  um den Rest
http://www.sxc.hu/photo/59950
Die Grundpfeiler von FLOW3



   Test Driven               Dependency   Aspect Oriented
  Development                 Injection    Programming




                                              Inspiring people to
FLOW3 - der aktuelle Stand                    share
Die Grundpfeiler von FLOW3


Test Driven Development

                             ... means that you write an automated test, then
                             you write just enough code to make that one
                             test pass, then you refactor the code primarily
                             to improve readability and remove duplication.
                                                                                                 «
                                                                Henrik Kniberg
                                                                       SCRUM and XP from the trenches



                                                             Inspiring people to
FLOW3 - der aktuelle Stand                                   share
Die Grundpfeiler von FLOW3


Test Driven Development
                  »          ... means that you write an automated test, then
                             you write just enough code to make that one
                             test pass, then you refactor the code primarily
                             to improve readability and remove duplication.
                                                                                                 «
                                                                Henrik Kniberg
                                                                       SCRUM and XP from the trenches



                                                             Inspiring people to
FLOW3 - der aktuelle Stand                                   share
Die Grundpfeiler von FLOW3


Test Driven Development

   Test Case          FAIL   Implementation   OK   Refactoring           OK




                                                          Inspiring people to
FLOW3 - der aktuelle Stand                                share
Die Grundpfeiler von FLOW3


Test Driven Development - Demonstration
      Eine Klasse schreiben, welche eine „square“-Methode besitzt. Diese multipliziert
      eine Zahl mit sich selbst und gibt das Ergebnis zurück.




                                                            Akademisches
                                                              Beispiel!



                                                                       Inspiring people to
FLOW3 - der aktuelle Stand                                             share
1. Test Case schreiben!
Achtung -   Neue Syntax:
 veraltete   F3MathHelpers::square()
Namespace-
  Syntax!
Der Test Case schlägt fehl.
2. Implementieren!
Der Test Case ...
Design-Probleme
 werden zeitiger
   gefunden!
Unit Tests sind ein
Auffangnetz für die
     Zukunft
Die Grundpfeiler von FLOW3


Test Driven Development
      zuerst Unit Tests schreiben, dann den zu testenden Code




                                                          Software-Designer

                                                          Programmierer


                                                                Inspiring people to
FLOW3 - der aktuelle Stand                                      share
Die Grundpfeiler von FLOW3


Dependency Injection
      Hollywood Principle: „Don‘t call us, we call you“

      Anwendung des „Inversion of Control“-Patterns für die Erzeugung und
      Initialisierung von Objekten




                                                                    Inspiring people to
FLOW3 - der aktuelle Stand                                          share
Die Grundpfeiler von FLOW3


 Ohne Dependency Injection
          BookingWeb                 public function __construct() {
            Service                    // Prototype
                                       $this->logger = new Logger();
                                       // oder als Singleton:
        <<create>>                     $this->logger = Logger->getInstance()
                                     }
Logger                    Objekt 3



                                                         Inspiring people to
 FLOW3 - der aktuelle Stand                              share
Die Grundpfeiler von FLOW3


     Ohne Dependency Injection
Wie schreibt man Unit Tests         public function __construct() {
für solch einen Code?                 // Prototype
                                      $this->logger = new Logger();
Wie entscheidet man zur Laufzeit,
welcher Logger instanziert wird?      // oder als Singleton:
                                      $this->logger = Logger->getInstance()
                                    }




                                                        Inspiring people to
     FLOW3 - der aktuelle Stand                         share
Die Grundpfeiler von FLOW3


 Mit Dependency Injection
          BookingWeb                   Jedes Objekt deklariert, welche anderen
            Service                    Objekte es benötigt

                                       Der IoC Container ...

                                          ... gibt dem Objekt fertig initialisierte
         <<needs>>                        Objekte

                                          ... entscheidet zur Laufzeit, welche
Logger                    Objekt 3        Klassen instanziert werden

                       IoC Container

                                                                Inspiring people to
 FLOW3 - der aktuelle Stand                                    share
Die Grundpfeiler von FLOW3


Mit Dependency Injection
      Constructor Injection

public function __construct(F3FLOW3LogLogger $logger) {
  $this->logger = $logger;
}                                            Das
                                      Framework
                                      injiziert den
                                         Logger



                                                     Inspiring people to
FLOW3 - der aktuelle Stand                           share
Die Grundpfeiler von FLOW3


Mit Dependency Injection
      Setter Injection

public function injectLogger(F3FLOW3LogLogger $logger) {
  $this->logger = $logger;
}                                            Das
                                      Framework
                                      injiziert den
                                         Logger



                                                     Inspiring people to
FLOW3 - der aktuelle Stand                           share
Die Grundpfeiler von FLOW3


Mit Dependency Injection
      Jede Klasse ist einzeln testbar, indem man die benötigten Abhängigkeiten mit
      Mocks / Stubs simuliert

      Man kann konfigurieren, ob Klassen sich wie Singletons oder Prototypes verhalten

         @scope singleton (Standard)

         @scope prototype




                                                                      Inspiring people to
FLOW3 - der aktuelle Stand                                           share
Die Grundpfeiler von FLOW3


 Mit Dependency Injection
       Man kann zur Laufzeit entscheiden, welche Klasse verwendet werden soll




BookingWeb                    LoggerInterface
  Service

                  FileLogger                DatabaseLogger



                                                                     Inspiring people to
 FLOW3 - der aktuelle Stand                                          share
Die Grundpfeiler von FLOW3


Aspektorientierte Programmierung
      AOP ist ein Programmierparadigma

      ergänzt OOP

      OOP modularisiert „concerns“ (Aufgabenbereiche): durch Pakete, Klassen,
      Methoden

      AOP: cross-cutting concerns




                                                                     Inspiring people to
FLOW3 - der aktuelle Stand                                           share
Aspektorientierte Programmierung


Cross-cutting concerns
                                   Presentation


                                     Domain


                                   Data source




                                                  Inspiring people to
FLOW3 - der aktuelle Stand                        share
Aspektorientierte Programmierung


Cross-cutting concerns
                                   Presentation
                                                  The concerns
                                                    live here

                                     Domain


                                   Data source




                                                             Inspiring people to
FLOW3 - der aktuelle Stand                                   share
Aspektorientierte Programmierung


Cross-cutting concerns


     Domain Model        Domain Model   Domain Model



                           Security
                           Logging
                                                       CONCERNS
                                                         X-ING



                                                            Inspiring people to
FLOW3 - der aktuelle Stand                                  share
Aspektorientierte Programmierung


PHP‘s fehlende Funktionalität
     Mit AOP kann man:

         alle „cross-cutting concerns“ zentralisieren und sauber separieren

         beliebige Methodenaufrufe abfangen

         neue Funktionalität zu Code hinzufügen, ohne diesen zu verändern

         ... viele weitere Tricks anwenden




                                                                       Inspiring people to
FLOW3 - der aktuelle Stand                                             share
Aspektorientierte Programmierung


Exkurs: Das Security-Framework
                 Presentation                             $customer->setName(...)
                                   changeCustomerAction
                                                                 Security Framework
                    Domain              Customer


                  Data source


                 Touchless Security!
                                                                    Inspiring people to
FLOW3 - der aktuelle Stand                                          share
FLOW3-Module
    AOP                      Locale        Reflection

    Object                   Log           Resource

    Configuration             MVC           Session

    Cache                    Package       Utility

    Error                    Persistence   Validation

    Event                    Property      ... und mehr



                                               Inspiring people to
FLOW3 - der aktuelle Stand                    share
Domain
                                 Driven
                                 Design




http://www.sxc.hu/photo/585791
Domain Driven Design
    Domäne = Aktivität oder Geschäft des Benutzers

    Es geht um...

       den Fokus auf die Domäne, und die Logik der Domäne

       die genaue Abbildung der Domänenregeln in Software

       das Schaffen einer universellen Sprache („Ubiquitous language“) zwischen den
       Projektmitgliedern




                                                                   Inspiring people to
FLOW3 - der aktuelle Stand                                         share
Der Turm zu Babel
Domain Driven Design


Ubiquitous language
     Gemeinsames Vokabular ist eine wichtige Grundvoraussetzung, um miteinander zu
     arbeiten

     Benutze die selben Wörter für Diskussion, Modellierung, Entwicklung und
     Dokumentation




                                                                     Inspiring people to
FLOW3 - der aktuelle Stand                                          share
Domain Driven Design


Beispiel: Phone Book




                             Inspiring people to
FLOW3 - der aktuelle Stand   share
Domain Driven Design


Beispiel: Phone Book




                  showEntries()
                  checkIfUserCanDeleteEntry()
                  exportPhoneBook()
                  logChanges()




                                                Inspiring people to
FLOW3 - der aktuelle Stand                      share
Domain Driven Design


  Beispiel: Phone Book




Nicht in der        showEntries()
PhoneBook-          checkIfUserCanDeleteEntry()
                    exportPhoneBook()
 Domäne!            logChanges()




                                                  Inspiring people to
  FLOW3 - der aktuelle Stand                      share
Domain Driven Design


Schichtenarchitektur

                             Presentation


                               Domain


                             Data source




                                            Inspiring people to
FLOW3 - der aktuelle Stand                  share
Domain Driven Design


Schichtenarchitektur

                       View
       Presentation
                       Controller

                       Application Logic (Service Layer)
          Domain
                       Domain Model (Domain Layer)

                       Data Mapper (part of Content Repository)
       Data source
                       Data Source Abstraction




                                                                  Inspiring people to
FLOW3 - der aktuelle Stand                                        share
Domain Driven Design


Schichtenarchitektur

                       View
       Presentation
                       Controller

                       Application Logic (Service Layer)
          Domain
                       Domain Model (Domain Layer)

                       Data Mapper (part of Content Repository)
       Data source
                       Data Source Abstraction




                                                                  Inspiring people to
FLOW3 - der aktuelle Stand                                        share
Model View Controller




                             Inspiring people to
FLOW3 - der aktuelle Stand   share
MVC


Model
      Objekt, welches Daten und Geschäftslogik einer bestimmten Domäne enthält

      enthält keine Informationen über die Darstellung der Daten, sondern definiert das
      Verhalten

      in FLOW3 nutzen wir Domain Models




                                                                     Inspiring people to
FLOW3 - der aktuelle Stand                                           share
MVC


View
      Darstellung des Models im Web oder in anderen Ausgabemedien

      Stellen nur Daten dar, verändern diese nicht.




                                                                    Inspiring people to
FLOW3 - der aktuelle Stand                                          share
MVC


Controller
      Reagiert auf Benutzereingaben

      Wählt das Model und verändert dieses wie benötigt

      Wählt den View aus und gibt diesem die Daten, die er rendern soll



      Der Standard-Controller für FLOW3 ist der ActionController




                                                                      Inspiring people to
FLOW3 - der aktuelle Stand                                            share
MVC und DDD mit FLOW3




                                        Inspiring people to
FLOW3 - der aktuelle Stand              share
DEMO

                              Inspiring people to
FLOW3 - der aktuelle Stand    share
MVC und DDD mit FLOW3


Dateistruktur




                             Inspiring people to
FLOW3 - der aktuelle Stand   share
MVC und DDD mit FLOW3


Domain Model




                             Inspiring people to
FLOW3 - der aktuelle Stand   share
MVC und DDD mit FLOW3


Domain Model




                             Inspiring people to
FLOW3 - der aktuelle Stand   share
MVC und DDD mit FLOW3


Domain Model




                             Inspiring people to
FLOW3 - der aktuelle Stand   share
MVC und DDD mit FLOW3


Domain Model




                             Inspiring people to
FLOW3 - der aktuelle Stand   share
MVC und DDD mit FLOW3


Domain Model




                             Inspiring people to
FLOW3 - der aktuelle Stand   share
MVC und DDD mit FLOW3


Aber - Persistenz?
     durch einen Persistence Manager werden Objekte gespeichert

     Transparent für den Programmierer




                                                                  Inspiring people to
FLOW3 - der aktuelle Stand                                        share
MVC und DDD mit FLOW3


Aber - Persistenz?
    Anwendung                        Anwendung

                        Persistence Manager

                  JSR-283 Content Repository

                        PDO                        ...

        MySQL                 Postgres           SQLite


                                                          Inspiring people to
FLOW3 - der aktuelle Stand                                share
DEMO

                              Inspiring people to
FLOW3 - der aktuelle Stand    share
MVC und DDD mit FLOW3


Controller
     Normal: Erben von F3FLOW3MVCControllerActionController

      public function indexAction() {
        // ...
      }
      public function listAction() {
        // ...
      }


                                                                   Inspiring people to
FLOW3 - der aktuelle Stand                                         share
MVC und DDD mit FLOW3


Controller-Argumente
     Jedes Argument muss explizit deklariert werden

     Zugriff auf $_GET, $_POST ist nicht erlaubt und wird abgefangen!




                                                                        Inspiring people to
FLOW3 - der aktuelle Stand                                              share
MVC und DDD mit FLOW3


Controller-Argumente                             Argumentregistrierung
     Argument-Mapping von einfachen Argumenten    wird noch schöner!
         public function initializeArguments() {
           $this->arguments->addNewArgument(“tag”, “Text“);
         }
         public function listByTagAction() {
           $tag = $this->arguments[‘tag’]->getValue();
           // $tag ist ein String!
         }


                                                       Inspiring people to
FLOW3 - der aktuelle Stand                             share
MVC und DDD mit FLOW3


Controller-Argumente
     Argument-Mapping von einfachen Argumenten
         public function initializeArguments() {
           $this->arguments->addNewArgument(“tag”, “UUID“);
         }
         public function listByTagAction() {
           $tag = $this->arguments[‘tag’]->getValue();
           // $tag ist eine UUID!
         }


                                                    Inspiring people to
FLOW3 - der aktuelle Stand                          share
MVC und DDD mit FLOW3


     Controller-Argumente
          Argument-Mapping von komplexen Argumenten
public function initializeArguments() {
  $this->arguments->addNewArgument(“comment”, “F3BlogDomainComment“);
}
public function addNewCommentAction() {
  $comment = $this->arguments[‘comment’]->getValue();
  // $comment ist ein Comment-Objekt!
}


                                                      Inspiring people to
     FLOW3 - der aktuelle Stand                       share
MVC und DDD mit FLOW3


View
     ... ist eine PHP-Klasse, welche von F3FLOW3MVCViewAbstractView erbt

     es gibt Standardklassen für marker-basierte Views, Smarty-basierte Views, und...

     Fluid!




                                                                     Inspiring people to
FLOW3 - der aktuelle Stand                                           share
Fluid - The Zen of Templating




                                       Inspiring people to
FLOW3 - der aktuelle Stand             share
Inhalt                             Test Driven
     TYPO3 - Einführung           Development

                                  Dependency
            FLOW3                  Injection

                                Aspektorientierte
                                Programmierung
Fluid - The Zen of Templating
                                 Domain Driven
  Synergien TYPO3 v4 und v5       Design & MVC

                                    Inspiring people to
FLOW3 - der aktuelle Stand          share
Fluid


Was ist eine Template-Engine?
        übernimmt die Darstellung von Daten

        lebt in der View-Komponente

        Bekannte Engines

          Smarty

          *TAL

          Velocity

        Designer schreiben kein PHP, sondern HTML

                                                    Inspiring people to
FLOW3 - der aktuelle Stand                          share
Source: http://en.wikipedia.org/wiki/Template_engine_(web)




                                                                 Inspiring people to
FLOW3 - der aktuelle Stand                                      share
Fluid


Nachteile existierender Template Engines
        nicht komplett OOP / brechen OOP-Paradigmen an einigen Stellen

        schwierig für nicht-HTML-basierte Templates nutzbar

        keine Autovervollständigung in Editoren

        nicht einfach erweiterbar




                                                                     Inspiring people to
FLOW3 - der aktuelle Stand                                           share
The Zen of
                   Templating



simpel   mächtig
                          http://www.sxc.hu/photo/821903
The Zen of
                    Templating



intuitiv   einfach erlernbar
                               http://www.sxc.hu/photo/821903
Einfachheit ist die ultimative Vollkommenheit.




                                                   Leonardo Da Vinci
                                                                          «
                                                    Inspiring people to
FLOW3 - der aktuelle Stand                          share
»      Einfachheit ist die ultimative Vollkommenheit.




                                                   Leonardo Da Vinci
                                                                          «
                                                    Inspiring people to
FLOW3 - der aktuelle Stand                          share
Fluid


Ziel
        Einfache, elegante Template Engine

        vielfältige Unterstützung für den Template-Schreiber

        einfache und saubere Erweiterbarkeit

        vielerlei Ausgabemedien möglich




                                                               Inspiring people to
FLOW3 - der aktuelle Stand                                     share
Fluid


Grundkonzepte
                                                            Namespace-
        Ausgabelogik ist in View Helpers (Tags) gekapselt   Deklaration
        {namespace f3=F3FluidViewHelpers}
        <f3:link action=“someAction“>Administrationsoberfläche</f3:link>

                                     Aufruf eines
                                         Tags


        Fluid Core enthält keine Ausgabelogik!


                                                                     Inspiring people to
FLOW3 - der aktuelle Stand                                           share
<f3:...>

Jeder Tag ist eine Klasse!
{namespace f3=F3FluidViewHelpers}
        <f3:link>...</f3:link>


F3FluidViewHelpersLinkViewHelper
{namespace f3=F3FluidViewHelpers}
           <f3:form.textbox />


F3FluidViewHelpersFormTextboxViewHelper
Fluid


Grundkonzepte
        Variablen


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

        <h1>Der Name des Blogs ist: {blogTitle}</h1>




                                                               Inspiring people to
FLOW3 - der aktuelle Stand                                     share
Fluid


Grundkonzepte
        Object Accessors


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

        <h1>Der Name des Blogs ist: {blog.title}</h1>
                            Autor: {blog.author}
                                                        Geht auch weiter
        Getter / Setter werden automatisch aufgerufen
                                                           verschachtelt



                                                               Inspiring people to
FLOW3 - der aktuelle Stand                                     share
Fluid


Grundkonzepte
        Arrays

        <f3:link action=“show“ arguments=“{id: blog.id, name: ‘Hallo’}“>Posting
        anzeigen</f3:link>

        JSON-Objektsyntax




                                                                        Inspiring people to
FLOW3 - der aktuelle Stand                                              share
Ein Beispiel




                                        Inspiring people to
FLOW3 - der aktuelle Stand              share
Fluid


Layouts
Fluid


Schleifen
Fluid


Autovervollständigung




                             Inspiring people to
FLOW3 - der aktuelle Stand   share
Fluid


Autovervollständigung
        Generierung von XML Schema aus Quellcode-Kommentaren

        funktioniert damit in allen XML-fähigen Editoren (z.B. Eclipse)




                                                                          Inspiring people to
FLOW3 - der aktuelle Stand                                                share
Fluid


Aufbau


                TemplateView      View Helpers (Tags)

                               Fluid Core




                                                    Inspiring people to
FLOW3 - der aktuelle Stand                          share
Fluid


Backport
        Fluid wird in TYPO3 4.4 integriert

        warscheinlich: Standalone-Lösung




                                             Inspiring people to
FLOW3 - der aktuelle Stand                   share
Fluid


Nächste Schritte
        Caching

        Tag-Library dokumentieren und ausbauen

        Portierung auf TYPO3 v4




                                                 Inspiring people to
FLOW3 - der aktuelle Stand                       share
Work in Progress
          http://www.sxc.hu/photo/956013
We need help!
         http://www.sxc.hu/photo/1132907
Fluid


Weitere Informationen
        http://forge.typo3.org/projects/package-fluid

        https://svn.typo3.org/FLOW3/Packages/Fluid




                                                       Inspiring people to
FLOW3 - der aktuelle Stand                             share
FLOW3 - der aktuelle Stand




                                          Inspiring people to
FLOW3 - der aktuelle Stand                share
Progress
              Progress

              Developing TYPO3 5.0 ...




                                         Inspiring people to
FLOW3 - der aktuelle Stand               share
Der aktuelle Stand
    AOP

    Object

    Configuration

    Cache

    Error

    Event

                   0         25   50   75   100


                                                  Inspiring people to
FLOW3 - der aktuelle Stand                        share
Der aktuelle Stand
    Locale

    Log

    MVC

    Package

    Persistence

    Property

                   0         25   50   75   100


                                                  Inspiring people to
FLOW3 - der aktuelle Stand                        share
Der aktuelle Stand
    Reflection

    Resource

    Session

    Utility

    Validation



                   0         25   50   75   100


                                                  Inspiring people to
FLOW3 - der aktuelle Stand                        share
Nächste Schritte
    erste FLOW3-Beta: In den nächsten 1-2 Monaten

    erste Pilotprojekte: jetzt

    Weiterentwicklung des CMS

    Geplanter Beta-Release von TYPO3 5.0: Ende 2009




                                                      Inspiring people to
FLOW3 - der aktuelle Stand                            share
Wir suchen...
    Fluid-Mitentwickler, Tester, ...

    FLOW3-Entwickler

    (bald) TYPO3 5.0 Mitentwickler




                                       Inspiring people to
FLOW3 - der aktuelle Stand             share
Weitere Informationen
    http://flow3.typo3.org

    http://flow3.typo3.org/documentation/reference

    https://svn.typo3.org/FLOW3/Distribution/trunk

    https://svn.typo3.org/FLOW3/Distribution/branches/BlogExample




                                                                    Inspiring people to
FLOW3 - der aktuelle Stand                                          share
Inhalt                             Test Driven
     TYPO3 - Einführung           Development

                                  Dependency
            FLOW3                  Injection

                                Aspektorientierte
                                Programmierung
Fluid - The Zen of Templating
                                 Domain Driven
  Synergien TYPO3 v4 und v5       Design & MVC

                                    Inspiring people to
FLOW3 - der aktuelle Stand          share
Synergien TYPO3 v4 und TYPO3 v5




                                  Inspiring people to
FLOW3 - der aktuelle Stand        share
Sollte ich überhaupt
 noch auf TYPO3 v4
       setzen?
- Ja. -
Ich bin verunsichert.
Was ist mit dem Aufwand,
   den ich in TYPO3 v4
     gesteckt habe?
TYPO3 Transition Days




                                         Inspiring people to
FLOW3 - der aktuelle Stand               share
TYPO3 Transition Days


The Berlin Manifesto
      We, the participants of the T3TD08 state that ...

         TYPO3 v4 continues to be actively developed
         v4 development will continue after the the
         release of v5
         Future releases of v4 will see its features
         converge with those in TYPO3 v5

                                                          Inspiring people to
FLOW3 - der aktuelle Stand                                share
TYPO3 Transition Days


The Berlin Manifesto
      We, the participants of the T3TD08 state that ...

         TYPO3 v5 will be the successor to TYPO3 v4
         Migration of content from TYPO3 v4 to TYPO3
         v5 will be easily possible




                                                          Inspiring people to
FLOW3 - der aktuelle Stand                                share
TYPO3 Transition Days


The Berlin Manifesto
      We, the participants of the T3TD08 state that ...

         TYPO3 v5 will introduce many new concepts
         and ideas. Learning never stops and we'll help
         with adequate resources to ensure a smooth
         transition.



                                                          Inspiring people to
FLOW3 - der aktuelle Stand                                share
Patrick Broens, Karsten Dambekalns, Dmitry Dulepov, Andreas
Förthner, Oliver Hader, Martin Herr, Christian Jul Jensen, Thorsten
Kahler, Steffen Kamper, Christian Kuhn, Sebastian Kurfürst, Martin
  Kutschker, Robert Lemke, Tobias Liebig, Benjamin Mack, Peter
Niederlag, Jochen Rau, Ingo Renner, Ingmar Schlecht, Jeff Segars,
                 Michael Stucki, Bastian Waidelich
TYPO3 v4 Entwickler    TYPO3 v5 Entwickler
             TYPO3-Entwickler
[ Video-Ausschnitt aus dem T3CAST ]
Synergien


Gemeinsame Roadmap




                             Inspiring people to
FLOW3 - der aktuelle Stand   share
Synergien


MVC-Framework in 4.3
     Das FLOW3-MVC-Framework wird auf Version 4.3 portiert

     Ziele:

            Neue Konzepte erlernbar machen

            Schon jetzt mit „FLOW3-Paradigmen“ programmieren




                                                               Inspiring people to
FLOW3 - der aktuelle Stand                                     share
Synergien


Fluid in 4.4
     Fluid wird für Templates und Extension-Entwickler zur Verfügung stehen

     Automatische Konvertierung vom Fluid-Kern

     An TYPO3 v4 angepasste Tags




                                                                    Inspiring people to
FLOW3 - der aktuelle Stand                                          share
Folien auf http://tug-dresden.de




                                      Inspiring people to
FLOW3 - der aktuelle Stand            share
??????
                                 ???
                              ???
                              ?


                                       Inspiring people to
FLOW3 - der aktuelle Stand             share
inspiring people to share.

Mais conteúdo relacionado

Mais de Sebastian Kurfürst

Mais 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
 
Advanced Fluid
Advanced FluidAdvanced Fluid
Advanced Fluid
 
Fluid for Designers
Fluid for DesignersFluid for Designers
Fluid for Designers
 
Schulung Fluid Templating
Schulung Fluid TemplatingSchulung Fluid Templating
Schulung Fluid Templating
 
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
 
Continuous Integration at T3CON08
Continuous Integration at T3CON08Continuous Integration at T3CON08
Continuous Integration at T3CON08
 

FLOW3 - der aktuelle Stand. TYPO3 Usergroup Dresden

  • 1. TYPO3 User Group Dresden - 21. Januar 2009 Inspiring people to FLOW3 - der aktuelle Stand share
  • 2. TYPO3 User Group Dresden - 21. Januar 2009 Inspiring people to FLOW3 - der aktuelle Stand share
  • 3. FLOW3 - Der aktuelle Stand 21.01.2009 Sebastian Kurfürst <sebastian@typo3.org> Vielen Dank an Robert Lemke für seine Slides
  • 4. Inspiring people to FLOW3 - der aktuelle Stand share
  • 5. Inspiring people to FLOW3 - der aktuelle Stand share
  • 6. Inspiring people to FLOW3 - der aktuelle Stand share
  • 7. Inspiring people to FLOW3 - der aktuelle Stand share
  • 8. Inspiring people to FLOW3 - der aktuelle Stand share
  • 9. Inspiring people to FLOW3 - der aktuelle Stand share
  • 10. - ACHTUNG - TYPO3-Evangelist Inspiring people to FLOW3 - der aktuelle Stand share
  • 11. Inhalt Test Driven TYPO3 - Einführung Development Dependency FLOW3 Injection Aspektorientierte Programmierung Fluid - The Zen of Templating Domain Driven Synergien TYPO3 v4 und v5 Design & MVC Inspiring people to FLOW3 - der aktuelle Stand share
  • 12. Inhalt Test Driven TYPO3 - Einführung Development Dependency FLOW3 Injection Aspektorientierte Programmierung Fluid - The Zen of Templating Domain Driven Synergien TYPO3 v4 und v5 Design & MVC Inspiring people to FLOW3 - der aktuelle Stand share
  • 13. TYPO3 Open Source Content Management System Aktuelle stabile Version: TYPO3 4.2.3 60.000 bis 80.000 Downloads pro Monat mehr als 30.000 Nutzer auf typo3.org registriert Höchste Verbreitung im Mittelstand, jedoch auch Nutzung in großen Firmen: Dassault Systems, 3M, Sixt, Unesco, Unicef, WWF Inspiring people to FLOW3 - der aktuelle Stand share
  • 14. Die Geschichte von TYPO3 seit 1998 33 Kernentwickler bisher 500.000 Zeilen Code committed aktuelle Codebase: 300.000 Zeilen Inspiring people to FLOW3 - der aktuelle Stand share
  • 15. Warum benötigen wir TYPO3 v5? Inspiring people to FLOW3 - der aktuelle Stand share
  • 16. TYPO3 Heute TYPO3 v4 ist nahezu vollständig ausgereift Letzte Releases: Fokus auf Usability-Verbesserungen für Benutzer Inspiring people to FLOW3 - der aktuelle Stand share
  • 17. © K. Tuck at http://www.sxc.hu/photo/1135191 Gewachsene Architektur
  • 18. TYPO3 Heute TYPO3 v4 ist nahezu vollständig ausgereift Letzte Releases: Fokus auf Usability-Verbesserungen für Benutzer Gewachsene Architektur, keine Unit Tests Große Änderungen sind daher risikoreich / unmöglich TYPO3 wird oft als Anwendungsframework verwendet - es ist jedoch ein CMS Inspiring people to FLOW3 - der aktuelle Stand share
  • 19. TYPO3 in der Zukunft? Inspiring people to FLOW3 - der aktuelle Stand share
  • 20. Warum sollte man von Null anfangen? Inspiring people to FLOW3 - der aktuelle Stand share
  • 21. Source: The Secret Archives of TYPO3
  • 22. „We need a new framework!“
  • 23. Zwei auf einen Streich Inspiring people to FLOW3 - der aktuelle Stand share
  • 24. TYPO3 in der Zukunft! TYPO3 v5 Enterprise CMS FLOW3 Enterprise Application Framework Inspiring people to FLOW3 - der aktuelle Stand share
  • 25. Inspiring people to FLOW3 - der aktuelle Stand share
  • 26. Inhalt Test Driven TYPO3 - Einführung Development Dependency FLOW3 Injection Aspektorientierte Programmierung Fluid - The Zen of Templating Domain Driven Synergien TYPO3 v4 und v5 Design & MVC Inspiring people to FLOW3 - der aktuelle Stand share
  • 27. Flow [flō] (engl. fließen, rinnen, strömen) bedeutet das Gefühl des völligen Aufgehens in einer Tätigkeit. In diesem Zustand besteht völlige Harmonie zwischen dem limbischen System, das die Emotionen steuert, und dem kortikalen System, dem der Sitz für Bewusstsein und Verstand zugeordnet wird. FLOW3 [flō'three] Das Web- Anwendungsframework, welches alle Schwierigkeiten löst, sodass man sich auf das Wesentliche konzentrieren kann. Inspiring people to FLOW3 - der aktuelle Stand share http://www.sxc.hu/photo/768249
  • 28. FLOW3 = Anwendungsframework Nicht nur eine Zusammenstellung von Komponenten oder eine „Snippet-Library“ geliefert mit einsatzfähiger Standardkonfiguration Paketbasiert Alph benötigt mindestens PHP 5.3 a3 mit einem mächtigen JSR-283-basierten Content Repository geliefert Inspiring people to FLOW3 - der aktuelle Stand share
  • 29. Genieße das FLOW3-Erlebnis Intuitive APIs Lesbarer Quellcode (wie ein Buch) Konsistente Benennung für Klassen, Methoden und Eigenschaften Inspiring people to FLOW3 - der aktuelle Stand share
  • 30. Fokus auf das Wesentliche das Framework kümmert sich um den Rest http://www.sxc.hu/photo/59950
  • 31. Die Grundpfeiler von FLOW3 Test Driven Dependency Aspect Oriented Development Injection Programming Inspiring people to FLOW3 - der aktuelle Stand share
  • 32. Die Grundpfeiler von FLOW3 Test Driven Development ... means that you write an automated test, then you write just enough code to make that one test pass, then you refactor the code primarily to improve readability and remove duplication. « Henrik Kniberg SCRUM and XP from the trenches Inspiring people to FLOW3 - der aktuelle Stand share
  • 33. Die Grundpfeiler von FLOW3 Test Driven Development » ... means that you write an automated test, then you write just enough code to make that one test pass, then you refactor the code primarily to improve readability and remove duplication. « Henrik Kniberg SCRUM and XP from the trenches Inspiring people to FLOW3 - der aktuelle Stand share
  • 34. Die Grundpfeiler von FLOW3 Test Driven Development Test Case FAIL Implementation OK Refactoring OK Inspiring people to FLOW3 - der aktuelle Stand share
  • 35. Die Grundpfeiler von FLOW3 Test Driven Development - Demonstration Eine Klasse schreiben, welche eine „square“-Methode besitzt. Diese multipliziert eine Zahl mit sich selbst und gibt das Ergebnis zurück. Akademisches Beispiel! Inspiring people to FLOW3 - der aktuelle Stand share
  • 36. 1. Test Case schreiben!
  • 37. Achtung - Neue Syntax: veraltete F3MathHelpers::square() Namespace- Syntax!
  • 38. Der Test Case schlägt fehl.
  • 41.
  • 43. Unit Tests sind ein Auffangnetz für die Zukunft
  • 44. Die Grundpfeiler von FLOW3 Test Driven Development zuerst Unit Tests schreiben, dann den zu testenden Code Software-Designer Programmierer Inspiring people to FLOW3 - der aktuelle Stand share
  • 45.
  • 46. Die Grundpfeiler von FLOW3 Dependency Injection Hollywood Principle: „Don‘t call us, we call you“ Anwendung des „Inversion of Control“-Patterns für die Erzeugung und Initialisierung von Objekten Inspiring people to FLOW3 - der aktuelle Stand share
  • 47. Die Grundpfeiler von FLOW3 Ohne Dependency Injection BookingWeb public function __construct() { Service // Prototype $this->logger = new Logger(); // oder als Singleton: <<create>> $this->logger = Logger->getInstance() } Logger Objekt 3 Inspiring people to FLOW3 - der aktuelle Stand share
  • 48. Die Grundpfeiler von FLOW3 Ohne Dependency Injection Wie schreibt man Unit Tests public function __construct() { für solch einen Code? // Prototype $this->logger = new Logger(); Wie entscheidet man zur Laufzeit, welcher Logger instanziert wird? // oder als Singleton: $this->logger = Logger->getInstance() } Inspiring people to FLOW3 - der aktuelle Stand share
  • 49. Die Grundpfeiler von FLOW3 Mit Dependency Injection BookingWeb Jedes Objekt deklariert, welche anderen Service Objekte es benötigt Der IoC Container ... ... gibt dem Objekt fertig initialisierte <<needs>> Objekte ... entscheidet zur Laufzeit, welche Logger Objekt 3 Klassen instanziert werden IoC Container Inspiring people to FLOW3 - der aktuelle Stand share
  • 50. Die Grundpfeiler von FLOW3 Mit Dependency Injection Constructor Injection public function __construct(F3FLOW3LogLogger $logger) { $this->logger = $logger; } Das Framework injiziert den Logger Inspiring people to FLOW3 - der aktuelle Stand share
  • 51. Die Grundpfeiler von FLOW3 Mit Dependency Injection Setter Injection public function injectLogger(F3FLOW3LogLogger $logger) { $this->logger = $logger; } Das Framework injiziert den Logger Inspiring people to FLOW3 - der aktuelle Stand share
  • 52. Die Grundpfeiler von FLOW3 Mit Dependency Injection Jede Klasse ist einzeln testbar, indem man die benötigten Abhängigkeiten mit Mocks / Stubs simuliert Man kann konfigurieren, ob Klassen sich wie Singletons oder Prototypes verhalten @scope singleton (Standard) @scope prototype Inspiring people to FLOW3 - der aktuelle Stand share
  • 53. Die Grundpfeiler von FLOW3 Mit Dependency Injection Man kann zur Laufzeit entscheiden, welche Klasse verwendet werden soll BookingWeb LoggerInterface Service FileLogger DatabaseLogger Inspiring people to FLOW3 - der aktuelle Stand share
  • 54.
  • 55. Die Grundpfeiler von FLOW3 Aspektorientierte Programmierung AOP ist ein Programmierparadigma ergänzt OOP OOP modularisiert „concerns“ (Aufgabenbereiche): durch Pakete, Klassen, Methoden AOP: cross-cutting concerns Inspiring people to FLOW3 - der aktuelle Stand share
  • 56. Aspektorientierte Programmierung Cross-cutting concerns Presentation Domain Data source Inspiring people to FLOW3 - der aktuelle Stand share
  • 57. Aspektorientierte Programmierung Cross-cutting concerns Presentation The concerns live here Domain Data source Inspiring people to FLOW3 - der aktuelle Stand share
  • 58. Aspektorientierte Programmierung Cross-cutting concerns Domain Model Domain Model Domain Model Security Logging CONCERNS X-ING Inspiring people to FLOW3 - der aktuelle Stand share
  • 59. Aspektorientierte Programmierung PHP‘s fehlende Funktionalität Mit AOP kann man: alle „cross-cutting concerns“ zentralisieren und sauber separieren beliebige Methodenaufrufe abfangen neue Funktionalität zu Code hinzufügen, ohne diesen zu verändern ... viele weitere Tricks anwenden Inspiring people to FLOW3 - der aktuelle Stand share
  • 60. Aspektorientierte Programmierung Exkurs: Das Security-Framework Presentation $customer->setName(...) changeCustomerAction Security Framework Domain Customer Data source Touchless Security! Inspiring people to FLOW3 - der aktuelle Stand share
  • 61.
  • 62. FLOW3-Module AOP Locale Reflection Object Log Resource Configuration MVC Session Cache Package Utility Error Persistence Validation Event Property ... und mehr Inspiring people to FLOW3 - der aktuelle Stand share
  • 63. Domain Driven Design http://www.sxc.hu/photo/585791
  • 64. Domain Driven Design Domäne = Aktivität oder Geschäft des Benutzers Es geht um... den Fokus auf die Domäne, und die Logik der Domäne die genaue Abbildung der Domänenregeln in Software das Schaffen einer universellen Sprache („Ubiquitous language“) zwischen den Projektmitgliedern Inspiring people to FLOW3 - der aktuelle Stand share
  • 65. Der Turm zu Babel
  • 66. Domain Driven Design Ubiquitous language Gemeinsames Vokabular ist eine wichtige Grundvoraussetzung, um miteinander zu arbeiten Benutze die selben Wörter für Diskussion, Modellierung, Entwicklung und Dokumentation Inspiring people to FLOW3 - der aktuelle Stand share
  • 67. Domain Driven Design Beispiel: Phone Book Inspiring people to FLOW3 - der aktuelle Stand share
  • 68. Domain Driven Design Beispiel: Phone Book showEntries() checkIfUserCanDeleteEntry() exportPhoneBook() logChanges() Inspiring people to FLOW3 - der aktuelle Stand share
  • 69. Domain Driven Design Beispiel: Phone Book Nicht in der showEntries() PhoneBook- checkIfUserCanDeleteEntry() exportPhoneBook() Domäne! logChanges() Inspiring people to FLOW3 - der aktuelle Stand share
  • 70. Domain Driven Design Schichtenarchitektur Presentation Domain Data source Inspiring people to FLOW3 - der aktuelle Stand share
  • 71. Domain Driven Design Schichtenarchitektur View Presentation Controller Application Logic (Service Layer) Domain Domain Model (Domain Layer) Data Mapper (part of Content Repository) Data source Data Source Abstraction Inspiring people to FLOW3 - der aktuelle Stand share
  • 72. Domain Driven Design Schichtenarchitektur View Presentation Controller Application Logic (Service Layer) Domain Domain Model (Domain Layer) Data Mapper (part of Content Repository) Data source Data Source Abstraction Inspiring people to FLOW3 - der aktuelle Stand share
  • 73. Model View Controller Inspiring people to FLOW3 - der aktuelle Stand share
  • 74. MVC Model Objekt, welches Daten und Geschäftslogik einer bestimmten Domäne enthält enthält keine Informationen über die Darstellung der Daten, sondern definiert das Verhalten in FLOW3 nutzen wir Domain Models Inspiring people to FLOW3 - der aktuelle Stand share
  • 75. MVC View Darstellung des Models im Web oder in anderen Ausgabemedien Stellen nur Daten dar, verändern diese nicht. Inspiring people to FLOW3 - der aktuelle Stand share
  • 76. MVC Controller Reagiert auf Benutzereingaben Wählt das Model und verändert dieses wie benötigt Wählt den View aus und gibt diesem die Daten, die er rendern soll Der Standard-Controller für FLOW3 ist der ActionController Inspiring people to FLOW3 - der aktuelle Stand share
  • 77.
  • 78. MVC und DDD mit FLOW3 Inspiring people to FLOW3 - der aktuelle Stand share
  • 79. DEMO Inspiring people to FLOW3 - der aktuelle Stand share
  • 80. MVC und DDD mit FLOW3 Dateistruktur Inspiring people to FLOW3 - der aktuelle Stand share
  • 81. MVC und DDD mit FLOW3 Domain Model Inspiring people to FLOW3 - der aktuelle Stand share
  • 82. MVC und DDD mit FLOW3 Domain Model Inspiring people to FLOW3 - der aktuelle Stand share
  • 83.
  • 84.
  • 85.
  • 86.
  • 87. MVC und DDD mit FLOW3 Domain Model Inspiring people to FLOW3 - der aktuelle Stand share
  • 88. MVC und DDD mit FLOW3 Domain Model Inspiring people to FLOW3 - der aktuelle Stand share
  • 89. MVC und DDD mit FLOW3 Domain Model Inspiring people to FLOW3 - der aktuelle Stand share
  • 90. MVC und DDD mit FLOW3 Aber - Persistenz? durch einen Persistence Manager werden Objekte gespeichert Transparent für den Programmierer Inspiring people to FLOW3 - der aktuelle Stand share
  • 91. MVC und DDD mit FLOW3 Aber - Persistenz? Anwendung Anwendung Persistence Manager JSR-283 Content Repository PDO ... MySQL Postgres SQLite Inspiring people to FLOW3 - der aktuelle Stand share
  • 92. DEMO Inspiring people to FLOW3 - der aktuelle Stand share
  • 93. MVC und DDD mit FLOW3 Controller Normal: Erben von F3FLOW3MVCControllerActionController public function indexAction() { // ... } public function listAction() { // ... } Inspiring people to FLOW3 - der aktuelle Stand share
  • 94.
  • 95.
  • 96.
  • 97.
  • 98. MVC und DDD mit FLOW3 Controller-Argumente Jedes Argument muss explizit deklariert werden Zugriff auf $_GET, $_POST ist nicht erlaubt und wird abgefangen! Inspiring people to FLOW3 - der aktuelle Stand share
  • 99. MVC und DDD mit FLOW3 Controller-Argumente Argumentregistrierung Argument-Mapping von einfachen Argumenten wird noch schöner! public function initializeArguments() { $this->arguments->addNewArgument(“tag”, “Text“); } public function listByTagAction() { $tag = $this->arguments[‘tag’]->getValue(); // $tag ist ein String! } Inspiring people to FLOW3 - der aktuelle Stand share
  • 100. MVC und DDD mit FLOW3 Controller-Argumente Argument-Mapping von einfachen Argumenten public function initializeArguments() { $this->arguments->addNewArgument(“tag”, “UUID“); } public function listByTagAction() { $tag = $this->arguments[‘tag’]->getValue(); // $tag ist eine UUID! } Inspiring people to FLOW3 - der aktuelle Stand share
  • 101. MVC und DDD mit FLOW3 Controller-Argumente Argument-Mapping von komplexen Argumenten public function initializeArguments() { $this->arguments->addNewArgument(“comment”, “F3BlogDomainComment“); } public function addNewCommentAction() { $comment = $this->arguments[‘comment’]->getValue(); // $comment ist ein Comment-Objekt! } Inspiring people to FLOW3 - der aktuelle Stand share
  • 102. MVC und DDD mit FLOW3 View ... ist eine PHP-Klasse, welche von F3FLOW3MVCViewAbstractView erbt es gibt Standardklassen für marker-basierte Views, Smarty-basierte Views, und... Fluid! Inspiring people to FLOW3 - der aktuelle Stand share
  • 103.
  • 104. Fluid - The Zen of Templating Inspiring people to FLOW3 - der aktuelle Stand share
  • 105. Inhalt Test Driven TYPO3 - Einführung Development Dependency FLOW3 Injection Aspektorientierte Programmierung Fluid - The Zen of Templating Domain Driven Synergien TYPO3 v4 und v5 Design & MVC Inspiring people to FLOW3 - der aktuelle Stand share
  • 106. Fluid Was ist eine Template-Engine? übernimmt die Darstellung von Daten lebt in der View-Komponente Bekannte Engines Smarty *TAL Velocity Designer schreiben kein PHP, sondern HTML Inspiring people to FLOW3 - der aktuelle Stand share
  • 107. Source: http://en.wikipedia.org/wiki/Template_engine_(web) Inspiring people to FLOW3 - der aktuelle Stand share
  • 108. Fluid Nachteile existierender Template Engines nicht komplett OOP / brechen OOP-Paradigmen an einigen Stellen schwierig für nicht-HTML-basierte Templates nutzbar keine Autovervollständigung in Editoren nicht einfach erweiterbar Inspiring people to FLOW3 - der aktuelle Stand share
  • 109. The Zen of Templating simpel mächtig http://www.sxc.hu/photo/821903
  • 110. The Zen of Templating intuitiv einfach erlernbar http://www.sxc.hu/photo/821903
  • 111. Einfachheit ist die ultimative Vollkommenheit. Leonardo Da Vinci « Inspiring people to FLOW3 - der aktuelle Stand share
  • 112. » Einfachheit ist die ultimative Vollkommenheit. Leonardo Da Vinci « Inspiring people to FLOW3 - der aktuelle Stand share
  • 113. Fluid Ziel Einfache, elegante Template Engine vielfältige Unterstützung für den Template-Schreiber einfache und saubere Erweiterbarkeit vielerlei Ausgabemedien möglich Inspiring people to FLOW3 - der aktuelle Stand share
  • 114. Fluid Grundkonzepte Namespace- Ausgabelogik ist in View Helpers (Tags) gekapselt Deklaration {namespace f3=F3FluidViewHelpers} <f3:link action=“someAction“>Administrationsoberfläche</f3:link> Aufruf eines Tags Fluid Core enthält keine Ausgabelogik! Inspiring people to FLOW3 - der aktuelle Stand share
  • 115. <f3:...> Jeder Tag ist eine Klasse!
  • 116. {namespace f3=F3FluidViewHelpers} <f3:link>...</f3:link> F3FluidViewHelpersLinkViewHelper
  • 117. {namespace f3=F3FluidViewHelpers} <f3:form.textbox /> F3FluidViewHelpersFormTextboxViewHelper
  • 118. Fluid Grundkonzepte Variablen $this->view->assign(‘blogTitle’, $blog->getTitle()); <h1>Der Name des Blogs ist: {blogTitle}</h1> Inspiring people to FLOW3 - der aktuelle Stand share
  • 119. Fluid Grundkonzepte Object Accessors $this->view->assign(‘blog’, $blog); <h1>Der Name des Blogs ist: {blog.title}</h1> Autor: {blog.author} Geht auch weiter Getter / Setter werden automatisch aufgerufen verschachtelt Inspiring people to FLOW3 - der aktuelle Stand share
  • 120. Fluid Grundkonzepte Arrays <f3:link action=“show“ arguments=“{id: blog.id, name: ‘Hallo’}“>Posting anzeigen</f3:link> JSON-Objektsyntax Inspiring people to FLOW3 - der aktuelle Stand share
  • 121. Ein Beispiel Inspiring people to FLOW3 - der aktuelle Stand share
  • 122.
  • 125. Fluid Autovervollständigung Inspiring people to FLOW3 - der aktuelle Stand share
  • 126.
  • 127.
  • 128. Fluid Autovervollständigung Generierung von XML Schema aus Quellcode-Kommentaren funktioniert damit in allen XML-fähigen Editoren (z.B. Eclipse) Inspiring people to FLOW3 - der aktuelle Stand share
  • 129. Fluid Aufbau TemplateView View Helpers (Tags) Fluid Core Inspiring people to FLOW3 - der aktuelle Stand share
  • 130. Fluid Backport Fluid wird in TYPO3 4.4 integriert warscheinlich: Standalone-Lösung Inspiring people to FLOW3 - der aktuelle Stand share
  • 131. Fluid Nächste Schritte Caching Tag-Library dokumentieren und ausbauen Portierung auf TYPO3 v4 Inspiring people to FLOW3 - der aktuelle Stand share
  • 132. Work in Progress http://www.sxc.hu/photo/956013
  • 133. We need help! http://www.sxc.hu/photo/1132907
  • 134. Fluid Weitere Informationen http://forge.typo3.org/projects/package-fluid https://svn.typo3.org/FLOW3/Packages/Fluid Inspiring people to FLOW3 - der aktuelle Stand share
  • 135.
  • 136. FLOW3 - der aktuelle Stand Inspiring people to FLOW3 - der aktuelle Stand share
  • 137. Progress Progress Developing TYPO3 5.0 ... Inspiring people to FLOW3 - der aktuelle Stand share
  • 138. Der aktuelle Stand AOP Object Configuration Cache Error Event 0 25 50 75 100 Inspiring people to FLOW3 - der aktuelle Stand share
  • 139. Der aktuelle Stand Locale Log MVC Package Persistence Property 0 25 50 75 100 Inspiring people to FLOW3 - der aktuelle Stand share
  • 140. Der aktuelle Stand Reflection Resource Session Utility Validation 0 25 50 75 100 Inspiring people to FLOW3 - der aktuelle Stand share
  • 141. Nächste Schritte erste FLOW3-Beta: In den nächsten 1-2 Monaten erste Pilotprojekte: jetzt Weiterentwicklung des CMS Geplanter Beta-Release von TYPO3 5.0: Ende 2009 Inspiring people to FLOW3 - der aktuelle Stand share
  • 142. Wir suchen... Fluid-Mitentwickler, Tester, ... FLOW3-Entwickler (bald) TYPO3 5.0 Mitentwickler Inspiring people to FLOW3 - der aktuelle Stand share
  • 143. Weitere Informationen http://flow3.typo3.org http://flow3.typo3.org/documentation/reference https://svn.typo3.org/FLOW3/Distribution/trunk https://svn.typo3.org/FLOW3/Distribution/branches/BlogExample Inspiring people to FLOW3 - der aktuelle Stand share
  • 144. Inhalt Test Driven TYPO3 - Einführung Development Dependency FLOW3 Injection Aspektorientierte Programmierung Fluid - The Zen of Templating Domain Driven Synergien TYPO3 v4 und v5 Design & MVC Inspiring people to FLOW3 - der aktuelle Stand share
  • 145. Synergien TYPO3 v4 und TYPO3 v5 Inspiring people to FLOW3 - der aktuelle Stand share
  • 146. Sollte ich überhaupt noch auf TYPO3 v4 setzen?
  • 148. Ich bin verunsichert. Was ist mit dem Aufwand, den ich in TYPO3 v4 gesteckt habe?
  • 149. TYPO3 Transition Days Inspiring people to FLOW3 - der aktuelle Stand share
  • 150.
  • 151.
  • 152.
  • 153.
  • 154. TYPO3 Transition Days The Berlin Manifesto We, the participants of the T3TD08 state that ... TYPO3 v4 continues to be actively developed v4 development will continue after the the release of v5 Future releases of v4 will see its features converge with those in TYPO3 v5 Inspiring people to FLOW3 - der aktuelle Stand share
  • 155. TYPO3 Transition Days The Berlin Manifesto We, the participants of the T3TD08 state that ... TYPO3 v5 will be the successor to TYPO3 v4 Migration of content from TYPO3 v4 to TYPO3 v5 will be easily possible Inspiring people to FLOW3 - der aktuelle Stand share
  • 156. TYPO3 Transition Days The Berlin Manifesto We, the participants of the T3TD08 state that ... TYPO3 v5 will introduce many new concepts and ideas. Learning never stops and we'll help with adequate resources to ensure a smooth transition. Inspiring people to FLOW3 - der aktuelle Stand share
  • 157.
  • 158. Patrick Broens, Karsten Dambekalns, Dmitry Dulepov, Andreas Förthner, Oliver Hader, Martin Herr, Christian Jul Jensen, Thorsten Kahler, Steffen Kamper, Christian Kuhn, Sebastian Kurfürst, Martin Kutschker, Robert Lemke, Tobias Liebig, Benjamin Mack, Peter Niederlag, Jochen Rau, Ingo Renner, Ingmar Schlecht, Jeff Segars, Michael Stucki, Bastian Waidelich
  • 159. TYPO3 v4 Entwickler TYPO3 v5 Entwickler TYPO3-Entwickler
  • 160. [ Video-Ausschnitt aus dem T3CAST ]
  • 161. Synergien Gemeinsame Roadmap Inspiring people to FLOW3 - der aktuelle Stand share
  • 162. Synergien MVC-Framework in 4.3 Das FLOW3-MVC-Framework wird auf Version 4.3 portiert Ziele: Neue Konzepte erlernbar machen Schon jetzt mit „FLOW3-Paradigmen“ programmieren Inspiring people to FLOW3 - der aktuelle Stand share
  • 163. Synergien Fluid in 4.4 Fluid wird für Templates und Extension-Entwickler zur Verfügung stehen Automatische Konvertierung vom Fluid-Kern An TYPO3 v4 angepasste Tags Inspiring people to FLOW3 - der aktuelle Stand share
  • 164. Folien auf http://tug-dresden.de Inspiring people to FLOW3 - der aktuelle Stand share
  • 165. ?????? ??? ??? ? Inspiring people to FLOW3 - der aktuelle Stand share

Notas do Editor

  1. &#xDC;ber mich
  2. - X TUD
  3. - 2002 TYPO3
  4. - X Anfang 2005: erste snowboard tour
  5. - 2005 Kernentwickler
  6. - Hobbies
  7. - Manche Themen werden nur angeschnitten - es geht um einen &#xDC;berblick
  8. - Manche Themen werden nur angeschnitten - es geht um einen &#xDC;berblick
  9. Diskussionen: Refactoring / Neubeginn
  10. Entscheidung: &#x201E;Start from scratch&#x201C;
  11. - Manche Themen werden nur angeschnitten - es geht um einen &#xDC;berblick
  12. Das FLOW3-Erlebnis
  13. Weiterhin: Integration mit Continuous Integration
  14. Fragen?
  15. - FRAGEN?
  16. Fragen
  17. man kann Methodenaufrufe abfangen, ohne den Ziel-Code zu ver&#xE4;ndern!
  18. BSP: loggen von Methodenaufrufen -> Im Booking-System
  19. Fragen
  20. Ein Risiko bei Bauwerken: Die Sprachverwirrung
  21. jetzt schauen wir obere schichten an
  22. Fragen
  23. - Domain Objects m&#xFC;ssen von KEINER basisklasse erben
  24. - POPOs
  25. - Repositories
  26. man braucht zugriff auf &#x201E;Blog&#x201C;-Objekt -> Repositories
  27. - Repositories sind singleton
  28. - Ziel: Startseitenaufruf nachvollziehen
  29. - erweitert ActionController
  30. - inject* -> Autowiring / Dependency Injection
  31. - initializeAction -> Initialisierungscode
  32. - indexAction -> get stuff from &#x201E;blog&#x201C; domain object -> pass it to view -> Let it render!
  33. - Ich kann _direkt_ mit Objekten arbeiten
  34. - macht CRUD sehr viel einfacher
  35. Fragen
  36. Fragen
  37. - Manche Themen werden nur angeschnitten - es geht um einen &#xDC;berblick
  38. -> Keine Ausgabelogik! -> kein If/Else, keine Layouts, ...
  39. Decorator-Pattern
  40. Sehr variabel -> Beliebige dynamische bereiche
  41. -> anders als bei SiteMesh z.b.
  42. unterer Teil: immer gleich
  43. oberer Teil: abh&#xE4;ngig von Zielsystem
  44. Fragen
  45. - Manche Themen werden nur angeschnitten - es geht um einen &#xDC;berblick
  46. Weitergehende Planung
  47. Gemeinsame Roadmap
  48. Folien online : tug-dd.de