![Page 1: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/1.jpg)
(TYPO3)FLOW
![Page 2: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/2.jpg)
![Page 3: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/3.jpg)
![Page 4: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/4.jpg)
?
![Page 5: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/5.jpg)
![Page 6: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/6.jpg)
NEOSCMSEXTBASE
![Page 7: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/7.jpg)
Model Controller ViewController
![Page 8: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/8.jpg)
Model Controller ViewController
Modellierung&
SpeicherungSteuerung des
ProgrammflussesDarstellung
![Page 9: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/9.jpg)
Model Controller ViewController
Domain-drivenDesign TYPO3 FluidDependency
Injection
![Page 10: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/10.jpg)
Model Controller ViewController
Domain-drivenDesign TYPO3 FluidDependency
Injection
Aspect-oriented Programming
![Page 11: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/11.jpg)
Model Controller ViewController
Domain-drivenDesign
![Page 12: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/12.jpg)
Entwickler
Kunde
![Page 13: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/13.jpg)
Entwickler
Kunde
![Page 14: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/14.jpg)
Entwickler
Kunde
![Page 15: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/15.jpg)
Entwickler
Kunde
![Page 16: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/16.jpg)
Entwickler
Kunde
Domänen-
ModellubiquitäreSprache
![Page 17: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/17.jpg)
Entwickler
Kunde
Domänen-
ModellubiquitäreSprache
![Page 18: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/18.jpg)
KUH● Name● Geburtstag● …
WEIDE● Größe● Ort● …
FARBE● RGB-Wert
GRASHALM● Länge● …
![Page 19: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/19.jpg)
KUH● Name● Geburtstag● …
WEIDE● Größe● Ort● …
FARBE● RGB-Wert
GRASHALM● Länge● …
Entitäten
![Page 20: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/20.jpg)
KUH● Name● Geburtstag● …
WEIDE● Größe● Ort● …
FARBE● RGB-Wert
GRASHALM● Länge● …
Wertobjekt
![Page 21: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/21.jpg)
KUH● Name● Geburtstag● …
WEIDE● Größe● Ort● …
FARBE● RGB-Wert
GRASHALM● Länge● …
lebt auf
hat
hat
Assoziationen
![Page 22: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/22.jpg)
KUH● Name● Geburtstag● …
WEIDE● Größe● Ort● …
FARBE● RGB-Wert
GRASHALM● Länge● …
1n
1
n
n
1
Assoziationen
![Page 23: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/23.jpg)
Aggregate
KUH● Name● Geburtstag● …
WEIDE● Größe● Ort● …
FARBE● RGB-Wert
GRASHALM● Länge● …
GRASTYP● Name
![Page 24: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/24.jpg)
KUHRepository
WEIDERepository
FARBE● RGB-Wert
GRASHALM● Länge● …
GRASTYP● Name
![Page 25: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/25.jpg)
use TYPO3\Flow\Annotations as Flow;use Doctrine\ORM\Mapping as ORM;
/** * @Flow\Entity */class Cow {
/** * @var string * @Flow\Identity * @ORM\Column(length=80)
*/protected $name;
/** * @var \DateTime
*/protected $birthday;
…
![Page 26: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/26.jpg)
use TYPO3\Flow\Annotations as Flow;
/**
* @Flow\Scope("singleton")
*/
class CowRepository extends \TYPO3\Flow\Persistence\Repository{}
![Page 27: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/27.jpg)
Model Controller ViewController
DependencyInjection
![Page 28: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/28.jpg)
http://cows.local/<PACKAGE>/<CONTROLLER>/<ACTION>
![Page 29: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/29.jpg)
http://cows.local/my.package/cow/list
![Page 30: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/30.jpg)
class CowController extends \TYPO3\Flow\Mvc\Controller\ActionController {
public function listAction() {
$cows = $this->cowRepository->findAll();
$this->view->assign("cows", $cows);
}
}
![Page 31: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/31.jpg)
class CowController extends \TYPO3\Flow\Mvc\Controller\ActionController {
public function listAction() {
$cows = $this->cowRepository->findAll();
$this->view->assign("cows", $cows);
}
}
![Page 32: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/32.jpg)
class CowController extends \TYPO3\Flow\Mvc\Controller\ActionController {
/** * @var MY\PACKAGE\Domain\Repository\CowRepository * @Flow\Inject */protected $cowRepository;
public function listAction() {
$cows = $this->cowRepository->findAll();
$this->view->assign("cows", $cows);
}
}
Dependency Injection
![Page 33: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/33.jpg)
Dependency Injection
"Dependency Injection" is a 25-dollar term for a 5-cent concept
● Inversion of ControlKontrolle über den Programmfluss wird an eine (übergeordnete) Komponente abgegeben
● Hollywood-Prinzip„Don‘t call us, we‘ll call you“
![Page 34: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/34.jpg)
Dependency Injection
/** * @var MY\PACKAGE\Interfaces\CowInterface * @Flow\Inject */protected $cowInterface;
mit Dependency Injection
![Page 35: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/35.jpg)
Dependency Injection
/** * @var MY\PACKAGE\Interfaces\CowInterface * @Flow\Inject */protected $cowInterface;
protected $cowInterface;
public function __construct() {$cowInterface = new ConcreteCow();
}
mit Dependency Injection
ohne Dependency Injection
![Page 36: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/36.jpg)
class CowController extends \TYPO3\Flow\Mvc\Controller\ActionController {
/** * @param MY\PACKAGE\Domain\Model\Cow $cow */public function showAction(Cow $cow) {
$this->view->assign("cow", $cow);}
}
![Page 37: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/37.jpg)
class CowController extends \TYPO3\Flow\Mvc\Controller\ActionController {
/** * @param MY\PACKAGE\Domain\Model\Cow $cow */public function showAction(Cow $cow) {
$this->view->assign("cow", $cow);}
}
http://cows.local/my.package/cow/show/99ad52e5-61a7-4060-b616-2715c74eaafd
Property Mapping
![Page 38: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/38.jpg)
class CowController extends \TYPO3\Flow\Mvc\Controller\ActionController {
/** * @param MY\PACKAGE\Domain\Model\Cow $cow */public function showAction(Cow $cow) {
$this->view->assign("cow", $cow);}
}
http://cows.local/cows/volma
Property Mapping
![Page 39: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/39.jpg)
Model Controller ViewController
TYPO3 Fluid
![Page 40: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/40.jpg)
<f:layout name="Default" />
<f:section name="Title">{cow.name}</f:section>
<f:section name="Content">
<h1>{cow.name}</h1>
<f:format.date format="d.m.Y">{cow.birthday}</f:format.date>
</f:section>
…/MY.PACKAGE/Resources/Private/Templates/Cow/Show.html
Fluid-Template
![Page 41: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/41.jpg)
<f:layout name="Default" />
<f:section name="Title">{cow.name}</f:section>
<f:section name="Content">
<h1>{cow.name}</h1>
<f:format.date format="d.m.Y">{cow.birthday}</f:format.date>
</f:section>
…/MY.PACKAGE/Resources/Private/Templates/Cow/Show.html
Platzhalter
![Page 42: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/42.jpg)
<f:layout name="Default" />
<f:section name="Title">{cow.name}</f:section>
<f:section name="Content">
<h1>{cow.name}</h1>
<f:format.date format="d.m.Y">{cow.birthday}</f:format.date>
</f:section>
…/MY.PACKAGE/Resources/Private/Templates/Cow/Show.html
Fluid-ViewHelper
![Page 43: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/43.jpg)
{namespace cow=MY\PACKAGE\ViewHelpers}
<f:layout name="Default" />
<f:section name="Title">{cow.name}</f:section>
<f:section name="Content">
<h1>{cow.name}</h1>
<f:format.date format="d.m.Y">{cow.birthday}</f:format.date>
<cow:isVolma cow="{cow}" />
</f:section>
…/MY.PACKAGE/Resources/Private/Templates/Cow/Show.html
eigene ViewHelper
![Page 44: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/44.jpg)
http://cows.local/cows/volma
![Page 45: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/45.jpg)
Model Controller ViewController
Aspect-oriented Programming
![Page 46: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/46.jpg)
1
2
3
4
5
6
7
8
9
SomeClass.php
![Page 47: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/47.jpg)
1
2
3
4
5
6
7
8
9
Core Concerndomänenspezifisch
SomeClass.php
![Page 48: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/48.jpg)
1
2
3
4
5
6
7
8
9
Core Concerndomänenspezifisch
LoggingConcern
SomeClass.php
![Page 49: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/49.jpg)
Core Concerndomänenspezifisch
LoggingConcern
SecurityConcern
1
2
3
4
5
6
7
8
9
SomeClass.php
![Page 50: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/50.jpg)
Core Concerndomänenspezifisch
LoggingConcern
SecurityConcern
1
2
3
4
5
6
7
8
9
Cross-cuttingConcerns
SomeClass.php
![Page 51: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/51.jpg)
SomeClass.php
Core Concerndomänenspezifisch
LoggingConcern
SecurityConcern
1
2
3
4
5
6
7
8
9
Cross-cutting Concerns
![Page 52: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/52.jpg)
Core Concerndomänenspezifisch
LoggingConcern
SecurityConcern
1
2
3
4
5
6
7
8
9
SomeClass.php
![Page 53: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/53.jpg)
1
2
3
4
5
6
Core Concerndomänenspezifisch
LoggingConcern
SecurityConcern
Core Concerndomänenspezifisch
LoggingConcern
SecurityConcern
Separation of Concerns
1
2
1
![Page 54: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/54.jpg)
1
2
3
4
5
6
Core Concerndomänenspezifisch
LoggingConcern
SecurityConcern
Core Concerndomänenspezifisch
LoggingConcern
SecurityConcern
1
2
1
Aspekte
![Page 55: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/55.jpg)
use TYPO3\Flow\Annotations as Flow;
class CowController extends \TYPO3\Flow\Mvc\Controller\ActionController {
/** * @param MY\PACKAGE\Domain\Model\Cow $cow */public function showAction(Cow $cow) {
Logger::log("A cow has been shown");$this->view->assign("cow", $cow);
}
}
![Page 56: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/56.jpg)
/* * @Flow\Aspect */class LoggingAspect {
}
Aspect
![Page 57: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/57.jpg)
/* * @Flow\Aspect */class LoggingAspect {
public function logAdvice() {}
}
Advice
![Page 58: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/58.jpg)
/* * @Flow\Aspect */class LoggingAspect {
/** * @param JoinPointInterface $joinPoint */
public function logAdvice(JoinPointInterface $joinPoint) {}
}
Join point
![Page 59: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/59.jpg)
Programmausführung
![Page 60: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/60.jpg)
/* * @Flow\Aspect */class LoggingAspect {
/** * @param JoinPointInterface $joinPoint * @Flow\After() */
public function logAdvice(JoinPointInterface $joinPoint) {}
}
Pointcut
![Page 61: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/61.jpg)
/* * @Flow\Aspect */class LoggingAspect {
/** * @param JoinPointInterface $joinPoint * @Flow\After("method()") */
public function logAdvice(JoinPointInterface $joinPoint) {}
}
Target
![Page 62: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/62.jpg)
/* * @Flow\Aspect */class LoggingAspect {
/** * @param JoinPointInterface $joinPoint * @Flow\After("method(MY\PACKAGE\Controller\.*->.*())") */
public function logAdvice(JoinPointInterface $joinPoint) {}
}
Target
![Page 63: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/63.jpg)
CowController->showAction()
LoggingAspect->logAdvice()
Programmausführung
![Page 64: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/64.jpg)
/* * @Flow\Aspect */class LoggingAspect {
/** * @param JoinPointInterface $joinPoint * @Flow\After("method(MY\PACKAGE\Controller\.*->.*())") */public function logAdvice(JoinPointInterface $joinPoint) {
Logger::log($joinPoint->getClassName().‘->‘.$joinPoint->getMethodName().‘() has been executed‘
);}
}
![Page 65: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/65.jpg)
1
2
3
4
5
6
Core Concerndomänenspezifisch
LoggingConcern
SecurityConcern
Core Concerndomänenspezifisch
LoggingConcern
SecurityConcern
1
2
1
![Page 66: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/66.jpg)
Model Controller ViewController
Domain-drivenDesign TYPO3 FluidDependency
Injection
Aspect-oriented Programming
![Page 67: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/67.jpg)
Test-driven Development
Object Validation
Lokalisierung
Signals & Slots
Resource Management
CLI
Package Management
Security
Cache
Doctrine ORM
![Page 68: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/68.jpg)
Vielen Dank für Eure Aufmerksamkeit
![Page 69: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/69.jpg)
Fragen?
![Page 70: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/70.jpg)
cowuser> ./flow doctrine:create
![Page 71: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/71.jpg)
cowuser> ./flow doctrine:create
ORM
(Doctrine)Model-Klasse
relationalesSchema
![Page 72: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/72.jpg)
cowuser> ./flow doctrine:create
ORM
(Doctrine)Model-Klasse
relationalesSchema
![Page 73: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/73.jpg)
-
name: 'single cow route'
uriPattern: 'cows/{cow}'
defaults:
'@package': 'MY.PACKAGE'
'@controller': 'Cow'
'@action': 'show'
routeParts:
cow:
objectType: 'MY\PACKAGE\Domain\Model\Cow'
http://cows.local/cows/volma
Routing
![Page 74: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/74.jpg)
{namespace cow=MY\PACKAGE\ViewHelpers}
<f:layout name="Default" />
<f:section name="Title">{cow.name}</f:section>
<f:section name="Content">
<h1>{cow.name}</h1>
<f:format.date format="d.m.Y">{cow.birthday}</f:format.date>
<cow:isVolma cow="{cow}" />
</f:section>
…/MY.PACKAGE/Resources/Private/Templates/Cow/Show.html
eigene ViewHelper
![Page 75: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/75.jpg)
class IsVolmaViewHelper extends \TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper {
}
![Page 76: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/76.jpg)
class IsVolmaViewHelper extends \TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper {
/**
* @param \MY\PACKAGE\Domain\Model\Cow $cow
*/
public function render($cow) {}
}
![Page 77: (TYPO3) FLOW · Dependency TYPO3 Fluid Injection. Model Controller View Domain-driven Design Dependency TYPO3 Fluid Injection Aspect-oriented Programming. Model Controller View Domain-driven](https://reader033.vdocuments.us/reader033/viewer/2022053023/605650d995c47c43d40409e5/html5/thumbnails/77.jpg)
class IsVolmaViewHelper extends \TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper {
/**
* @param \MY\PACKAGE\Domain\Model\Cow $cow
*/
public function render($cow) {
if($cow->getName() === "Volma"){ return "YES!"; }
}
}