SlideShare a Scribd company logo
1 of 17
38. Magento-Meetup Wien
Ivan Cuk
Software Developer
From Core to Custom
A Deep Dive into Magento Entity Extension
What is a Magento Entity?
● Entity is data item (customer, product, order & more)
● Each item has its attributes and values for them
● Represented with one main entity database table (and few other tables)
Why this topic?
● Extending core entities is frequently needed for
customizations
● Important for the stability, modularity, upgradability
and overall quality of the Magento Store
● Different approaches (even within same teams)
Magento core entities
EAV Not EAV
customer order
customer_address invoice
catalog_category creditmemo
catalog_product shipment
EAV available with some entities, Extension Attributes with all entities
The Problem
When to use EAV and when to use Extension Attributes?
How to properly implement Extension Attributes and why
is that important?
Often seen approaches
Developers tend to some of the following things:
● Not use Extension Attributes at all: use a (hacky)
workaround
● Implement Extension Attributes almost always: EAV
capabilities are getting heavily overlooked
EAV Attributes
Basic EAV Attributes can be developed quickly.
No-brainer situation:
Attributes that have simple scalar values.
Example: a custom ERP-ID attribute for the customer
entity
EAV Attributes
Often overlooked: EAV Attributes can be also used for
more complex data-processing and functionalities.
EAV-Models:
attribute_model - overall behaviour
backend_model - before and after attribute save
frontend_model - data representation
source_model - retrieving set of choices
Extension Attributes
When?
● Entity without EAV
● The complexity of the new custom attributes requires
even more flexibility than what EAV offers
Extension Attributes
Advantages
● Unlimited flexibility
● Data saved in its own new tables
Extension Attributes
Disadvantage
● Implementation is can be complex and time consuming
● Some developers turn to hacking the core-tables as an
alternative
Modifying Core Tables?
● Not recommended - source:
https://experienceleague.adobe.com/docs/commerce-
operations/implementation-playbook/best-
practices/development/modifying-core-and-third-party-tables.html?lang=en
● Decreases upgradability & stability of the project
● Underlying logic contains raw SQL queries - can cause side effects difficult to
troubleshoot
● Changes can cause performance problems
● 3rd party modules expect standard core tables
● Standard ways are safer:
● With EAV-Attributes we are not changing DB-structure
● Extension Attributes have their own tables
Modifying Core Tables?
● We are using or relying on directly the implementation (model) classes
instead of Service Contracts
● Example: $model->getData('erp_id');
Service Contracts > Implementations
Extension Attributes
Not always used feature of extension attributes that can accelerate development:
● Join directives
Extension Attributes
Not always used feature of extension attributes that can accelerate development:
● Join directives
Conclusion
● Requirements & custom attributes
● The right implementation
● Full potential of the EAV attributes
● All features of the Extension Attributes
● Avoid hacky solutions when possible

More Related Content

Similar to 38. Magento Meetup Austria: Ivan Cuk - From Core to Custom. A Deep Dive into Magento Entity Extension

Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...
Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...
Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...Codecamp Romania
 
Business Intelligence Software Comparison 2021
Business Intelligence Software Comparison 2021Business Intelligence Software Comparison 2021
Business Intelligence Software Comparison 2021Ibrahim HALOUANE
 
Selena Deckelmann - Sane Schema Management with Alembic and SQLAlchemy @ Pos...
Selena Deckelmann - Sane Schema Management with  Alembic and SQLAlchemy @ Pos...Selena Deckelmann - Sane Schema Management with  Alembic and SQLAlchemy @ Pos...
Selena Deckelmann - Sane Schema Management with Alembic and SQLAlchemy @ Pos...PostgresOpen
 
Clean architecture with asp.net core
Clean architecture with asp.net coreClean architecture with asp.net core
Clean architecture with asp.net coreSam Nasr, MCSA, MVP
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous IntegrationXPDays
 
Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2Mathew Beane
 
Vandana Sathish Maller
Vandana Sathish MallerVandana Sathish Maller
Vandana Sathish MallerVandana Maller
 
2 dirk vermeylen - modeling with neo4 j
2   dirk vermeylen - modeling with neo4 j2   dirk vermeylen - modeling with neo4 j
2 dirk vermeylen - modeling with neo4 jRik Van Bruggen
 
