SlideShare a Scribd company logo
1 of 16
© 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

Deploying Kubernetes on AWS Using Terraform
Deploying Kubernetes on AWS Using TerraformDeploying Kubernetes on AWS Using Terraform
Deploying Kubernetes on AWS Using TerraformAnant Corporation
 
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...Amazon Web Services
 
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...Autodesk
 
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 ForgeAutodesk
 
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)Jorge Millán Cabrera
 
Developing 3D Visualization Apps
Developing 3D Visualization AppsDeveloping 3D Visualization Apps
Developing 3D Visualization AppsAutodesk
 
AWS Finland Meetup 2019 April
AWS Finland Meetup 2019 AprilAWS Finland Meetup 2019 April
AWS Finland Meetup 2019 AprilRolf Koski
 
Aws re invent 2014 feedback
Aws re invent 2014 feedbackAws re invent 2014 feedback
Aws re invent 2014 feedbackSangwon Han
 
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)Jorge Millán Cabrera
 
Cloud Builders Meetup - Containers @ Autodesk
Cloud Builders Meetup - Containers @ AutodeskCloud Builders Meetup - Containers @ Autodesk
Cloud Builders Meetup - Containers @ AutodeskStephen Voorhees
 
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.1KNIMESlides
 
Microsoft Azure News - Apr 2017
Microsoft Azure News - Apr 2017Microsoft Azure News - Apr 2017
Microsoft Azure News - Apr 2017Daniel Toomey
 
Forge - DevCon 2016: Drawings! Drawings! Everywhere!
Forge - DevCon 2016: Drawings! Drawings! Everywhere!Forge - DevCon 2016: Drawings! Drawings! Everywhere!
Forge - DevCon 2016: Drawings! Drawings! Everywhere!Autodesk
 
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 Holger Mueller
 
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...Autodesk
 
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?Autodesk
 
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...Autodesk
 
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

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 2014Paolo Mottadelli
 
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...Phil Wilkins
 
VisiQuate: Azure cloud migration case study
VisiQuate: Azure cloud migration case studyVisiQuate: Azure cloud migration case study
VisiQuate: Azure cloud migration case studyLeonid Nekhymchuk
 
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
 
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 CustomersSimon Haslam
 
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 2014Sanjeev Sharma
 
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 AdobeTimothy Gelter
 
Azure Administration.docx
Azure  Administration.docxAzure  Administration.docx
Azure Administration.docxFuturepoint13
 
[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日 放送Google Cloud Platform - Japan
 
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 HealthQuestAmazon Web Services
 
Moving OBIEE to Oracle Analytics Cloud
Moving OBIEE to Oracle Analytics CloudMoving OBIEE to Oracle Analytics Cloud
Moving OBIEE to Oracle Analytics CloudEdelweiss Kammermann
 
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...mfrancis
 
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 SQLNuoDB
 
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 CloudTrailAlan Williams
 
Supercharge Your Spring Boot Apps!
Supercharge Your Spring Boot Apps!Supercharge Your Spring Boot Apps!
Supercharge Your Spring Boot Apps!VMware Tanzu
 
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 ServicesOxygen 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

Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 

Recently uploaded (20)

Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 

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>