SlideShare une entreprise Scribd logo
1  sur  53
Télécharger pour lire hors ligne
La conf
mystère
Rendez-vous AFUP Paris du 28 août 2018
!
Jacques Bodin-Hullin
Monsieur Biz, agence web e-commerce
@jacquesbh · @MonsieurBiz
Framework e-commerce
sur Symfony
v1.2.5
Sylius :
Symfony :
Magento 2 :
Symfony 4
Mais…
archi de 3.4 pour le
moment
Y'a pas Flex!
!
Bientôt
Capture prise hier soir à 22h, c'est tout frais !
Plugin
≠
Bundle
Le bundle
« n'utilise pas »
Sylius
Uniquement Symfony ❤
Il ne require pas Sylius dans son composer.json
Le plugin
« utilise »
Sylius
Il require Sylius dans son composer.json
Hyper Multi !
→ Multi langues
→ Multi boutiques
→ Multi devises
Evidemment il y a aussi les bases :
→ Produits
→ Catégories
→ Paniers ( )
→ Clients
→ Commandes
→ …
→ Un beau tunnel de commande (guest en prime !)
→ Un compte client
→ Des emails transactionnels…
C'est laid !
Mais c'est bien !
Car comme ça on fait ce qu'on veut.
Quand on parle de design…
https://semantic-ui.com
API RESTfull
Et la base de données dans tout ça…
L'EAV comme sur
Magento ?
No way!
Le passé :
Le passé agrandi :
CREATE TABLE `magento_catalog_product_entity_int` (
`value_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Value ID',
`entity_type_id` int(10) unsigned NOT NULL COMMENT 'Entity Type ID',
`attribute_id` smallint(5) unsigned NOT NULL COMMENT 'Attribute ID',
`store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
`entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
`value` int(11) DEFAULT NULL COMMENT 'Value',
PRIMARY KEY (`value_id`),
UNIQUE KEY `UNQ_MAGENTO_CAT_PRD_ENTT_INT_ENTT_ID_ATTR_ID_STORE_ID` (`entity_id`,`attribute_id`,`store_id`),
KEY `IDX_…_ATTRIBUTE_ID` (`attribute_id`),
KEY `IDX_…_STORE_ID` (`store_id`),
KEY `IDX_…_ENTITY_ID` (`entity_id`),
CONSTRAINT `FK_MAGENTO_…_ATTR_ID` FOREIGN KEY (`attribute_id`)
REFERENCES `magento_eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_MAGENTO_…_ENTT_ID` FOREIGN KEY (`entity_id`)
REFERENCES `magento_catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_MAGENTO_…_STORE_ID` FOREIGN KEY (`store_id`)
REFERENCES `magento_core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
);
Le présent :
CREATE TABLE `sylius_product_attribute` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`code` varchar(255) NOT NULL,
`type` varchar(255) NOT NULL, -- integer, text, select…
`storage_type` varchar(255) NOT NULL, -- integer, text, json…
`configuration` longtext NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime DEFAULT NULL,
`position` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `UNIQ_BFAF484A77153098` (`code`)
);
+ la table sylius_product_attribute_translation
CREATE TABLE `sylius_product_attribute_value` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`product_id` int(11) NOT NULL,
`attribute_id` int(11) NOT NULL,
`locale_code` varchar(255) NOT NULL,
`text_value` longtext,
`boolean_value` tinyint(1) DEFAULT NULL,
`integer_value` int(11) DEFAULT NULL,
`float_value` double DEFAULT NULL,
`datetime_value` datetime DEFAULT NULL,
`date_value` date DEFAULT NULL,
`json_value` longtext,
PRIMARY KEY (`id`),
KEY `IDX_8A053E544584665A` (`product_id`),
KEY `IDX_8A053E54B6E62EFA` (`attribute_id`),
CONSTRAINT `FK_8A053E544584665A` FOREIGN KEY (`product_id`)
REFERENCES `sylius_product` (`id`) ON DELETE CASCADE,
CONSTRAINT `FK_8A053E54B6E62EFA` FOREIGN KEY (`attribute_id`)
REFERENCES `sylius_product_attribute` (`id`) ON DELETE CASCADE
);
Un panier est une commande qui a un
state = 'cart'.
Tout simplement.
La BDD = ❤
BDD = Base De Données
et le BDD ?
BDD = Behaviour Driven Development
@managing_countries
Feature: Adding a new country
In order to sell my goods to different countries
As an Administrator
I want to add a new country to the store
Background:
Given I am logged in as an administrator
@ui
Scenario: Adding country
When I want to add a new country
And I choose "United States"
And I add it
Then I should be notified that it has been successfully created
And the country "United States" should appear in the store
PHPUnit
Les Fixtures !
sylius_fixtures:
suites:
default:
fixtures:
locale: ~
currency:
options:
currencies: ['EUR']
channel:
options:
custom:
afup_web_store:
name: "Apéro AFUP"
code: "AFUP_WEB"
locales:
- "%locale%"
currencies:
- "EUR"
enabled: true
hostname: "apero.afup.org"
Un peu de poudre de perlinpinpin…
!
Une solution hyper connecté !
Facebook
Twitter
Slack
Github
…
C'est déjà fini.
Venez au Forum PHP !
On vous parlera encore de Sylius, avec un peu plus
de chocolat cette fois !
Merci !

