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.
2. Robert Lemke
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
3. 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
4. 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
30. Tackling the Heart of Software Development
/**
Domain-Driven Design * A Book
*
* @FLOW3Scope(“protot
ype”)
* @FLOW3Entity
A methodology which ... */
class Book {
• results in rich domain models /**
* @var string
*/
• provides a common language protected $title;
across the project team /**
* @var string
*/
• simplify the design of complex protected $isbn;
applications /**
* @var string
*/
protected $description
;
FLOW3 is the first PHP framework
/**
tailored to Domain-Driven Design * @var integer
*/
protected $price;
42. 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)
43. Constructor Injection
namespace AcmeDemoController;
use TYPO3FLOW3MvcControllerActionController;
use AcmeDemoServiceGreeterService;
class DemoController extends ActionController {
/**
* @var AcmeDemoServiceGreeterService
*/
protected $greeterService;
/**
* @param AcmeDemoServiceGreeterService
*/
public function __construct(GreeterService $greeterService) {
$this->greeterService = $greeterService;
}
/**
* @param string $name
*/
public function helloAction($name) {
return $this->greeterService->greet($name);
}
}
44. Setter Injection
namespace AcmeDemoController;
use TYPO3FLOW3MVCControllerActionController;
use AcmeDemoServiceGreeterService;
class DemoController extends ActionController {
/**
* @var AcmeDemoServiceGreeterService
*/
protected $greeterService;
/**
* @param AcmeDemoServiceGreeterService
*/
public function injectGreeterService(GreeterService $greeterService) {
$this->greeterService = $greeterService;
}
/**
* @param string $name
*/
public function helloAction($name) {
return $this->greeterService->greet($name);
}
}
45. Property Injection
namespace TYPO3DemoController;
use TYPO3FLOW3Annotations as FLOW3;
use TYPO3FLOW3MVCControllerActionController;
use AcmeDemoServiceGreeterService;
class DemoController extends ActionController {
/**
* @var TYPO3DemoServiceGreeterService
* @FLOW3Inject
*/
protected $greeterService;
/**
* @param string $name
*/
public function helloAction($name) {
return $this->greeterService->greet($name);
}
}