Introduction to Integration Tests in Magento / Adobe Commerce
Introduction to Integration Tests in Magento / Adobe CommerceIntroduction to Integration Tests in Magento / Adobe Commerce
Introduction to Integration Tests in Magento / Adobe CommerceBartosz Górski
 
Introduction to Integration Tests in Magento / Adobe Commerce
Introduction to Integration Tests in Magento / Adobe CommerceIntroduction to Integration Tests in Magento / Adobe Commerce
Introduction to Integration Tests in Magento / Adobe CommerceBartosz Górski
 
Testing lightning components feb 15th 2018
Testing lightning components feb 15th 2018Testing lightning components feb 15th 2018
Testing lightning components feb 15th 2018Richard Clark
 
Improving the Traceability and Reliability of CRM Implementations with TFS
Improving the Traceability and Reliability of CRM Implementations with TFSImproving the Traceability and Reliability of CRM Implementations with TFS
Improving the Traceability and Reliability of CRM Implementations with TFSIvan Kurtev
 
MidwestPHP - Getting Started with Magento 2
MidwestPHP - Getting Started with Magento 2MidwestPHP - Getting Started with Magento 2
MidwestPHP - Getting Started with Magento 2Mathew Beane
 
Implementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyImplementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyMarcos Labad
 
Framework Enabling End-Users to Maintain Web Applications (ICICWS2015)
Framework Enabling End-Users to Maintain Web Applications (ICICWS2015)Framework Enabling End-Users to Maintain Web Applications (ICICWS2015)
Framework Enabling End-Users to Maintain Web Applications (ICICWS2015)Masayuki Nii
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Mack Hardy
 
Performant Django - Ara Anjargolian
Performant Django - Ara AnjargolianPerformant Django - Ara Anjargolian
Performant Django - Ara AnjargolianHakka Labs
 
Agile collaborative practices
Agile collaborative practicesAgile collaborative practices
Agile collaborative practicesSreejith Madhavan
 

Similar to 38. Magento Meetup Austria: Ivan Cuk - From Core to Custom. A Deep Dive into Magento Entity Extension (20)

presentation
presentationpresentation
presentation
 
Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...
Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...
Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...
 
Business Intelligence Software Comparison 2021
Business Intelligence Software Comparison 2021Business Intelligence Software Comparison 2021
Business Intelligence Software Comparison 2021
 
Selena Deckelmann - Sane Schema Management with Alembic and SQLAlchemy @ Pos...
Selena Deckelmann - Sane Schema Management with  Alembic and SQLAlchemy @ Pos...Selena Deckelmann - Sane Schema Management with  Alembic and SQLAlchemy @ Pos...
Selena Deckelmann - Sane Schema Management with Alembic and SQLAlchemy @ Pos...
 
Clean architecture with asp.net core
Clean architecture with asp.net coreClean architecture with asp.net core
Clean architecture with asp.net core
 
Spring batch overivew
Spring batch overivewSpring batch overivew
Spring batch overivew
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2
 
Vandana Sathish Maller
Vandana Sathish MallerVandana Sathish Maller
Vandana Sathish Maller
 
2 dirk vermeylen - modeling with neo4 j
2   dirk vermeylen - modeling with neo4 j2   dirk vermeylen - modeling with neo4 j
2 dirk vermeylen - modeling with neo4 j
 
Introduction to Integration Tests in Magento / Adobe Commerce
Introduction to Integration Tests in Magento / Adobe CommerceIntroduction to Integration Tests in Magento / Adobe Commerce
Introduction to Integration Tests in Magento / Adobe Commerce
 
Introduction to Integration Tests in Magento / Adobe Commerce
Introduction to Integration Tests in Magento / Adobe CommerceIntroduction to Integration Tests in Magento / Adobe Commerce
Introduction to Integration Tests in Magento / Adobe Commerce
 
Testing lightning components feb 15th 2018
Testing lightning components feb 15th 2018Testing lightning components feb 15th 2018
Testing lightning components feb 15th 2018
 
Improving the Traceability and Reliability of CRM Implementations with TFS
Improving the Traceability and Reliability of CRM Implementations with TFSImproving the Traceability and Reliability of CRM Implementations with TFS
Improving the Traceability and Reliability of CRM Implementations with TFS
 
