SlideShare a Scribd company logo
The Joy of Development
project founder of
Flow and Neos

coach, coder, consultant

Lübeck, Germany

1 wife, 2 daughters,
                       TEXT HERE
1 espresso machine

likes drumming
2005
modelviewcontroller
HTTP
Network Working Group                                           R. Fielding
Request for Comments: 2616                                        UC Irvine
Obsoletes: 2068                                                   J. Gettys
Category: Standards Track                                        Compaq/W3C
                                                                   J. Mogul
                                                                     Compaq
                                                                 H. Frystyk
                                                                    W3C/MIT
                                                                L. Masinter
                                                                      Xerox
                                                                   P. Leach
                                                                  Microsoft
                                                             T. Berners-Lee
                                                                    W3C/MIT
                                                                  June 1999




                   Hypertext Transfer Protocol -- HTTP/1.1


Status of this Memo


   This document specifies an Internet standards track protocol for the
   Internet community, and requests discussion and suggestions for
   improvements.     Please refer to the current edition of the "Internet
HTTP/1.1 has been designed to allow implementations of applications
                                                     /**
   that do not depend on knowledge of ranges.
                                                      * Represents a HTTP request
                                                      */
4 HTTP Message
                                                     class Request extends Message {

4.1 Message Types
                                                         /**
                                                           * @var string
   HTTP messages consist of requests from client to    server and responses
                                                           */
   from server to client.
                                                         protected $method = 'GET';

       HTTP-message   = Request | Response       ; HTTP/1.1 messages
                                                        /**
                                                          * @var TYPO3FlowHttpUri
   Request   (section 5) and Response (section 6) messages use the generic
                                                          */
   message   format of RFC 822 [9] for transferring entities (the payload
                                                        protected $uri;
   of the message). Both types of message consist of a start-line, zero
   or more header fields (also known as "headers"), an empty line (i.e.,
                                                        /**
   a line with nothing preceding the CRLF) indicating   the end of the
                                                          * @var TYPO3FlowHttpUri
   header fields, and possibly a message-body.
                                                          */
                                                        protected $baseUri;
        generic-message = start-line
                            *(message-header CRLF)
                                                         /**
                            CRLF
                                                          * @var array
                            [ message-body ]
                                                          */
        start-line      = Request-Line | Status-Line
                                                         protected $arguments;
$request->getHeader('User-Agent'); # C64

$request->setHeader('X-Coffee', 'too few');
$now = new DateTime();
$response->setLastModified($now);
$response->getHeaders()
  ->setCacheControlDirective('s-max-age', 100);
# set cookie in response:
$response->setCookie(new Cookie('counter', 1));

  # on next request, retrieve cookie:
$cookie = $request->getCookie('counter');
$response = $browser->request('http://robertlemke.com/home');
$content = $response->getContent();
$request = Request::create($storageUri, 'PUT');
$request->setContent(fopen('myfavoritemovie.m4v', 'rb'));
$request->setHeader('X-Category', 'Sissy');

$reponse = $browser->sendRequest($request);
Model
Domain-Driven Design                       /**
                                            * A Book
                                            *
A methodology which ...                     * @FlowScope(“prototy
                                                                   pe”)
                                            * @FlowEntity
                                            */
• results in rich domain models           class Book {

                                           /**
• provides a common language across         * @var string
  the project team                          */
                                           protected $title;

• simplify the design of complex           /**
                                            * @var string
  applications                              */
                                           protected $isbn;

                                          /**
Flow is the first PHP framework tailored    * @var string
                                           */
to Domain-Driven Design                   protected $description
                                                                 ;

                                          /**
                                           * @var integer
                                           */
                                          protected $price;
/**
 * A Book
 *
 * @FlowEntity
 */
class Book {

  /**
   * The title
   * @var string
   * @FlowValidate(type="StringLength", options={ "minimum"=1,
   */
  protected $title;

  /**
   * The price
   * @var integer
   * @FlowValidate(type="NumberRange", options={ "minimum"=1,
   */
  protected $price;
/**
  * Get the Book's title
  *
  * @return string The Book's title
  */
public function getTitle() {
    return $this->title;
}

/**
  * Sets this Book's title
  *
  * @param string $title The Book's title
  * @return void
  */
public function setTitle($title) {
    $this->title = $title;
}
/**
 * A repository for Books
 *
 * @FlowScope("singleton")
 */
class BookRepository extends Repository {

    public function findBestSellers() {
      ...
    }

}
# Add a book
$bookRepository->add($book);

  # Remove a book
$bookRepository->remove($book);

  # Update a book
$bookRepository->update($book);
# Find one specific book
$book = $bookRepository->findOneByTitle('Lord of the Rings');

  # Find multiple books by property
$books = $bookRepository->findByCategory('Fantasy');

  # Find books through custom find method
$bestsellingBooks = $bookRepository->findBestSellers();
TEXT HERE
TEXT HERE
Controller
class HelloWorldController extends ActionController {

    /**
      * @return string
      */
    public function greetAction() {
         return 'Hello World!';
    }

}
Hello World!


           TEXT HERE
/**
  * An action which sends greetings to $name
  *
  * @param string $name The name to mention
  * @return string
  */
public function greetAction($name) {
     return "Hello $name!";
}
dev.demo.local/acme.demo/helloworld/greet.html?name=Robert

                 dev.demo.local/acme.demo/helloworld/greet.html?name=Robert




Hello Robert!
View
<html lang="en">
    <head>
        <title>Templating</title>
    </head>
    <body>

          Our templating engine
          is called

                         Fluid
    </body>
</html>
/**
  * @param string $name
  * @return void
  */
public function greetAction($name) {
     $this->view->assign('name', $name);
}
<html>
    <head>
        <title>Fluid Example</title>
    </head>
    <body>
        <p>Hello, {name}!</p>
    </body>
</html>
/**
  * Displays a list of best selling books
  *
  * @return void
  */
public function indexAction() {
    $books = $this->bookRepository->findBestSellers();
    $this->view->assign('books', $books);
}
<ul>
   <f:for each="{books}" as="book">
       <li>{book.title} by {book.author.name}</li>
   </f:for>
</ul>
<html xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers">
<f:form action="create" name="newBook">
    <ol>
         <li>
              <label for="name">Name</label>
              <f:form.textfield property="name" id="name" />
         </li>
         <li>
              <f:form.submit value="Create" />
         </li>
    </ol>
</f:form>
/**
  * Adds the given new book to the BookRepository
  *
  * @param AcmeDemoDomainModelBook $newBook
  * @return void
  */
public function createAction(Book $newBook) {
    $this->bookRepository->add($newBook);
    $this->addFlashMessage('Created a new book.');
    $this->redirect('index');
}
Resources
Static Resources
Static Resources
Static Resources
Persistent Resources
Persistent Resources
Dependency Injection
class SomeService {

      protected static $instance;

      public function getInstance() {
        if (self::$instance === NULL) {
          self::$instance = new self;
        }
        return self::$instance;
      }
}



class SomeOtherController {

    public function action() {
      $service = SomeService::getInstance();
      …
    }

}
class ServiceLocator {

      protected static $services = array();

      public function getInstance($name) {
        return self::$service[$name];
      }

}



class SomeOtherController {

    public function action() {
      $service = ServiceLocate::getInstance("SomeService");
      …
    }

}
Flow's take on Dependency Injection
• one of the first PHP implementations
  (started in 2006, improved ever since)

• object management for the whole lifecycle of all objects

• no unnecessary configuration if information can be
  gathered automatically (autowiring)

• intuitive use and no bad magical surprises

• fast! (like hardcoded or faster)
class BookController extends ActionController {

    /**
     * @var BookRepository
     */
    protected $bookRepository;

    /**
      * @param BookRepository $bookRepository
      */
    public function __construct(BookRepository $bookRepository) {
       $this->bookRepository = $bookRepository;
    }

}
class BookController extends ActionController {

    /**
     * @var BookRepository
     */
    protected $bookRepository;

  /**
    * @param BookRepository $bookRepository
    */
  public function injectBookRepository(BookRepository
$bookRepository) {
     $this->bookRepository = $bookRepository;
  }

}
class BookController extends ActionController {

    /**
     * @FlowInject
     * @var BookRepository
     */
    protected $bookRepository;

}
Aspect-Oriented Programming
/**
  * An action which sends greetings to $name
  *
  * @param string $name The name to mention
  * @return string
  */
public function greetAction($name) {
     return "Hello $name!";
}
dev.demo.local/acme.demo/helloworld/greet.html?name=Robert

                 dev.demo.local/acme.demo/helloworld/greet.html?name=Robert




Hello Robert!
/**
 * @FlowAspect
 */
class DemoAspect {

    /**
      * @param TYPO3FlowAopJoinPointInterface $joinPoint
      * @return void
      * @FlowAround("method(.*->greetAction())")
      */
    public function demoAdvice(JoinPointInterface $joinPoint) {
       $name = $joinPoint->getMethodArgument('name');
       return sprintf('%s, you are running out of time!');
    }
}
dev.demo.local/acme.demo/helloworld/greet.html?name=Robert

                 dev.demo.local/acme.demo/helloworld/greet.html?name=Robert




Robert, you are running out of time!
Security
resources:
  methods:
    BookManagementMethods: 'method(.*Controller->(new|create|
edit|update|delete)Action())'

roles:
  Customer: []
  Administrator: []

acls:
  Administrator:
    methods:
      BookManagementMethods: GRANT
Access Denied   (in Development context)
Sessions
/**
 * A Basket
 *
 * @FlowScope("session")
 */
class Basket {

  /**
   * The books
   * @var array
   */
  protected $books;

  /**
    * Adds a book to the basket
    *
    * @param RoeBooksShopDomainModelBasketook $book
    * @return void
    * @FlowSession(autoStart=true)
    */
  public function addBook (Book $book) {
      $this->books[] = $book;
  }
TEXT HERE
TEXT HERE
TEXT HERE
Rossmann
• second biggest drug store
  in Germany
• 5,13 billion € turnover
• 31,000 employees



Customer Database
Amadeus
• world’s biggest
  e-ticket provider
• 217 markets
• 948 million billable
  transactions / year
• 2,7 billion € revenue

Social Media Suite
World of Textile
• textile print and finishing
• 30,000 articles / day
• 180 employees




E-Commerce Platform
2.0
neos.typo3.org
?
Thank you!
Flow      flow.typo3.org
Slides    slideshare.net/robertlemke
Blog      robertlemke.com
Twitter   @robertlemke
Google+   plus.robertlemke.com

More Related Content

Viewers also liked

TYPO3 Flow a solid foundation for medialib.tv
TYPO3 Flow a solid foundation for medialib.tvTYPO3 Flow a solid foundation for medialib.tv
TYPO3 Flow a solid foundation for medialib.tv
dfeyer
 
TYPO3 Flow 2.0 in the field - webtech Conference 2013
TYPO3 Flow 2.0 in the field - webtech Conference 2013TYPO3 Flow 2.0 in the field - webtech Conference 2013
TYPO3 Flow 2.0 in the field - webtech Conference 2013
die.agilen GmbH
 
TYPO3 Flow 2.0 (International PHP Conference 2013)
TYPO3 Flow 2.0 (International PHP Conference 2013)TYPO3 Flow 2.0 (International PHP Conference 2013)
TYPO3 Flow 2.0 (International PHP Conference 2013)
Robert Lemke
 
TYPO3 Flow 2.0 Workshop T3BOARD13
TYPO3 Flow 2.0 Workshop T3BOARD13TYPO3 Flow 2.0 Workshop T3BOARD13
TYPO3 Flow 2.0 Workshop T3BOARD13
Robert Lemke
 
T3CON14EU: Migrating from TYPO3 CMS to TYPO3 Flow
T3CON14EU: Migrating from TYPO3 CMS to TYPO3 FlowT3CON14EU: Migrating from TYPO3 CMS to TYPO3 Flow
T3CON14EU: Migrating from TYPO3 CMS to TYPO3 Flow
mhelmich
 
T3CON12 Flow and TYPO3 deployment with surf
T3CON12 Flow and TYPO3 deployment with surfT3CON12 Flow and TYPO3 deployment with surf
T3CON12 Flow and TYPO3 deployment with surf
Tobias Liebig
 
TYPO3 Flow: Beyond the Blog Example (Inspiring Flow 2013)
TYPO3 Flow: Beyond the Blog Example (Inspiring Flow 2013)TYPO3 Flow: Beyond the Blog Example (Inspiring Flow 2013)
TYPO3 Flow: Beyond the Blog Example (Inspiring Flow 2013)
Robert Lemke
 
TYPO3 5.0 Experience Concept
TYPO3 5.0 Experience ConceptTYPO3 5.0 Experience Concept
TYPO3 5.0 Experience Concept
Jens Hoffmann
 
TYPO3 Flow - PHP Framework for Developer Happiness
TYPO3 Flow - PHP Framework for Developer HappinessTYPO3 Flow - PHP Framework for Developer Happiness
TYPO3 Flow - PHP Framework for Developer HappinessChristian Müller
 
Testing TYPO3 Flow Applications with Behat
Testing TYPO3 Flow Applications with BehatTesting TYPO3 Flow Applications with Behat
Testing TYPO3 Flow Applications with Behat
Markus Goldbeck
 
TYPO3 Neos - past, present and future (T3CON14EU)
TYPO3 Neos - past, present and future (T3CON14EU)TYPO3 Neos - past, present and future (T3CON14EU)
TYPO3 Neos - past, present and future (T3CON14EU)
Robert Lemke
 
Using Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 FlowUsing Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 Flow
Karsten Dambekalns
 

Viewers also liked (12)

TYPO3 Flow a solid foundation for medialib.tv
TYPO3 Flow a solid foundation for medialib.tvTYPO3 Flow a solid foundation for medialib.tv
TYPO3 Flow a solid foundation for medialib.tv
 
TYPO3 Flow 2.0 in the field - webtech Conference 2013
TYPO3 Flow 2.0 in the field - webtech Conference 2013TYPO3 Flow 2.0 in the field - webtech Conference 2013
TYPO3 Flow 2.0 in the field - webtech Conference 2013
 
TYPO3 Flow 2.0 (International PHP Conference 2013)
TYPO3 Flow 2.0 (International PHP Conference 2013)TYPO3 Flow 2.0 (International PHP Conference 2013)
TYPO3 Flow 2.0 (International PHP Conference 2013)
 
TYPO3 Flow 2.0 Workshop T3BOARD13
TYPO3 Flow 2.0 Workshop T3BOARD13TYPO3 Flow 2.0 Workshop T3BOARD13
TYPO3 Flow 2.0 Workshop T3BOARD13
 
T3CON14EU: Migrating from TYPO3 CMS to TYPO3 Flow
T3CON14EU: Migrating from TYPO3 CMS to TYPO3 FlowT3CON14EU: Migrating from TYPO3 CMS to TYPO3 Flow
T3CON14EU: Migrating from TYPO3 CMS to TYPO3 Flow
 
T3CON12 Flow and TYPO3 deployment with surf
T3CON12 Flow and TYPO3 deployment with surfT3CON12 Flow and TYPO3 deployment with surf
T3CON12 Flow and TYPO3 deployment with surf
 
TYPO3 Flow: Beyond the Blog Example (Inspiring Flow 2013)
TYPO3 Flow: Beyond the Blog Example (Inspiring Flow 2013)TYPO3 Flow: Beyond the Blog Example (Inspiring Flow 2013)
TYPO3 Flow: Beyond the Blog Example (Inspiring Flow 2013)
 
TYPO3 5.0 Experience Concept
TYPO3 5.0 Experience ConceptTYPO3 5.0 Experience Concept
TYPO3 5.0 Experience Concept
 
TYPO3 Flow - PHP Framework for Developer Happiness
TYPO3 Flow - PHP Framework for Developer HappinessTYPO3 Flow - PHP Framework for Developer Happiness
TYPO3 Flow - PHP Framework for Developer Happiness
 
Testing TYPO3 Flow Applications with Behat
Testing TYPO3 Flow Applications with BehatTesting TYPO3 Flow Applications with Behat
Testing TYPO3 Flow Applications with Behat
 
TYPO3 Neos - past, present and future (T3CON14EU)
TYPO3 Neos - past, present and future (T3CON14EU)TYPO3 Neos - past, present and future (T3CON14EU)
TYPO3 Neos - past, present and future (T3CON14EU)
 
Using Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 FlowUsing Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 Flow
 

Similar to TYPO3 Flow and the Joy of Development (FOSDEM 2013)

Hands on FLOW3 (DPC12)
Hands on FLOW3 (DPC12)Hands on FLOW3 (DPC12)
Hands on FLOW3 (DPC12)
Robert Lemke
 
IPCSE12: Hands on FLOW3
IPCSE12: Hands on FLOW3IPCSE12: Hands on FLOW3
IPCSE12: Hands on FLOW3
Robert Lemke
 
Getting Into FLOW3 (DPC12)
Getting Into FLOW3 (DPC12)Getting Into FLOW3 (DPC12)
Getting Into FLOW3 (DPC12)
Robert Lemke
 
2012 08-11-flow3-northeast-php
2012 08-11-flow3-northeast-php2012 08-11-flow3-northeast-php
2012 08-11-flow3-northeast-phpJochen Rau
 
IPCSE12: Getting into FLOW3
IPCSE12: Getting into FLOW3IPCSE12: Getting into FLOW3
IPCSE12: Getting into FLOW3
Robert Lemke
 
Fluent Development with FLOW3 1.0
Fluent Development with FLOW3 1.0Fluent Development with FLOW3 1.0
Fluent Development with FLOW3 1.0
Robert Lemke
 
Getting Into FLOW3 (TYPO312CA)
Getting Into FLOW3 (TYPO312CA)Getting Into FLOW3 (TYPO312CA)
Getting Into FLOW3 (TYPO312CA)
Robert Lemke
 
FLOW3 Tutorial - T3CON11 Frankfurt
FLOW3 Tutorial - T3CON11 FrankfurtFLOW3 Tutorial - T3CON11 Frankfurt
FLOW3 Tutorial - T3CON11 Frankfurt
Robert Lemke
 
The Beauty and the Beast
The Beauty and the BeastThe Beauty and the Beast
The Beauty and the Beast
Bastian Feder
 
The Beauty And The Beast Php N W09
The Beauty And The Beast Php N W09The Beauty And The Beast Php N W09
The Beauty And The Beast Php N W09
Bastian Feder
 
Doctrine in FLOW3
Doctrine in FLOW3Doctrine in FLOW3
Doctrine in FLOW3
Karsten Dambekalns
 
Php Documentor The Beauty And The Beast
Php Documentor The Beauty And The BeastPhp Documentor The Beauty And The Beast
Php Documentor The Beauty And The Beast
Bastian Feder
 
jkljklj
jkljkljjkljklj
jkljklj
hoefo
 
Iss letcure 7_8
Iss letcure 7_8Iss letcure 7_8
Iss letcure 7_8Ali Habeeb
 
Mxhr
MxhrMxhr
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
ruyalarcon
 
Using Java to implement RESTful Web Services: JAX-RS
Using Java to implement RESTful Web Services: JAX-RSUsing Java to implement RESTful Web Services: JAX-RS
Using Java to implement RESTful Web Services: JAX-RSKatrien Verbert
 
03 form-data
03 form-data03 form-data
03 form-datasnopteck
 

Similar to TYPO3 Flow and the Joy of Development (FOSDEM 2013) (20)

Hands on FLOW3 (DPC12)
Hands on FLOW3 (DPC12)Hands on FLOW3 (DPC12)
Hands on FLOW3 (DPC12)
 
IPCSE12: Hands on FLOW3
IPCSE12: Hands on FLOW3IPCSE12: Hands on FLOW3
IPCSE12: Hands on FLOW3
 
Getting Into FLOW3 (DPC12)
Getting Into FLOW3 (DPC12)Getting Into FLOW3 (DPC12)
Getting Into FLOW3 (DPC12)
 
2012 08-11-flow3-northeast-php
2012 08-11-flow3-northeast-php2012 08-11-flow3-northeast-php
2012 08-11-flow3-northeast-php
 
IPCSE12: Getting into FLOW3
IPCSE12: Getting into FLOW3IPCSE12: Getting into FLOW3
IPCSE12: Getting into FLOW3
 
Fluent Development with FLOW3 1.0
Fluent Development with FLOW3 1.0Fluent Development with FLOW3 1.0
Fluent Development with FLOW3 1.0
 
Getting Into FLOW3 (TYPO312CA)
Getting Into FLOW3 (TYPO312CA)Getting Into FLOW3 (TYPO312CA)
Getting Into FLOW3 (TYPO312CA)
 
FLOW3 Tutorial - T3CON11 Frankfurt
FLOW3 Tutorial - T3CON11 FrankfurtFLOW3 Tutorial - T3CON11 Frankfurt
FLOW3 Tutorial - T3CON11 Frankfurt
 
The Beauty and the Beast
The Beauty and the BeastThe Beauty and the Beast
The Beauty and the Beast
 
The Beauty And The Beast Php N W09
The Beauty And The Beast Php N W09The Beauty And The Beast Php N W09
The Beauty And The Beast Php N W09
 
Doctrine in FLOW3
Doctrine in FLOW3Doctrine in FLOW3
Doctrine in FLOW3
 
Php Documentor The Beauty And The Beast
Php Documentor The Beauty And The BeastPhp Documentor The Beauty And The Beast
Php Documentor The Beauty And The Beast
 
jkljklj
jkljkljjkljklj
jkljklj
 
Iss letcure 7_8
Iss letcure 7_8Iss letcure 7_8
Iss letcure 7_8
 
Mxhr
MxhrMxhr
Mxhr
 
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
 
Inside DocBlox
Inside DocBloxInside DocBlox
Inside DocBlox
 
Using Java to implement RESTful Web Services: JAX-RS
Using Java to implement RESTful Web Services: JAX-RSUsing Java to implement RESTful Web Services: JAX-RS
Using Java to implement RESTful Web Services: JAX-RS
 
03 form-data
03 form-data03 form-data
03 form-data
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
 

More from Robert Lemke

Neos Content Repository – Git for content
Neos Content Repository – Git for contentNeos Content Repository – Git for content
Neos Content Repository – Git for content
Robert Lemke
 
A General Purpose Docker Image for PHP
A General Purpose Docker Image for PHPA General Purpose Docker Image for PHP
A General Purpose Docker Image for PHP
Robert Lemke
 
Scaleable PHP Applications in Kubernetes
Scaleable PHP Applications in KubernetesScaleable PHP Applications in Kubernetes
Scaleable PHP Applications in Kubernetes
Robert Lemke
 
Flownative Beach - Neos Meetup Hamburg 2022
Flownative Beach - Neos Meetup Hamburg 2022Flownative Beach - Neos Meetup Hamburg 2022
Flownative Beach - Neos Meetup Hamburg 2022
Robert Lemke
 
GitOps with Flux - IPC Munich 2022
GitOps with Flux - IPC Munich 2022GitOps with Flux - IPC Munich 2022
GitOps with Flux - IPC Munich 2022
Robert Lemke
 
OpenID Connect with Neos and Flow
OpenID Connect with Neos and FlowOpenID Connect with Neos and Flow
OpenID Connect with Neos and Flow
Robert Lemke
 
Neos Conference 2019 Keynote
Neos Conference 2019 KeynoteNeos Conference 2019 Keynote
Neos Conference 2019 Keynote
Robert Lemke
 
A practical introduction to Kubernetes (IPC 2018)
A practical introduction to Kubernetes (IPC 2018)A practical introduction to Kubernetes (IPC 2018)
A practical introduction to Kubernetes (IPC 2018)
Robert Lemke
 
Neos Conference 2018 Welcome Keynote
Neos Conference 2018 Welcome KeynoteNeos Conference 2018 Welcome Keynote
Neos Conference 2018 Welcome Keynote
Robert Lemke
 
A practical introduction to Event Sourcing and CQRS
A practical introduction to Event Sourcing and CQRSA practical introduction to Event Sourcing and CQRS
A practical introduction to Event Sourcing and CQRS
Robert Lemke
 
Neos Conference 2017 Welcome Keynote
Neos Conference 2017 Welcome KeynoteNeos Conference 2017 Welcome Keynote
Neos Conference 2017 Welcome Keynote
Robert Lemke
 
IPC16: A Practical Introduction to Kubernetes
IPC16: A Practical Introduction to Kubernetes IPC16: A Practical Introduction to Kubernetes
IPC16: A Practical Introduction to Kubernetes
Robert Lemke
 
IPC 2016: Content Strategy for Developers
IPC 2016: Content Strategy for DevelopersIPC 2016: Content Strategy for Developers
IPC 2016: Content Strategy for Developers
Robert Lemke
 
Docker in Production - IPC 2016
Docker in Production - IPC 2016Docker in Production - IPC 2016
Docker in Production - IPC 2016
Robert Lemke
 
Is this Open Source Thing Really Worth it? (IPC 2016 Berlin)
Is this Open Source Thing Really Worth it? (IPC 2016 Berlin)Is this Open Source Thing Really Worth it? (IPC 2016 Berlin)
Is this Open Source Thing Really Worth it? (IPC 2016 Berlin)
Robert Lemke
 
The Neos Brand (Inspiring Conference 2016)
The Neos Brand (Inspiring Conference 2016)The Neos Brand (Inspiring Conference 2016)
The Neos Brand (Inspiring Conference 2016)
Robert Lemke
 
Neos - past, present, future (Inspiring Conference 2016)
Neos - past, present, future (Inspiring Conference 2016)Neos - past, present, future (Inspiring Conference 2016)
Neos - past, present, future (Inspiring Conference 2016)
Robert Lemke
 
Meet Neos Nürnberg 2016: Ja ich will!
Meet Neos Nürnberg 2016: Ja ich will!Meet Neos Nürnberg 2016: Ja ich will!
Meet Neos Nürnberg 2016: Ja ich will!
Robert Lemke
 
Meet Neos Nürnberg 2016: Hallo Neos!
Meet Neos Nürnberg 2016: Hallo Neos!Meet Neos Nürnberg 2016: Hallo Neos!
Meet Neos Nürnberg 2016: Hallo Neos!
Robert Lemke
 
Turning Neos inside out / React.js HH
Turning Neos inside out / React.js HHTurning Neos inside out / React.js HH
Turning Neos inside out / React.js HH
Robert Lemke
 

More from Robert Lemke (20)

Neos Content Repository – Git for content
Neos Content Repository – Git for contentNeos Content Repository – Git for content
Neos Content Repository – Git for content
 
A General Purpose Docker Image for PHP
A General Purpose Docker Image for PHPA General Purpose Docker Image for PHP
A General Purpose Docker Image for PHP
 
Scaleable PHP Applications in Kubernetes
Scaleable PHP Applications in KubernetesScaleable PHP Applications in Kubernetes
Scaleable PHP Applications in Kubernetes
 
Flownative Beach - Neos Meetup Hamburg 2022
Flownative Beach - Neos Meetup Hamburg 2022Flownative Beach - Neos Meetup Hamburg 2022
Flownative Beach - Neos Meetup Hamburg 2022
 
GitOps with Flux - IPC Munich 2022
GitOps with Flux - IPC Munich 2022GitOps with Flux - IPC Munich 2022
GitOps with Flux - IPC Munich 2022
 
OpenID Connect with Neos and Flow
OpenID Connect with Neos and FlowOpenID Connect with Neos and Flow
OpenID Connect with Neos and Flow
 
Neos Conference 2019 Keynote
Neos Conference 2019 KeynoteNeos Conference 2019 Keynote
Neos Conference 2019 Keynote
 
A practical introduction to Kubernetes (IPC 2018)
A practical introduction to Kubernetes (IPC 2018)A practical introduction to Kubernetes (IPC 2018)
A practical introduction to Kubernetes (IPC 2018)
 
Neos Conference 2018 Welcome Keynote
Neos Conference 2018 Welcome KeynoteNeos Conference 2018 Welcome Keynote
Neos Conference 2018 Welcome Keynote
 
A practical introduction to Event Sourcing and CQRS
A practical introduction to Event Sourcing and CQRSA practical introduction to Event Sourcing and CQRS
A practical introduction to Event Sourcing and CQRS
 
Neos Conference 2017 Welcome Keynote
Neos Conference 2017 Welcome KeynoteNeos Conference 2017 Welcome Keynote
Neos Conference 2017 Welcome Keynote
 
IPC16: A Practical Introduction to Kubernetes
IPC16: A Practical Introduction to Kubernetes IPC16: A Practical Introduction to Kubernetes
IPC16: A Practical Introduction to Kubernetes
 
IPC 2016: Content Strategy for Developers
IPC 2016: Content Strategy for DevelopersIPC 2016: Content Strategy for Developers
IPC 2016: Content Strategy for Developers
 
Docker in Production - IPC 2016
Docker in Production - IPC 2016Docker in Production - IPC 2016
Docker in Production - IPC 2016
 
Is this Open Source Thing Really Worth it? (IPC 2016 Berlin)
Is this Open Source Thing Really Worth it? (IPC 2016 Berlin)Is this Open Source Thing Really Worth it? (IPC 2016 Berlin)
Is this Open Source Thing Really Worth it? (IPC 2016 Berlin)
 
The Neos Brand (Inspiring Conference 2016)
The Neos Brand (Inspiring Conference 2016)The Neos Brand (Inspiring Conference 2016)
The Neos Brand (Inspiring Conference 2016)
 
Neos - past, present, future (Inspiring Conference 2016)
Neos - past, present, future (Inspiring Conference 2016)Neos - past, present, future (Inspiring Conference 2016)
Neos - past, present, future (Inspiring Conference 2016)
 
Meet Neos Nürnberg 2016: Ja ich will!
Meet Neos Nürnberg 2016: Ja ich will!Meet Neos Nürnberg 2016: Ja ich will!
Meet Neos Nürnberg 2016: Ja ich will!
 
Meet Neos Nürnberg 2016: Hallo Neos!
Meet Neos Nürnberg 2016: Hallo Neos!Meet Neos Nürnberg 2016: Hallo Neos!
Meet Neos Nürnberg 2016: Hallo Neos!
 
Turning Neos inside out / React.js HH
Turning Neos inside out / React.js HHTurning Neos inside out / React.js HH
Turning Neos inside out / React.js HH
 

Recently uploaded

Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 

Recently uploaded (20)

Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 

TYPO3 Flow and the Joy of Development (FOSDEM 2013)

  • 1. The Joy of Development
  • 2. project founder of Flow and Neos coach, coder, consultant Lübeck, Germany 1 wife, 2 daughters, TEXT HERE 1 espresso machine likes drumming
  • 3.
  • 5.
  • 7.
  • 9. Network Working Group R. Fielding Request for Comments: 2616 UC Irvine Obsoletes: 2068 J. Gettys Category: Standards Track Compaq/W3C J. Mogul Compaq H. Frystyk W3C/MIT L. Masinter Xerox P. Leach Microsoft T. Berners-Lee W3C/MIT June 1999 Hypertext Transfer Protocol -- HTTP/1.1 Status of this Memo This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet
  • 10. HTTP/1.1 has been designed to allow implementations of applications /** that do not depend on knowledge of ranges. * Represents a HTTP request */ 4 HTTP Message class Request extends Message { 4.1 Message Types /** * @var string HTTP messages consist of requests from client to server and responses */ from server to client. protected $method = 'GET'; HTTP-message = Request | Response ; HTTP/1.1 messages /** * @var TYPO3FlowHttpUri Request (section 5) and Response (section 6) messages use the generic */ message format of RFC 822 [9] for transferring entities (the payload protected $uri; of the message). Both types of message consist of a start-line, zero or more header fields (also known as "headers"), an empty line (i.e., /** a line with nothing preceding the CRLF) indicating the end of the * @var TYPO3FlowHttpUri header fields, and possibly a message-body. */ protected $baseUri; generic-message = start-line *(message-header CRLF) /** CRLF * @var array [ message-body ] */ start-line = Request-Line | Status-Line protected $arguments;
  • 12. $now = new DateTime(); $response->setLastModified($now);
  • 14. # set cookie in response: $response->setCookie(new Cookie('counter', 1)); # on next request, retrieve cookie: $cookie = $request->getCookie('counter');
  • 16. $request = Request::create($storageUri, 'PUT'); $request->setContent(fopen('myfavoritemovie.m4v', 'rb')); $request->setHeader('X-Category', 'Sissy'); $reponse = $browser->sendRequest($request);
  • 17. Model
  • 18. Domain-Driven Design /** * A Book * A methodology which ... * @FlowScope(“prototy pe”) * @FlowEntity */ • results in rich domain models class Book { /** • provides a common language across * @var string the project team */ protected $title; • simplify the design of complex /** * @var string applications */ protected $isbn; /** Flow is the first PHP framework tailored * @var string */ to Domain-Driven Design protected $description ; /** * @var integer */ protected $price;
  • 19. /** * A Book * * @FlowEntity */ class Book { /** * The title * @var string * @FlowValidate(type="StringLength", options={ "minimum"=1, */ protected $title; /** * The price * @var integer * @FlowValidate(type="NumberRange", options={ "minimum"=1, */ protected $price;
  • 20. /** * Get the Book's title * * @return string The Book's title */ public function getTitle() { return $this->title; } /** * Sets this Book's title * * @param string $title The Book's title * @return void */ public function setTitle($title) { $this->title = $title; }
  • 21. /** * A repository for Books * * @FlowScope("singleton") */ class BookRepository extends Repository { public function findBestSellers() { ... } }
  • 22. # Add a book $bookRepository->add($book); # Remove a book $bookRepository->remove($book); # Update a book $bookRepository->update($book);
  • 23. # Find one specific book $book = $bookRepository->findOneByTitle('Lord of the Rings'); # Find multiple books by property $books = $bookRepository->findByCategory('Fantasy'); # Find books through custom find method $bestsellingBooks = $bookRepository->findBestSellers();
  • 27. class HelloWorldController extends ActionController { /** * @return string */ public function greetAction() { return 'Hello World!'; } }
  • 28. Hello World! TEXT HERE
  • 29. /** * An action which sends greetings to $name * * @param string $name The name to mention * @return string */ public function greetAction($name) { return "Hello $name!"; }
  • 30.
  • 31. dev.demo.local/acme.demo/helloworld/greet.html?name=Robert dev.demo.local/acme.demo/helloworld/greet.html?name=Robert Hello Robert!
  • 32. View
  • 33. <html lang="en"> <head> <title>Templating</title> </head> <body> Our templating engine is called Fluid </body> </html>
  • 34. /** * @param string $name * @return void */ public function greetAction($name) { $this->view->assign('name', $name); }
  • 35. <html> <head> <title>Fluid Example</title> </head> <body> <p>Hello, {name}!</p> </body> </html>
  • 36. /** * Displays a list of best selling books * * @return void */ public function indexAction() { $books = $this->bookRepository->findBestSellers(); $this->view->assign('books', $books); }
  • 37. <ul> <f:for each="{books}" as="book"> <li>{book.title} by {book.author.name}</li> </f:for> </ul>
  • 39. <f:form action="create" name="newBook"> <ol> <li> <label for="name">Name</label> <f:form.textfield property="name" id="name" /> </li> <li> <f:form.submit value="Create" /> </li> </ol> </f:form>
  • 40. /** * Adds the given new book to the BookRepository * * @param AcmeDemoDomainModelBook $newBook * @return void */ public function createAction(Book $newBook) { $this->bookRepository->add($newBook); $this->addFlashMessage('Created a new book.'); $this->redirect('index'); }
  • 46.
  • 49. class SomeService { protected static $instance; public function getInstance() { if (self::$instance === NULL) { self::$instance = new self; } return self::$instance; } } class SomeOtherController { public function action() { $service = SomeService::getInstance(); … } }
  • 50. class ServiceLocator { protected static $services = array(); public function getInstance($name) { return self::$service[$name]; } } class SomeOtherController { public function action() { $service = ServiceLocate::getInstance("SomeService"); … } }
  • 51. Flow's take on Dependency Injection • one of the first PHP implementations (started in 2006, improved ever since) • object management for the whole lifecycle of all objects • no unnecessary configuration if information can be gathered automatically (autowiring) • intuitive use and no bad magical surprises • fast! (like hardcoded or faster)
  • 52. class BookController extends ActionController { /** * @var BookRepository */ protected $bookRepository; /** * @param BookRepository $bookRepository */ public function __construct(BookRepository $bookRepository) { $this->bookRepository = $bookRepository; } }
  • 53. class BookController extends ActionController { /** * @var BookRepository */ protected $bookRepository; /** * @param BookRepository $bookRepository */ public function injectBookRepository(BookRepository $bookRepository) { $this->bookRepository = $bookRepository; } }
  • 54. class BookController extends ActionController { /** * @FlowInject * @var BookRepository */ protected $bookRepository; }
  • 56. /** * An action which sends greetings to $name * * @param string $name The name to mention * @return string */ public function greetAction($name) { return "Hello $name!"; }
  • 57. dev.demo.local/acme.demo/helloworld/greet.html?name=Robert dev.demo.local/acme.demo/helloworld/greet.html?name=Robert Hello Robert!
  • 58. /** * @FlowAspect */ class DemoAspect { /** * @param TYPO3FlowAopJoinPointInterface $joinPoint * @return void * @FlowAround("method(.*->greetAction())") */ public function demoAdvice(JoinPointInterface $joinPoint) { $name = $joinPoint->getMethodArgument('name'); return sprintf('%s, you are running out of time!'); } }
  • 59. dev.demo.local/acme.demo/helloworld/greet.html?name=Robert dev.demo.local/acme.demo/helloworld/greet.html?name=Robert Robert, you are running out of time!
  • 61.
  • 62. resources: methods: BookManagementMethods: 'method(.*Controller->(new|create| edit|update|delete)Action())' roles: Customer: [] Administrator: [] acls: Administrator: methods: BookManagementMethods: GRANT
  • 63.
  • 64. Access Denied (in Development context)
  • 66. /** * A Basket * * @FlowScope("session") */ class Basket { /** * The books * @var array */ protected $books; /** * Adds a book to the basket * * @param RoeBooksShopDomainModelBasketook $book * @return void * @FlowSession(autoStart=true) */ public function addBook (Book $book) { $this->books[] = $book; }
  • 70.
  • 71. Rossmann • second biggest drug store in Germany • 5,13 billion € turnover • 31,000 employees Customer Database
  • 72. Amadeus • world’s biggest e-ticket provider • 217 markets • 948 million billable transactions / year • 2,7 billion € revenue Social Media Suite
  • 73. World of Textile • textile print and finishing • 30,000 articles / day • 180 employees E-Commerce Platform
  • 74. 2.0
  • 76. ?
  • 77. Thank you! Flow flow.typo3.org Slides slideshare.net/robertlemke Blog robertlemke.com Twitter @robertlemke Google+ plus.robertlemke.com