SlideShare a Scribd company logo
© 2014 OXID eSales AG 
How To Map Domain Changes 
On An Existing Database 
OXID eSales AG 
Philip Washington Sorst 
Software Architect
© 2014 OXID eSales AG 
An Example: The Article 
Article 
id 
title 
pic1 
pic2 
pic3
position 
© 2014 OXID eSales AG 
An Example: The Product 
id 
1 of n 
Product Picture 
title path
Web Frontend REST 
© 2014 OXID eSales AG 
Architecture (1) 
Controller 
Repositories 
Presentation Layer 
Data Layer
Web Frontend REST 
© 2014 OXID eSales AG 
Architecture (2) 
Controller 
Domain Services 
Repositories 
Presentation Layer 
Business Logic Layer 
Data Layer
ProductController 
ProductServiceInterface CategoryServiceInterface 
© 2014 OXID eSales AG 
The Business Logic Layer 
ProductService CategoryService 
DomainEntities DomainEntities 
Data Layer
© 2014 OXID eSales AG 
An Example: The ProductInterface 
interface ProductInterface 
{ 
function getId(); 
function getTitle(); 
function setTitle($title); 
function getPictures(); 
function setPictureAt($position, $path); 
}
© 2014 OXID eSales AG 
An Example: The ProductWrapper 
class ProductWrapper implements ProductInterface 
{ 
protected $article; 
function getId() { $this­> 
article­> 
getId(); } 
function getPictures() 
{ 
return array( 
$this­> 
article­> 
getPic1(), 
$this­> 
article­> 
getPic2(), 
$this­> 
article­> 
getPic3()); 
} 
... 
}
Business Logic Layer 
Data Layer 
queries DomainEntityInterface 
© 2014 OXID eSales AG 
The Data Layer 
Repository 
DAO 
Service 
Mapper 
DatabaseEntityWrapper 
DatabaseEntity 
Row 
queries 
maps 
returns 
builds 
queries
© 2014 OXID eSales AG 
/** 
* @ORMTable() 
* @ORMEntity() 
*/ 
class Product implements ProductInterface 
{ 
/** 
* @ORMColumn(name="id", type="integer") 
* @ORMId 
* @ORMGeneratedValue(strategy="AUTO") 
*/ 
private $id; 
/** @ORMColumn(name="title", type="string", length=255) */ 
private $title; 
/** @ORMOneToMany(targetEntity="Picture", mappedBy="article", 
cascade={"ALL"}, indexBy="picture") */ 
private $pictures;
© 2014 OXID eSales AG 
Migration 
MigrationService 
LegacyRepository DoctrineRepository 
LegacyDao 
DomainEntityConverter 
LegacyDB TargetDB
© 2014 OXID eSales AG 
Why we are using Symfony 
> Open Source 
> Focus on clean OO Development (DI, Events) 
> Is more than a web framework 
> Can be introduced step by step 
> We don't need to reinvent the wheel, great bundles available 
> We need to be easily extendable, so building bundles ourself 
> Mature and well supported 
> Superior Documentation
© 2014 OXID eSales AG 
Discussion: The Cons 
> Performance might become an issue 
– But our layered architecture allows us easily cache stuff 
and build performance optimized services 
> The wrapping needs much love (=time) to be fully backwards 
compatible, testing 
> Of course there are still some modelling limitations imposed
© 2014 OXID eSales AG 
Discussion: The Pros 
> A redefined view on our own domain, built for the future 
> We don't break things too early 
> Design flaws can be identified and removed 
> Things become exchangable, as soon as migration is possible 
the wrapping will vanish 
> Implicit migration for the database. Use the wrapper layer to 
read, use the new domain to write
© 2014 OXID eSales AG 
Credits 
> Icons: 
– Shmidt Sergey (The Noun Project)
Thank you for your attention! 
© 2014 OXID eSales AG 
OXID eSales AG 
Bertoldstraße 48 
79098 Freiburg 
GERMANY 
www.oxid-esales.com 
E-Mail: info@oxid-esales.com 
Fon: +49 761 368 89 0

More Related Content

What's hot

AWS Enterprise Summit London 2013 - Bob Harris - Channel 4
AWS Enterprise Summit London 2013 - Bob Harris - Channel 4 AWS Enterprise Summit London 2013 - Bob Harris - Channel 4
AWS Enterprise Summit London 2013 - Bob Harris - Channel 4
Amazon Web Services
 

What's hot (20)

Deploying Kubernetes on AWS Using Terraform
Deploying Kubernetes on AWS Using TerraformDeploying Kubernetes on AWS Using Terraform
Deploying Kubernetes on AWS Using Terraform
 
Engage, Amaze and Deliver with EPiServer in the AWS Cloud - Customer: Reed Bu...
Engage, Amaze and Deliver with EPiServer in the AWS Cloud - Customer: Reed Bu...Engage, Amaze and Deliver with EPiServer in the AWS Cloud - Customer: Reed Bu...
Engage, Amaze and Deliver with EPiServer in the AWS Cloud - Customer: Reed Bu...
 
Forge - DevCon 2017, Darmstadt Germany: Control & program a real robot by man...
Forge - DevCon 2017, Darmstadt Germany: Control & program a real robot by man...Forge - DevCon 2017, Darmstadt Germany: Control & program a real robot by man...
Forge - DevCon 2017, Darmstadt Germany: Control & program a real robot by man...
 
Forge - DevCon 2017, Darmstadt Germany: Innovate with Forge
Forge - DevCon 2017, Darmstadt Germany: Innovate with ForgeForge - DevCon 2017, Darmstadt Germany: Innovate with Forge
Forge - DevCon 2017, Darmstadt Germany: Innovate with Forge
 
API Management: La Puerta de enlace (por Francisco Nieto)
API Management: La Puerta de enlace (por Francisco Nieto)API Management: La Puerta de enlace (por Francisco Nieto)
API Management: La Puerta de enlace (por Francisco Nieto)
 
Developing 3D Visualization Apps
Developing 3D Visualization AppsDeveloping 3D Visualization Apps
Developing 3D Visualization Apps
 
AWS Finland Meetup 2019 April
AWS Finland Meetup 2019 AprilAWS Finland Meetup 2019 April
AWS Finland Meetup 2019 April
 
Aws re invent 2014 feedback
Aws re invent 2014 feedbackAws re invent 2014 feedback
Aws re invent 2014 feedback
 
DevTest Labs en Azure (por Iván Cañizares)
DevTest Labs en Azure (por Iván Cañizares)DevTest Labs en Azure (por Iván Cañizares)
DevTest Labs en Azure (por Iván Cañizares)
 
Cloud Builders Meetup - Containers @ Autodesk
Cloud Builders Meetup - Containers @ AutodeskCloud Builders Meetup - Containers @ Autodesk
Cloud Builders Meetup - Containers @ Autodesk
 
BIML- What is it good for?
BIML- What is it good for?BIML- What is it good for?
BIML- What is it good for?
 
What's New in KNIME Analytics Platform 4.1
What's New in KNIME Analytics Platform 4.1What's New in KNIME Analytics Platform 4.1
What's New in KNIME Analytics Platform 4.1
 
Microsoft Azure News - Apr 2017
Microsoft Azure News - Apr 2017Microsoft Azure News - Apr 2017
Microsoft Azure News - Apr 2017
 
BizTalk Server 2016: What’s new
BizTalk Server 2016: What’s newBizTalk Server 2016: What’s new
BizTalk Server 2016: What’s new
 
Forge - DevCon 2016: Drawings! Drawings! Everywhere!
Forge - DevCon 2016: Drawings! Drawings! Everywhere!Forge - DevCon 2016: Drawings! Drawings! Everywhere!
Forge - DevCon 2016: Drawings! Drawings! Everywhere!
 
Event Report - Kronos KronosWorks - Solid progress and big things loom
Event Report - Kronos KronosWorks - Solid progress and big things loom Event Report - Kronos KronosWorks - Solid progress and big things loom
Event Report - Kronos KronosWorks - Solid progress and big things loom
 
Forge - DevCon 2017, Darmstadt Germany: Moving to Forge and the Cloud with yo...
Forge - DevCon 2017, Darmstadt Germany: Moving to Forge and the Cloud with yo...Forge - DevCon 2017, Darmstadt Germany: Moving to Forge and the Cloud with yo...
Forge - DevCon 2017, Darmstadt Germany: Moving to Forge and the Cloud with yo...
 
Forge - DevCon 2017, Darmstadt Germany: HFDM - What, why & how?
Forge - DevCon 2017, Darmstadt Germany: HFDM - What, why & how?Forge - DevCon 2017, Darmstadt Germany: HFDM - What, why & how?
Forge - DevCon 2017, Darmstadt Germany: HFDM - What, why & how?
 
Forge - DevCon 2017, Darmstadt Germany: Integrating Forge Data Management API...
Forge - DevCon 2017, Darmstadt Germany: Integrating Forge Data Management API...Forge - DevCon 2017, Darmstadt Germany: Integrating Forge Data Management API...
Forge - DevCon 2017, Darmstadt Germany: Integrating Forge Data Management API...
 
AWS Enterprise Summit London 2013 - Bob Harris - Channel 4
AWS Enterprise Summit London 2013 - Bob Harris - Channel 4 AWS Enterprise Summit London 2013 - Bob Harris - Channel 4
AWS Enterprise Summit London 2013 - Bob Harris - Channel 4
 

Similar to How to map Domain changes on an existing Database

Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...
Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...
Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...
mfrancis
 
Azure Administration.docx
Azure  Administration.docxAzure  Administration.docx
Azure Administration.docx
Futurepoint13
 
Discover Smart Solutions for Enterprise Cloud Storage on Amazon Web Services
Discover Smart Solutions for Enterprise Cloud Storage on Amazon Web ServicesDiscover Smart Solutions for Enterprise Cloud Storage on Amazon Web Services
Discover Smart Solutions for Enterprise Cloud Storage on Amazon Web Services
Oxygen Cloud
 

Similar to How to map Domain changes on an existing Database (20)

Open Architecture in the Adobe Marketing Cloud - Summit 2014
Open Architecture in the Adobe Marketing Cloud - Summit 2014Open Architecture in the Adobe Marketing Cloud - Summit 2014
Open Architecture in the Adobe Marketing Cloud - Summit 2014
 
Oracle ICS Best Practises - 1st Presented at Oracle Partner PaaS Forum by Phi...
Oracle ICS Best Practises - 1st Presented at Oracle Partner PaaS Forum by Phi...Oracle ICS Best Practises - 1st Presented at Oracle Partner PaaS Forum by Phi...
Oracle ICS Best Practises - 1st Presented at Oracle Partner PaaS Forum by Phi...
 
VisiQuate: Azure cloud migration case study
VisiQuate: Azure cloud migration case studyVisiQuate: Azure cloud migration case study
VisiQuate: Azure cloud migration case study
 
Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...
Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...
Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...
 
Running SOA in the Cloud: SOA CS for SOA Suite Customers
Running SOA in the Cloud: SOA CS for SOA Suite CustomersRunning SOA in the Cloud: SOA CS for SOA Suite Customers
Running SOA in the Cloud: SOA CS for SOA Suite Customers
 
Continuous Delivery to the cloud - Innovate 2014
Continuous Delivery to the cloud - Innovate 2014Continuous Delivery to the cloud - Innovate 2014
Continuous Delivery to the cloud - Innovate 2014
 
Sightly_techInsight
Sightly_techInsightSightly_techInsight
Sightly_techInsight
 
Real World Modern Development Use Cases with RackHD and Adobe
Real World Modern Development Use Cases with RackHD and AdobeReal World Modern Development Use Cases with RackHD and Adobe
Real World Modern Development Use Cases with RackHD and Adobe
 
56k.cloud training
56k.cloud training56k.cloud training
56k.cloud training
 
Surviving the Azure Avalanche
Surviving the Azure AvalancheSurviving the Azure Avalanche
Surviving the Azure Avalanche
 
Azure Administration.docx
Azure  Administration.docxAzure  Administration.docx
Azure Administration.docx
 
[Cloud OnAir] Talks by DevRel Vol.4 データ管理とデータ ベース 2020年8月27日 放送
[Cloud OnAir] Talks by DevRel Vol.4 データ管理とデータ ベース 2020年8月27日 放送[Cloud OnAir] Talks by DevRel Vol.4 データ管理とデータ ベース 2020年8月27日 放送
[Cloud OnAir] Talks by DevRel Vol.4 データ管理とデータ ベース 2020年8月27日 放送
 
Disaster Recovery Best Practices and Customer Use Cases: CGS and HealthQuest
Disaster Recovery Best Practices and Customer Use Cases: CGS and HealthQuestDisaster Recovery Best Practices and Customer Use Cases: CGS and HealthQuest
Disaster Recovery Best Practices and Customer Use Cases: CGS and HealthQuest
 
Moving OBIEE to Oracle Analytics Cloud
Moving OBIEE to Oracle Analytics CloudMoving OBIEE to Oracle Analytics Cloud
Moving OBIEE to Oracle Analytics Cloud
 
DevOps Case Studies
DevOps Case StudiesDevOps Case Studies
DevOps Case Studies
 
Dockerizing apps for the Deployment Platform of the Month with OSGi - David B...
Dockerizing apps for the Deployment Platform of the Month with OSGi - David B...Dockerizing apps for the Deployment Platform of the Month with OSGi - David B...
Dockerizing apps for the Deployment Platform of the Month with OSGi - David B...
 
By Popular Demand: The Rise of Elastic SQL
By Popular Demand: The Rise of Elastic SQLBy Popular Demand: The Rise of Elastic SQL
By Popular Demand: The Rise of Elastic SQL
 
Strengthening Operations with Splunk and AWS CloudTrail
Strengthening Operations with Splunk and AWS CloudTrailStrengthening Operations with Splunk and AWS CloudTrail
Strengthening Operations with Splunk and AWS CloudTrail
 
Supercharge Your Spring Boot Apps!
Supercharge Your Spring Boot Apps!Supercharge Your Spring Boot Apps!
Supercharge Your Spring Boot Apps!
 
Discover Smart Solutions for Enterprise Cloud Storage on Amazon Web Services
Discover Smart Solutions for Enterprise Cloud Storage on Amazon Web ServicesDiscover Smart Solutions for Enterprise Cloud Storage on Amazon Web Services
Discover Smart Solutions for Enterprise Cloud Storage on Amazon Web Services
 

Recently uploaded

Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 

Recently uploaded (20)

AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in Michelangelo
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning Framework
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Kraków
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysis
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 

How to map Domain changes on an existing Database