MidwestPHP - Getting Started with Magento 2
MidwestPHP - Getting Started with Magento 2MidwestPHP - Getting Started with Magento 2
MidwestPHP - Getting Started with Magento 2
 
Implementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyImplementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing Company
 
Framework Enabling End-Users to Maintain Web Applications (ICICWS2015)
Framework Enabling End-Users to Maintain Web Applications (ICICWS2015)Framework Enabling End-Users to Maintain Web Applications (ICICWS2015)
Framework Enabling End-Users to Maintain Web Applications (ICICWS2015)
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
 
Performant Django - Ara Anjargolian
Performant Django - Ara AnjargolianPerformant Django - Ara Anjargolian
Performant Django - Ara Anjargolian
 
Agile collaborative practices
Agile collaborative practicesAgile collaborative practices
Agile collaborative practices
 

More from Magento Meetup Austria

29. Magento Meetup - Why the hell did I choose Magento 2?
29. Magento Meetup - Why the hell did I choose Magento 2?29. Magento Meetup - Why the hell did I choose Magento 2?
29. Magento Meetup - Why the hell did I choose Magento 2?Magento Meetup Austria
 
28. Magento Meetup Austria: Magento News
28. Magento Meetup Austria: Magento News28. Magento Meetup Austria: Magento News
28. Magento Meetup Austria: Magento NewsMagento Meetup Austria
 
27. Magento Meetup Austria: Magento News & Magento Live Europe 2018 Recap
27. Magento Meetup Austria: Magento News & Magento Live Europe 2018 Recap27. Magento Meetup Austria: Magento News & Magento Live Europe 2018 Recap
27. Magento Meetup Austria: Magento News & Magento Live Europe 2018 RecapMagento Meetup Austria
 
26. Magento Meetup Austria: Magento News
26. Magento Meetup Austria: Magento News26. Magento Meetup Austria: Magento News
26. Magento Meetup Austria: Magento NewsMagento Meetup Austria
 
Magento-News @ Magento Meetup Austria 21 (29.05.2017)
Magento-News @ Magento Meetup Austria 21 (29.05.2017)Magento-News @ Magento Meetup Austria 21 (29.05.2017)
Magento-News @ Magento Meetup Austria 21 (29.05.2017)Magento Meetup Austria
 

More from Magento Meetup Austria (11)

31. Magento Meetup Austria: News
31. Magento Meetup Austria: News31. Magento Meetup Austria: News
31. Magento Meetup Austria: News
 
30. Magento Meetup Austria: News
30. Magento Meetup Austria: News30. Magento Meetup Austria: News
30. Magento Meetup Austria: News
 
29. Magento Meetup - Why the hell did I choose Magento 2?
29. Magento Meetup - Why the hell did I choose Magento 2?29. Magento Meetup - Why the hell did I choose Magento 2?
29. Magento Meetup - Why the hell did I choose Magento 2?
 
29. Magento Meetup - Datareporter
29. Magento Meetup - Datareporter29. Magento Meetup - Datareporter
29. Magento Meetup - Datareporter
 
29. Magento Meetup Austria: News
29. Magento Meetup Austria: News29. Magento Meetup Austria: News
29. Magento Meetup Austria: News
 
28. Magento Meetup Austria: Magento News
28. Magento Meetup Austria: Magento News28. Magento Meetup Austria: Magento News
28. Magento Meetup Austria: Magento News
 
27. Magento Meetup Austria: Magento News & Magento Live Europe 2018 Recap
27. Magento Meetup Austria: Magento News & Magento Live Europe 2018 Recap27. Magento Meetup Austria: Magento News & Magento Live Europe 2018 Recap
27. Magento Meetup Austria: Magento News & Magento Live Europe 2018 Recap
 
27. Magento Meetup Austria: Intro
27. Magento Meetup Austria: Intro27. Magento Meetup Austria: Intro
27. Magento Meetup Austria: Intro
 
26. Magento Meetup Austria: Magento News
26. Magento Meetup Austria: Magento News26. Magento Meetup Austria: Magento News
26. Magento Meetup Austria: Magento News
 
26. Magento Meetup Austria: Intro
26. Magento Meetup Austria: Intro26. Magento Meetup Austria: Intro
26. Magento Meetup Austria: Intro
 