Contenu connexe

Dernier

JTC 2024 - SMARTER Retour sur les indicateurs de santé .pdf
JTC 2024 - SMARTER Retour sur les indicateurs de santé .pdfJTC 2024 - SMARTER Retour sur les indicateurs de santé .pdf
JTC 2024 - SMARTER Retour sur les indicateurs de santé .pdfInstitut de l'Elevage - Idele
 
JTC 2024 La relance de la filière de la viande de chevreau.pdf
JTC 2024 La relance de la filière de la viande de chevreau.pdfJTC 2024 La relance de la filière de la viande de chevreau.pdf
JTC 2024 La relance de la filière de la viande de chevreau.pdfInstitut de l'Elevage - Idele
 
JTC 2024 - Réglementation européenne BEA et Transport.pdf
JTC 2024 - Réglementation européenne BEA et Transport.pdfJTC 2024 - Réglementation européenne BEA et Transport.pdf
JTC 2024 - Réglementation européenne BEA et Transport.pdfInstitut de l'Elevage - Idele
 
JTC 2024 - Leviers d’adaptation au changement climatique, qualité du lait et ...
JTC 2024 - Leviers d’adaptation au changement climatique, qualité du lait et ...JTC 2024 - Leviers d’adaptation au changement climatique, qualité du lait et ...
JTC 2024 - Leviers d’adaptation au changement climatique, qualité du lait et ...Institut de l'Elevage - Idele
 
Câblage, installation et paramétrage d’un réseau informatique.pdf
Câblage, installation et paramétrage d’un réseau informatique.pdfCâblage, installation et paramétrage d’un réseau informatique.pdf
Câblage, installation et paramétrage d’un réseau informatique.pdfmia884611
 
Algo II : les piles ( cours + exercices)
Algo II :  les piles ( cours + exercices)Algo II :  les piles ( cours + exercices)
Algo II : les piles ( cours + exercices)Sana REFAI
 

Dernier (8)

CAP2ER_GC_Presentation_Outil_20240422.pptx
CAP2ER_GC_Presentation_Outil_20240422.pptxCAP2ER_GC_Presentation_Outil_20240422.pptx
CAP2ER_GC_Presentation_Outil_20240422.pptx
 
JTC 2024 - SMARTER Retour sur les indicateurs de santé .pdf
JTC 2024 - SMARTER Retour sur les indicateurs de santé .pdfJTC 2024 - SMARTER Retour sur les indicateurs de santé .pdf
JTC 2024 - SMARTER Retour sur les indicateurs de santé .pdf
 
JTC 2024 La relance de la filière de la viande de chevreau.pdf
JTC 2024 La relance de la filière de la viande de chevreau.pdfJTC 2024 La relance de la filière de la viande de chevreau.pdf
JTC 2024 La relance de la filière de la viande de chevreau.pdf
 
JTC 2024 - Réglementation européenne BEA et Transport.pdf
JTC 2024 - Réglementation européenne BEA et Transport.pdfJTC 2024 - Réglementation européenne BEA et Transport.pdf
JTC 2024 - Réglementation européenne BEA et Transport.pdf
 
JTC 2024 - Leviers d’adaptation au changement climatique, qualité du lait et ...
JTC 2024 - Leviers d’adaptation au changement climatique, qualité du lait et ...JTC 2024 - Leviers d’adaptation au changement climatique, qualité du lait et ...
JTC 2024 - Leviers d’adaptation au changement climatique, qualité du lait et ...
 
Câblage, installation et paramétrage d’un réseau informatique.pdf
Câblage, installation et paramétrage d’un réseau informatique.pdfCâblage, installation et paramétrage d’un réseau informatique.pdf
Câblage, installation et paramétrage d’un réseau informatique.pdf
 
JTC 2024 - DeCremoux_Anomalies_génétiques.pdf
JTC 2024 - DeCremoux_Anomalies_génétiques.pdfJTC 2024 - DeCremoux_Anomalies_génétiques.pdf
JTC 2024 - DeCremoux_Anomalies_génétiques.pdf
 
Algo II : les piles ( cours + exercices)
Algo II :  les piles ( cours + exercices)Algo II :  les piles ( cours + exercices)
Algo II : les piles ( cours + exercices)
 

En vedette

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