  • 1. © 2014 OXID eSales AG How To Map Domain Changes On An Existing Database OXID eSales AG Philip Washington Sorst Software Architect
  • 2. © 2014 OXID eSales AG An Example: The Article Article id title pic1 pic2 pic3
  • 3. position © 2014 OXID eSales AG An Example: The Product id 1 of n Product Picture title path
  • 4. Web Frontend REST © 2014 OXID eSales AG Architecture (1) Controller Repositories Presentation Layer Data Layer
  • 5. Web Frontend REST © 2014 OXID eSales AG Architecture (2) Controller Domain Services Repositories Presentation Layer Business Logic Layer Data Layer
  • 6. ProductController ProductServiceInterface CategoryServiceInterface © 2014 OXID eSales AG The Business Logic Layer ProductService CategoryService DomainEntities DomainEntities Data Layer
  • 7. © 2014 OXID eSales AG An Example: The ProductInterface interface ProductInterface { function getId(); function getTitle(); function setTitle($title); function getPictures(); function setPictureAt($position, $path); }
  • 8. © 2014 OXID eSales AG An Example: The ProductWrapper class ProductWrapper implements ProductInterface { protected $article; function getId() { $this­> article­> getId(); } function getPictures() { return array( $this­> article­> getPic1(), $this­> article­> getPic2(), $this­> article­> getPic3()); } ... }
  • 9. Business Logic Layer Data Layer queries DomainEntityInterface © 2014 OXID eSales AG The Data Layer Repository DAO Service Mapper DatabaseEntityWrapper DatabaseEntity Row queries maps returns builds queries
  • 10. © 2014 OXID eSales AG /** * @ORMTable() * @ORMEntity() */ class Product implements ProductInterface { /** * @ORMColumn(name="id", type="integer") * @ORMId * @ORMGeneratedValue(strategy="AUTO") */ private $id; /** @ORMColumn(name="title", type="string", length=255) */ private $title; /** @ORMOneToMany(targetEntity="Picture", mappedBy="article", cascade={"ALL"}, indexBy="picture") */ private $pictures;
  • 11. © 2014 OXID eSales AG Migration MigrationService LegacyRepository DoctrineRepository LegacyDao DomainEntityConverter LegacyDB TargetDB
  • 12. © 2014 OXID eSales AG Why we are using Symfony > Open Source > Focus on clean OO Development (DI, Events) > Is more than a web framework > Can be introduced step by step > We don't need to reinvent the wheel, great bundles available > We need to be easily extendable, so building bundles ourself > Mature and well supported > Superior Documentation
  • 13. © 2014 OXID eSales AG Discussion: The Cons > Performance might become an issue – But our layered architecture allows us easily cache stuff and build performance optimized services > The wrapping needs much love (=time) to be fully backwards compatible, testing > Of course there are still some modelling limitations imposed
  • 14. © 2014 OXID eSales AG Discussion: The Pros > A redefined view on our own domain, built for the future > We don't break things too early > Design flaws can be identified and removed > Things become exchangable, as soon as migration is possible the wrapping will vanish > Implicit migration for the database. Use the wrapper layer to read, use the new domain to write
  • 15. © 2014 OXID eSales AG Credits > Icons: – Shmidt Sergey (The Noun Project)
  • 16. Thank you for your attention! © 2014 OXID eSales AG OXID eSales AG Bertoldstraße 48 79098 Freiburg GERMANY www.oxid-esales.com E-Mail: info@oxid-esales.com Fon: +49 761 368 89 0

Editor's Notes

  1. Verweis Gigi: Domain Driven Design → Technik Vorstellung von Ideen und Konzepten in SoftwareArchitektur und Datenbankmodellierung Wir haben die Chance, weil die existierende Domäne sehr vollständig ist Geringe Komplexität der Beispiele Work in progress
  2. Von dem erwähnten Artikel Beispiel ausgehend Domäne in DB abgebildet → ER Kurz (Domain)Entität definieren Angenommen wir haben drei Bilder an einem Artikel nicht normalisiert wegen begrenzter Anzeigemöglichkeiten und “Performance” Prämisse: Datenbank darf nicht verändert! werden
  3. Modellierung des Produkts, anderer Name, ein Produkt ist quasi “nichts” außer einer id (im Beispiel noch mit title, auch das kann man rausextrahieren) Die Bilder sollen getrennt sein, sind quasi nur für die Präsentation da Modellierung als “weak entity” als Beispiel, Komplexität beliebig erhöhbar Die Thematik des Vortrags ist: Wie nutze ich eine Datenbank, die wie das erste Beispiel organisiert ist, aber das zweite Beispiel repräsentieren soll
  4. Simpelstes Symfony Beispiel Controller laufen direkt gegen DB, gut für kleine Seiten, ein paar versteckte “Services” Was wir wollen, dünne Controller, klare Schnittstellen
  5. Wir benutzen dedizierten Business Logic Layer Trennen Datenbank von Presentation Data Layer muss austauschbar sein Business Logic Layer als Definition der unterstützten Domänenoperationen, Workflows Schichtenarchitektur bedeutet auch, keine Schicht darf übersprungen werden
  6. Durch Interfaces definiert Spezifizieren die API → müssen stabil bleiben Wer seine Domäne nicht schützt hat keine Chance auf Versionierung → Partner Sind der einzige Platz in der Business Logik (Workflows) stattfinden, nicht Controller, nicht Data Layer Verarbeiten Domänenobjekte Dependency Injection bietet Flexibilität (Erweiterbarkeit, Customizability), Crucial Beispiel: ElasticSearch Die Frage: wie definieren wir DomänenObjekte
  7. Introduction POPO Wir definieren DomainEntities als Interface Beschreibung dessen WAS sie repräsentieren, aber nicht WIE Art der Repräsentation wird austauschbar
  8. Beispiel für das WIE Verhalten bleibt nach außen konsistent Wrapping ist eine Möglichkeit, es ist auch möglich mit Transformation zu arbeiten
  9. Wie kommen wir von der Datenbank zur Domäne DAO (erklären, DBAL) fragt DB, bekommt Row Wir wollen DatabaseEntity (teilweise angebasst) => custom Mapping Warum kein ORM? Bei uns nicht machbar Zugriff auf die Datenbank NUR über DAO Von da zum DomainEntity: Repository exposed Datenzugriff transparent nach außen Transformationen finden im Repository statt, kann beliebig komplex sein Vergleiche ORM Repository
  10. Idealerweise lässt sich unsere Domäne in einer relationalen Datenbank repräsentieren (Sauberes) ORM lässt sich umsetzen, POPO Repository lässt sich ersetzen, Overhead fällt weg
  11. Nebeneffekt: Es lässt sich Datenbank Migration durchführen Wir haben die Möglichkeit über unseren Adapter Layer die “legacy” DB als neues DomainEntity zu lesen Übersetzen in ORM Implementierung Speichern über neues Repository Könnten Upgrade Pfad anbieten Warum keine Doctrine Schema Migration?
  12. Extendable → Partners
  13. Gefahr der Überabstrahierung, aber große Domäne
  14. Kontinuierlicher Prozess
  15. <number>