The Secret Recipe of a Juicy M
-
Upload
robert-lemke -
Category
Documents
-
view
1.211 -
download
0
description
Transcript of The Secret Recipe of a Juicy M
International PHP Conference 2010, Mainz
Robert Lemke
The Secret Recipe for a Juicy M
Montag, 11. Oktober 2010
Robert Lemkechief architect of TYPO3 Phoenix and FLOW3
co-founder of the TYPO3 Association
34 years old
lives in Lübeck, Germany
1 wife, 1 daughter, 1 espresso machine
likes drumming
Montag, 11. Oktober 2010
= PHP 5.3 Full Stack Application Framework
Montag, 11. Oktober 2010
The Secret Recipe for a Juicy M International PHP Conference 2010, Mainz
The FLOW3 ExperienceFlow [flō] The mental state of operation in which the person is fully immersed in what he or she is doing by a feeling of energized focus, full involvement, and success in the process of the activity. Proposed by positive psychologist Mihály Csíkszentmihályi, the concept has been widely referenced across a variety of fields.
FLOW3 [flō'three] The application framework which takes care of all hassle and lets you play the fun part.
Montag, 11. Oktober 2010
OOP Object-Oriented Programming
AOP Aspect-Oriented Programming
MVC Model View Controller
POPO Plain Old PHP Object
DI Dependency Injection DRY
YAGNI
CoC
TDD
YAA
DDD Domain-Driven Design
Montag, 11. Oktober 2010
The Secret Recipe for a Juicy M International PHP Conference 2010, Mainz
Domain-Driven Design
lightblue.com
Lorem Ipsum id solum civibus definitionem usu, ex elit contentiones ius. Lorem his quando facilisis efficiantur cu, delenit laboramus eos id, nec lorem invidunt te. Suas aliquid consequuntur ne mei, cu qui dicit graeco timeam. Ad assum decore definitiones ius, has dicat aliquip vocibus te, at per velit viderer legimus. Per no
DomainDesign
Montag, 11. Oktober 2010
The Secret Recipe for a Juicy M International PHP Conference 2010, Mainz
Domain: The activity or business of the user
Montag, 11. Oktober 2010
The Secret Recipe for a Juicy M International PHP Conference 2010, Mainz
GoalTo solve real problems of a real domain
Montag, 11. Oktober 2010
The Secret Recipe for a Juicy M International PHP Conference 2010, Mainz
Domain-Driven Design
Montag, 11. Oktober 2010
The Secret Recipe for a Juicy M International PHP Conference 2010, Mainz
Domain-Driven Designfocus on the domain and domain logic
Montag, 11. Oktober 2010
The Secret Recipe for a Juicy M International PHP Conference 2010, Mainz
Domain-Driven Designfocus on the domain and domain logic
accurately map the domain concepts to software
Montag, 11. Oktober 2010
The Secret Recipe for a Juicy M International PHP Conference 2010, Mainz
Domain-Driven Designfocus on the domain and domain logic
accurately map the domain concepts to software
form a ubiquitous language among the project members
Montag, 11. Oktober 2010
Montag, 11. Oktober 2010
The Secret Recipe for a Juicy M International PHP Conference 2010, Mainz
Ubiquitous languagea common vocabulary: important prerequisite for successful collaboration
use same words for
discussionmodelingdevelopmentdocumentation
class FlagshipStore {
...
public function isProfitable() { return ($this->earnings > ($this->expenses + $this->safetyMargin); }
...
Montag, 11. Oktober 2010
The Secret Recipe for a Juicy M International PHP Conference 2010, Mainz
Layered Architecture
Presentation
Domain
Data source
Application Logic
Domain Model
View
Controller
Data Mapper (Persistence)
Data Source Abstraction
Montag, 11. Oktober 2010
Montag, 11. Oktober 2010
Montag, 11. Oktober 2010
Montag, 11. Oktober 2010
Montag, 11. Oktober 2010
Montag, 11. Oktober 2010
The Secret Recipe for a Juicy M International PHP Conference 2010, Mainz
DDD Building Blocks
Entity Value Object
Aggregate
ServiceFactory
Repository
Montag, 11. Oktober 2010
The Secret Recipe for a Juicy M International PHP Conference 2010, Mainz
Defined by its identity (instead of its properties)
Examples: Participant, Blog Post
(you probably used artificial keys like a UUID for identifying entities in a database table)
Entity
Montag, 11. Oktober 2010
The Secret Recipe for a Juicy M International PHP Conference 2010, Mainz
Defined by its value
Immutable
Examples: Color, Tag
Green
Pantone 354cR: 105 / G: 165 / B: 80#69A550
Value Object
#IPC10
Montag, 11. Oktober 2010
The Secret Recipe for a Juicy M International PHP Conference 2010, Mainz
Actions within the domain which can'tbe implemted by entities and value objectsalone
Services should be stateless
Example: "Postpone Conference Service"
Service
Montag, 11. Oktober 2010
The Secret Recipe for a Juicy M International PHP Conference 2010, Mainz
Compound of Entities and Value Objects
Entity is Aggregate Root
No direct references to objects inside theAggregate from outside
Reduces complexity
Examples: Speaker Profile, Blog Post, Car ...
Aggregate
Montag, 11. Oktober 2010
The Secret Recipe for a Juicy M International PHP Conference 2010, Mainz
a.k.a. "where you keep things"
connection between clean domainand dirty data storage
provides query methods forretrieving domain objects
Repository
Montag, 11. Oktober 2010
The Secret Recipe for a Juicy M International PHP Conference 2010, MainzMontag, 11. Oktober 2010
The Secret Recipe for a Juicy M International PHP Conference 2010, MainzMontag, 11. Oktober 2010
The Secret Recipe for a Juicy M International PHP Conference 2010, Mainz
Further ReadingFLOW3 Websitehttp://flow3.typo3.org
FLOW3 Downloadhttp://flow3.typo3.org/downloadgit://git.typo3.org/FLOW3/Distributions/Base.git
TYPO3 Forgehttp://forge.typo3.org
Further Readinghttp://flow3.typo3.org/about/principles/further-reading
Montag, 11. Oktober 2010
The Secret Recipe for a Juicy M International PHP Conference 2010, Mainz
Questions
Email: [email protected]: http://robertlemke.de/blogTwitter: @t3rob
Slides: http://slideshare.net/rlmpFeedback: http://joind.in/talk/view/2182
Montag, 11. Oktober 2010
Montag, 11. Oktober 2010