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

Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Roomishabajaj13
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一3sw2qly1
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Paul Calvano
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationLinaWolf1
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Roomdivyansh0kumar0
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Lucknow
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Roomdivyansh0kumar0
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 

Recently uploaded (20)

Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 Documentation
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 

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