# PIMCore
---

---
Under the hood:
- Symfony
- MariaDB
- Redis
- Cron
---

---
## Magic Classes:

---
## Build data Structure

---
## CodeGen: PHP Class

----
## CodeGen: Lisitng

----
## CodeGen: definition

---
## SQL Generate Table
```sql=
create table object_query_beauty
(
oo_id int default 0 not null
primary key,
oo_classId varchar(50) default 'beauty' null,
oo_className varchar(255) default 'beauty' null,
category__id int null,
category__type enum ('document', 'asset', 'object') null,
gender__id int null,
gender__type enum ('document', 'asset', 'object') null,
productType__id int null,
productType__type enum ('document', 'asset', 'object') null,
material text null,
wholesalePriceEUR double null,
retailPriceEUR double null,
wholesalePriceUSD double null,
subtype__id int null,
subtype__type enum ('document', 'asset', 'object') null,
retailPriceUSD double null,
brand__id int null,
brand__type enum ('document', 'asset', 'object') null,
collection__id int null,
collection__type enum ('document', 'asset', 'object') null,
mainPhoto int null,
photos__images text null,
photos__hotspots longtext null
)
charset = utf8mb4;
```
----
## SQL View
```sql=
create view object_beauty as
select
`object_query_beauty`.`oo_id` AS `oo_id`,
`object_query_beauty`.`oo_classId` AS `oo_classId`,
`object_query_beauty`.`oo_className` AS `oo_className`,
`object_query_beauty`.`category__id` AS `category__id`,
`object_query_beauty`.`category__type` AS `category__type`,
--- ...
`objects`.`o_id` AS `o_id`,
`objects`.`o_parentId` AS `o_parentId`,
`objects`.`o_type` AS `o_type`,
`objects`.`o_key` AS `o_key`,
from (`object_query_beauty` join `objects` on
(`objects`.`o_id` = `object_query_beauty`.`oo_id`));
```
----
## SQL Index
```sql=
create table object_relations_beauty
(
id bigint auto_increment primary key,
src_id int default 0 not null,
dest_id int default 0 not null,
type varchar(50) default '' not null,
ownername varchar(70) default '' not null,
position varchar(70) default '0' not null
)
charset = utf8mb4;
create index forward_lookup
on object_relations_beauty (src_id, ownername, position);
create index reverse_lookup
on object_relations_beauty (dest_id, type);
```
---
## User Interface

---
## Extend

---
## ECom Bundle

---
## BuzzWords
- HeadLess
- JAM Stack
- GraphQL
---
## DataHub

---
### Security Schema

---
### GraphQL

----
```graphql=
query Query {
getHomewareListing(first: 5, after: 5) {
edges {
node {
id
name
children(objectTypes: ["variant", "object"]) {
... on object_homeware {
id
name
}
}
parent {
... on object_homeware {
id
name
}
}
SKU
mainPhoto {
catalog: fullpath(thumbnail: "catalog")
product: fullpath(thumbnail: "product")
sliderSmall: fullpath(thumbnail: "sliderSmall")
}
gender: gender {
... on object_productGender {
id
name
priorityWeight
}
}
category: category {
... on object_category {
id
name
priorityWeight
}
}
type: productType {
... on object_productType {
id
name
priorityWeight
}
}
subtype: subtype {
... on object_productSubtype {
id
name
priorityWeight
}
}
brand: brand {
... on object_brand{
id
name
slug {
slug
siteId
}
}
}
collection: collection {
... on object_collection{
id
name
slug {
slug
siteId
}
}
}
description
composition
color
colorFamily: colorFamily {
... on object_productColorFamily {
id
name
priorityWeight
}
}
material: material {
... on object_productMaterial {
id
name
priorityWeight
}
}
dimensions
netWeight
grossWeight
wholesalePriceEUR
retailPriceEUR
wholesalePriceUSD
retailPriceUSD
slug {
slug
siteId
}
availability
year
season
shippingTerms
priceRange
status
brandName
}
}
}
}
```
---
## Caveats
- Auth
- Caching
- Complexity
---
## BFF
- JWT
- HTTP Get/Prerender to JSON
- REST
---
## Utility classes

----

---
## Gatsby/SvelteKit
- Generation Time
- Incremental builds
- Progressive enhancement
---
```mermaid
sequenceDiagram
autonumber
actor Browser
Browser->>+BFF: Authenticate me
Note right of Browser: REST
BFF->>+PIM: User Exists?
Note right of BFF: GraphQL
PIM->>-BFF: UserInfo
BFF->>-Browser: Send JWT
Browser->>+BFF: Add to basket
Note right of Browser: JWT attached
BFF->>+PIM: Update basket
Note right of BFF: GraphQL populated with JWT data
PIM->>-BFF: New Basket State
BFF->>-Browser: Send basket state
```
---
Additional features:
- Asset Managment
- Workflows
---
Questions?
{"metaMigratedAt":"2023-06-17T01:32:48.061Z","metaMigratedFrom":"YAML","title":"PIMCore","breaks":true,"slideOptions":"{\"theme\":\"solarized\",\"transition\":\"fade\",\"spotlight\":{\"enabled\":true}}","contributors":"[{\"id\":\"1d11b2f0-e3ed-4efe-a127-564d3da26e3d\",\"add\":11723,\"del\":4778}]"}