Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Hands on FLOW3 (IPCSE12)

Hands on FLOW3 (IPCSE12)

The FLOW3 framework got a lot of attention when version 1.0 was released after years of development. Its main approach is to deliver a whole-in-one concept for modern programming techniques and guiding developers to write excellent code. This session takes you on a tour through FLOW3's key features by demonstrating the making of a real application.

Avatar for Robert Lemke

Robert Lemke

June 06, 2012
Tweet

More Decks by Robert Lemke

Other Decks in Technology

Transcript

  1. project founder of FLOW3 and TYPO3 “Phoenix” co-founder of the

    TYPO3 Association coach, coder, consultant 36 years old lives in Lübeck, Germany 1 wife, 2 daughters, 1 espresso machine likes drumming Robert Lemke
  2. At a Glance FLOW3 is a web application platform •

    holistic concept for your apps • modular, extensible, package based • pedantically clean with focus on quality • puts a smile on developer’s faces • free & Open Source (LGPL v3) • backed by one of the largest Open Source projects
  3. Foundation for the Next Generation CMS TYPO3 “Phoenix” is the

    all-new Enterprise CMS • content repository, workspaces, versions, i18n, modular UI ... • powered by FLOW3 • compatible code base • use TYPO3 features in FLOW3 standalone apps as you like
  4. Tackling the Heart of Software Development Domain-Driven Design A methodology

    which ... • results in rich domain models • provides a common language across the project team • simplify the design of complex applications FLOW3 is the first PHP framework tailored to Domain-Driven Design /** * A Book * * @FLOW3\Scope(“prototype”) * @FLOW3\Entity */ class Book { /** * @var string */ protected $title; /** * @var string */ protected $isbn; /** * @var string */ protected $description; /** * @var integer */ protected $price;
  5. Object Management FLOW3'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 gatered automatically (autowiring) • intuitive use and no bad magical surprises • fast! (like hardcoded or faster)
  6. namespace Acme\Demo\Controller; use TYPO3\FLOW3\Mvc\Controller\ActionController; use Acme\Demo\Service\GreeterService; class DemoController extends ActionController

    { /** * @var \Acme\Demo\Service\GreeterService */ protected $greeterService; /** * @param \Acme\Demo\Service\GreeterService */ public function __construct(GreeterService $greeterService) { $this->greeterService = $greeterService; } /** * @param string $name */ public function helloAction($name) { return $this->greeterService->greet($name); } } Constructor Injection
  7. namespace Acme\Demo\Controller; use TYPO3\FLOW3\MVC\Controller\ActionController; use Acme\Demo\Service\GreeterService; class DemoController extends ActionController

    { /** * @var \Acme\Demo\Service\GreeterService */ protected $greeterService; /** * @param \Acme\Demo\Service\GreeterService */ public function injectGreeterService(GreeterService $greeterService) { $this->greeterService = $greeterService; } /** * @param string $name */ public function helloAction($name) { return $this->greeterService->greet($name); } } Setter Injection
  8. namespace TYPO3\Demo\Controller; use TYPO3\FLOW3\Annotations as FLOW3; use TYPO3\FLOW3\MVC\Controller\ActionController; use Acme\Demo\Service\GreeterService;

    class DemoController extends ActionController { /** * @var \TYPO3\Demo\Service\GreeterService * @FLOW3\Inject */ protected $greeterService; /** * @param string $name */ public function helloAction($name) { return $this->greeterService->greet($name); } } Property Injection
  9. Rossmann •second biggest drug store in Germany •5,13 billion €

    turnover •31,000 employees Customer Database
  10. Amadeus •world’s biggest e-ticket provider •217 markets •948 million billable

    transactions / year •2,7 billion € revenue Social Media Suite
  11. FLOW3 1.0 FLOW3 1.1 transactions / second 27 71 longest

    transaction 1.06 0.38 shortest transaction 0.19 0.08 memory peak 19,8 MB 5,1 MB Project X
  12. ?