5. Who is this?
High School Teacher
Mathematics and Physics
6. Who is this?
Infected with
TYPO3 and FLOW3
in 2OO6
7. Who is this?
Infected with
TYPO3 and FLOW3
in 2OO6
8. Who is this?
Consultant
Software Engineer
Infinite Cloud LLC
9. Robert Lemke
project founder
FLOW3 and TYPO3 “Phoenix”
co-founder TYPO3 Association
coach, coder, consultant
36 years old
lives in Lübeck, Germany
credits to him for most of the slides
10. 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
11. 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;
46. Without Dependency Injection
namespace AcmeDemoController;
use TYPO3FLOW3MvcControllerActionController;
use AcmeDemoServiceGreeterService;
class DemoController extends ActionController {
/**
* @var AcmeDemoServiceGreeterServiceInterface
*
*/
protected $greeterService;
/**
*
*/
public function __construct() {
$this->greeterService = new AcmeDemoServiceGreeterService();
}
/**
* @param string $name
*/
public function helloAction($name) {
return $this->greeterService->greet($name);
}
47. Constructor Injection
namespace AcmeDemoController;
use TYPO3FLOW3MvcControllerActionController;
use AcmeDemoServiceGreeterService;
class DemoController extends ActionController {
/**
* @var AcmeDemoServiceGreeterServiceInterface
*
*/
protected $greeterService;
/**
* @param AcmeDemoServiceGreeterServiceInterface
*/
public function __construct(GreeterServiceInterface $greeterService) {
$this->greeterService = $greeterService;
}
/**
* @param string $name
*/
public function helloAction($name) {
return $this->greeterService->greet($name);
}
48. Setter Injection
namespace AcmeDemoController;
use TYPO3FLOW3MvcControllerActionController;
use AcmeDemoServiceGreeterService;
class DemoController extends ActionController {
/**
* @var AcmeDemoServiceGreeterServiceInterface
*
*/
protected $greeterService;
/**
* @param AcmeDemoServiceGreeterServiceInterface
*/
public function injectGreeterService(GreeterServiceInterface $greeterService) {
$this->greeterService = $greeterService;
}
/**
* @param string $name
*/
public function helloAction($name) {
return $this->greeterService->greet($name);
}
49. Property Injection
namespace AcmeDemoController;
use TYPO3FLOW3Annotations as FLOW3;
use TYPO3FLOW3MvcControllerActionController;
class DemoController extends ActionController {
/**
* @var AcmeDemoServiceGreeterServiceInterface
* @FLOW3Inject
*/
protected $greeterService;
/**
* @param string $name
*/
public function helloAction($name) {
return $this->greeterService->greet($name);
}
50. 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
gathered automatically (autowiring)
• intuitive use and no bad magical surprises
• fast! (like hardcoded or faster)