En vedette (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

Présentation de Sylius

  • 1. La conf mystère Rendez-vous AFUP Paris du 28 août 2018
  • 2. !
  • 3. Jacques Bodin-Hullin Monsieur Biz, agence web e-commerce @jacquesbh · @MonsieurBiz
  • 4.
  • 7.
  • 10. Mais… archi de 3.4 pour le moment
  • 12. Bientôt Capture prise hier soir à 22h, c'est tout frais !
  • 14. Le bundle « n'utilise pas » Sylius Uniquement Symfony ❤ Il ne require pas Sylius dans son composer.json
  • 15. Le plugin « utilise » Sylius Il require Sylius dans son composer.json
  • 17. → Multi langues → Multi boutiques → Multi devises
  • 18. Evidemment il y a aussi les bases :
  • 19. → Produits → Catégories → Paniers ( ) → Clients → Commandes → … → Un beau tunnel de commande (guest en prime !) → Un compte client → Des emails transactionnels…
  • 21. Mais c'est bien ! Car comme ça on fait ce qu'on veut.
  • 22. Quand on parle de design…
  • 23.
  • 24.
  • 25.
  • 27.
  • 28.
  • 29.
  • 31. Et la base de données dans tout ça…
  • 34. Le passé agrandi : CREATE TABLE `magento_catalog_product_entity_int` ( `value_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Value ID', `entity_type_id` int(10) unsigned NOT NULL COMMENT 'Entity Type ID', `attribute_id` smallint(5) unsigned NOT NULL COMMENT 'Attribute ID', `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID', `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID', `value` int(11) DEFAULT NULL COMMENT 'Value', PRIMARY KEY (`value_id`), UNIQUE KEY `UNQ_MAGENTO_CAT_PRD_ENTT_INT_ENTT_ID_ATTR_ID_STORE_ID` (`entity_id`,`attribute_id`,`store_id`), KEY `IDX_…_ATTRIBUTE_ID` (`attribute_id`), KEY `IDX_…_STORE_ID` (`store_id`), KEY `IDX_…_ENTITY_ID` (`entity_id`), CONSTRAINT `FK_MAGENTO_…_ATTR_ID` FOREIGN KEY (`attribute_id`) REFERENCES `magento_eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `FK_MAGENTO_…_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `magento_catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `FK_MAGENTO_…_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `magento_core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE );
  • 35. Le présent : CREATE TABLE `sylius_product_attribute` ( `id` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(255) NOT NULL, `type` varchar(255) NOT NULL, -- integer, text, select… `storage_type` varchar(255) NOT NULL, -- integer, text, json… `configuration` longtext NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime DEFAULT NULL, `position` int(11) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `UNIQ_BFAF484A77153098` (`code`) ); + la table sylius_product_attribute_translation
  • 36. CREATE TABLE `sylius_product_attribute_value` ( `id` int(11) NOT NULL AUTO_INCREMENT, `product_id` int(11) NOT NULL, `attribute_id` int(11) NOT NULL, `locale_code` varchar(255) NOT NULL, `text_value` longtext, `boolean_value` tinyint(1) DEFAULT NULL, `integer_value` int(11) DEFAULT NULL, `float_value` double DEFAULT NULL, `datetime_value` datetime DEFAULT NULL, `date_value` date DEFAULT NULL, `json_value` longtext, PRIMARY KEY (`id`), KEY `IDX_8A053E544584665A` (`product_id`), KEY `IDX_8A053E54B6E62EFA` (`attribute_id`), CONSTRAINT `FK_8A053E544584665A` FOREIGN KEY (`product_id`) REFERENCES `sylius_product` (`id`) ON DELETE CASCADE, CONSTRAINT `FK_8A053E54B6E62EFA` FOREIGN KEY (`attribute_id`) REFERENCES `sylius_product_attribute` (`id`) ON DELETE CASCADE );
  • 37. Un panier est une commande qui a un state = 'cart'. Tout simplement.
  • 38. La BDD = ❤ BDD = Base De Données
  • 39. et le BDD ? BDD = Behaviour Driven Development
  • 40.
  • 41. @managing_countries Feature: Adding a new country In order to sell my goods to different countries As an Administrator I want to add a new country to the store Background: Given I am logged in as an administrator @ui Scenario: Adding country When I want to add a new country And I choose "United States" And I add it Then I should be notified that it has been successfully created And the country "United States" should appear in the store
  • 44. sylius_fixtures: suites: default: fixtures: locale: ~ currency: options: currencies: ['EUR'] channel: options: custom: afup_web_store: name: "Apéro AFUP" code: "AFUP_WEB" locales: - "%locale%" currencies: - "EUR" enabled: true hostname: "apero.afup.org"
  • 45. Un peu de poudre de perlinpinpin…
  • 46.
  • 47.
  • 48.
  • 49. !
  • 50. Une solution hyper connecté ! Facebook Twitter Slack Github …
  • 52. Venez au Forum PHP ! On vous parlera encore de Sylius, avec un peu plus de chocolat cette fois !