Magento-News @ Magento Meetup Austria 21 (29.05.2017)
Magento-News @ Magento Meetup Austria 21 (29.05.2017)Magento-News @ Magento Meetup Austria 21 (29.05.2017)
Magento-News @ Magento Meetup Austria 21 (29.05.2017)
 

Recently uploaded

𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...Neha Pandey
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...aditipandeya
 
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Standkumarajju5765
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGAPNIC
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLimonikaupta
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceDelhi Call girls
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607dollysharma2066
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirtrahman018755
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...Diya Sharma
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024APNIC
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxellan12
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Servicesexy call girls service in goa
 
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts servicesonalikaur4
 
SEO Growth Program-Digital optimization Specialist
SEO Growth Program-Digital optimization SpecialistSEO Growth Program-Digital optimization Specialist
SEO Growth Program-Digital optimization SpecialistKHM Anwar
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsThierry TROUIN ☁
 

Recently uploaded (20)

𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
 
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
 
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
 
SEO Growth Program-Digital optimization Specialist
SEO Growth Program-Digital optimization SpecialistSEO Growth Program-Digital optimization Specialist
SEO Growth Program-Digital optimization Specialist
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with Flows
 
Call Girls In Noida 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In Noida 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In Noida 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In Noida 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 

38. Magento Meetup Austria: Ivan Cuk - From Core to Custom. A Deep Dive into Magento Entity Extension

  • 1. 38. Magento-Meetup Wien Ivan Cuk Software Developer From Core to Custom A Deep Dive into Magento Entity Extension
  • 2. What is a Magento Entity? ● Entity is data item (customer, product, order & more) ● Each item has its attributes and values for them ● Represented with one main entity database table (and few other tables)
  • 3. Why this topic? ● Extending core entities is frequently needed for customizations ● Important for the stability, modularity, upgradability and overall quality of the Magento Store ● Different approaches (even within same teams)
  • 4. Magento core entities EAV Not EAV customer order customer_address invoice catalog_category creditmemo catalog_product shipment EAV available with some entities, Extension Attributes with all entities
  • 5. The Problem When to use EAV and when to use Extension Attributes? How to properly implement Extension Attributes and why is that important?
  • 6. Often seen approaches Developers tend to some of the following things: ● Not use Extension Attributes at all: use a (hacky) workaround ● Implement Extension Attributes almost always: EAV capabilities are getting heavily overlooked
  • 7. EAV Attributes Basic EAV Attributes can be developed quickly. No-brainer situation: Attributes that have simple scalar values. Example: a custom ERP-ID attribute for the customer entity
  • 8. EAV Attributes Often overlooked: EAV Attributes can be also used for more complex data-processing and functionalities. EAV-Models: attribute_model - overall behaviour backend_model - before and after attribute save frontend_model - data representation source_model - retrieving set of choices
  • 9. Extension Attributes When? ● Entity without EAV ● The complexity of the new custom attributes requires even more flexibility than what EAV offers
  • 10. Extension Attributes Advantages ● Unlimited flexibility ● Data saved in its own new tables
  • 11. Extension Attributes Disadvantage ● Implementation is can be complex and time consuming ● Some developers turn to hacking the core-tables as an alternative
  • 12. Modifying Core Tables? ● Not recommended - source: https://experienceleague.adobe.com/docs/commerce- operations/implementation-playbook/best- practices/development/modifying-core-and-third-party-tables.html?lang=en ● Decreases upgradability & stability of the project ● Underlying logic contains raw SQL queries - can cause side effects difficult to troubleshoot ● Changes can cause performance problems ● 3rd party modules expect standard core tables ● Standard ways are safer: ● With EAV-Attributes we are not changing DB-structure ● Extension Attributes have their own tables
  • 13. Modifying Core Tables? ● We are using or relying on directly the implementation (model) classes instead of Service Contracts ● Example: $model->getData('erp_id');
  • 14. Service Contracts > Implementations
  • 15. Extension Attributes Not always used feature of extension attributes that can accelerate development: ● Join directives
  • 16. Extension Attributes Not always used feature of extension attributes that can accelerate development: ● Join directives
  • 17. Conclusion ● Requirements & custom attributes ● The right implementation ● Full potential of the EAV attributes ● All features of the Extension Attributes ● Avoid hacky solutions when possible