際際滷

際際滷Share a Scribd company logo
Drupal 10:
un framework PHP
di sviluppo
Cloud Native moderno
28/09/2022 - Drupal@127.0.0.1
Marco Primitivo
Drupal / PHP developer @ SparkFabrik
Drupal.org: https://www.drupal.org/u/bladedu
Twitter: https://www.twitter.com/BladeduMP
LinkedIn: https://www.linkedin.com/in/marcoprimitivo
Cosa vedremo
NOVIT
Symfony
PHP 8
Drupal e symfony
I PRINCIPI MACH
De鍖nizioni
Drupal e microservizi
Le iniziative Api-鍖rst
JSON:API ecosystem
12factor app
CONCLUSIONI
Drupal 10: le novit
- Symfony 6 e PHP 8.1
- CKEditor 5
- Olivero tema Front-end di default
- Claro tema amministrativo di default
- Core pi湛 snello
- Decoupled Menus (previsto dalla 10.1)
- Nessun supporto per IE11 
- Conversione di alcuni componenti jQuery con Javascript pi湛 moderno
Symfony 6
Drupal 10 user la nuova release 6.2 per un miglior supporto sul lungo termine
PHP 8.1 (8.2 ready)
Alcune nuove features introdotte a partire dalla versione 8.0:
- JIT
- Null safe operator
- Attributes
- Union and intersection types
- Match expression
- Named arguments
- Enums
- Fibers
Drupal e Symfony
Drupal e Symfony
Punti di contatto
- Console
- Dependency-injection
- Event-dispatcher
- Filesystem
- Http-foundation
- Http-kernel
- Routing
- Serializer
- Validator
- yaml
Drupal e Symfony
Drupal 竪 sia un CMS sia un CMF
Drupal e Symfony
Its really the Drupal community and not so much the
software that makes the Drupal project what it is. So
fostering the Drupal community is actually more important
than just managing the code base. Dries Buytaert
I principi del
MACH alliance
 Microservices
 API-First
 Cloud-native
 Headless
"Future proof enterprise technology
and propel current and future digital
experiences"
Microservices
Ma dunque Drupal 10 竪 architettato a microservizi?
Non nel senso stretto
Wikipedia
Microservizi
Martin Fowler
While there is no precise de鍖nition of
Microservice Architecture, there are
certain common characteristics
around organization around business
capability, automated deployment,
intelligence in the endpoints, and
decentralized control of languages
and data.
Non c竪 una singola de鍖nizione di
microservizi.
I servizi in unarchitettura a
microservizi sono spesso processi
che comunicano su un network per
raggiungere un obiettivo usando
protocolli technology-agnostic come
HTTP.
CNCF
Microservices are a modern approach
to application development that
takes advantage of cloud native
technologies
Tutto dipende dal sistema di riferimento da cui osservi le cose
Drupal As A Service (the big picture)
Microservizi
- Pu嘆 essere rimodulato per speci鍖che funzioni di business
- Permette una governance decentralizzata
- Permette un data management decentralizzato
- Completamente automatizzabile al livello infrastrutturale (CI/CD)
- Comunicazione network con protocolli standard (di solito HTTP)
Drupal al microscopio
Microservizi
- Core estremamente modulare
- Servizi debolmente accoppiati tramite diversi meccanismi (sia Drupal che
Symfony)
- Composer e SemVer per un controllo serrato su dipendenze ed estensioni
- Facilmente estendibile
- Facilmente aggiornabile
- Rilasci di sicurezza frequenti
- Community attiva sia su nuove iniziative che sulla gestione delle issues
Microservizi
Services
Dependency Injection
- Dependency
inversion principle
- Facilita la testabilit
del software
- Overridable
- Decorator pattern
- Service Tags
- Service Providers
- Con鍖gurazione
tramite yaml 鍖le
(module_name.servi
ces.yaml)
- Sono de鍖niti nel DIC
Plugins
- Discovery by
Annotations
- A runtime
- Estendibili
- KISS principle
- Factory e decorator
design patterns
Event dispatcher
- Observer pattern
- Subscribers de鍖niti
con un tagged
service
Si, Drupal 竪 ancora un monolite, ma un monolite estremamente modulare
API-First
Iniziative
API-鍖rst
Api-鍖rst initiative
- Creata il 29 Jun 2016
- Arrivata al capolinea
https://www.drupal.org/project/drupal/issues/3170020
- REST (core)
- JSON:API (core)
- GraphQL (contrib)
- OpenAPI (contrib)
Iniziative
API-鍖rst
Decoupled menus initiative
- Creata 10 settembre 2020
- https://www.drupal.org/project/decoupled_menus_init
iative
- In pieno sviluppo
- Al momento atteso nel core dalla 10.1
- Gi disponibile come contrib module per Drupal 9
https://www.drupal.org/project/decoupled_menus
API-鍖rst
Whats coming
- Disaccoppiamento completo tra funzionalit del core e responsabilit delle logiche e dei
dati grazie anche ai seguenti moduli contrib:
- JSON:API Hypermedia support ( https://www.drupal.org/project/jsonapi_hypermedia)
- JSON:API Resources (https://www.drupal.org/project/jsonapi_resources)
- json-schema.org support (https://www.drupal.org/project/jsonapi_schema)
- JSON:API cross-bundles support
(https://www.drupal.org/project/jsonapi_cross_bundles)
- OpenApi per JSON:API (https://www.drupal.org/project/openapi_jsonapi)
- Nuovi scenari di integrazione cross-sites con Entity Share
(https://www.drupal.org/project/entity_share)
API-鍖rst
Nel futuro c竪 JSON:API
https://jsonapi.org/
API-鍖rst
JSON:API
Client SDK
- JavaScript
- Typescript
- iOS
- Ruby
- PHP
- Dart
- Perl
- Java
- Android
- R
- Elm
- .NET
- Python
- Elixir
API-鍖rst
JSON:API
Server SDK
- Swift
- PHP
- Node.js
- Ruby
- Python
- Go
- .NET
- Java
- Scala
- Elixir
- Haskell
- Perl
- Vala
- Rust
- Dart
- Crystal
Cloud Native
Cloud Native
12factor.net per un Cloud Native di successo
12 factor app
Cloud Native
Business
 Riduzione dei costi
 Servizi pi湛 affidabili
 Migliori performance
 Nessun downtime durante i deploy
12 factor app
Cloud Native
Tech
 Deploy pi湛 frequenti e pi湛 veloci (anche di venerd狸
pomeriggio dopo le 17)
 Scalabilit con poco sforzo
 Nessun bisogno di accedere allinfrastruttura
 Divergenza minima tra ambiente di sviluppo e
produzione
 Onboard di nuovi sviluppatori minimizzato
 Con鍖gurazione (anche) in code
 Dependencies management con Composer
 Drush per la linea di comando
 S3fs come 鍖lesystem
(https://www.drupal.org/project/s3fs)
 Integrazione con Prometheus
(https://www.drupal.org/project/prometheusio_e
xporter)
Drupal 10 竪 a
misura dei
DevOps
Cloud Native
 Ddev per il local stack
 DrupalPod
(https://github.com/shaal/DrupalPod)
 MinIO con s3fs module
 Monolog
(https://www.drupal.org/project/monolog)
 WebPro鍖ler
(https://www.drupal.org/project/webpro鍖
ler)
 Con鍖g Manager (core)
 Upgrade paths con drush deploy
Ma anche
per i devs
Cloud Native
Headless
Vantaggi
- Front-end completamente disaccoppiato dal Back-end
- Omnichannel
- Team e tecnologie differenti
- UX/UI su misura
Headless
Alcune soluzioni gi disponibili con e per Drupal
- REST (core)
- JSON:API (core)
- GraphQL (contrib)
- Next.js per Drupal (https://next-drupal.org/)
Headless
Headless
JSON:API
REST
Headless
// Create a DrupalClient.
const drupal = new DrupalClient("https://www.sparkfabrik.com",
{
auth: {} // Authentication
fetcher: {} // Custom fetcher
cache: {} // Cache support
serializer: {} // Custom serializer
})
// Fetch an article.
const article = await drupal.getResource(
"node--article",
"907034d4-ab35-4949-84e4-d2b7afed82df"
)
Headless
const article = await drupal.createResource("node--article",
{
attributes: {
title: "Title of Article",
body: {
value: "<p>Content of body field</p>",
format: "full_html",
},
},
})
Drupal 10: un framework PHP di sviluppo Cloud Native moderno
Conclusioni
- Semplicemente OOP e design patterns
- Ampio spazio di manovra su molti fronti
- Up-to-date con le ultime novit sul campo
- Backward compatible (nel limiti del possibile)
- Mai noioso
Conclusioni
Citazioni
Grazie!
WE ARE A TECH COMPANY OF ENGINEERS,
DEVELOPERS AND DESIGNERS WHO WILL
THINK, DESIGN AND BUILD YOUR CUSTOM APPLICATIONS,
MODERNIZE YOUR LEGACY AND TAKE YOU TO THE
CLOUD NATIVE ERA.
SPARKFABRIK
We help italian businesses to bridge
the gap with China thanks to our
Official Partnership with
Alibaba Cloud.
SparkFabrik is Cloud Native
Computing Foundation
Silver Member.
SparkFabrik is Google Cloud Platform
Technology Partner.
SparkFabrik is AWS
Official Partner.
PROUD OF OUR PARTNERSHIPS

More Related Content

Similar to Drupal 10: un framework PHP di sviluppo Cloud Native moderno (20)

Creare distribuzioni con drupal
Creare distribuzioni con drupalCreare distribuzioni con drupal
Creare distribuzioni con drupal
Alessandro Capra
Framework per la realizzazione di ria
Framework per la realizzazione di riaFramework per la realizzazione di ria
Framework per la realizzazione di ria
Lorenzo Bortolotto
System integration: Drupal tra Alfresco ed Ext JS
System integration: Drupal tra Alfresco ed Ext JSSystem integration: Drupal tra Alfresco ed Ext JS
System integration: Drupal tra Alfresco ed Ext JS
Eugenio Minardi
Drupal 7
Drupal 7Drupal 7
Drupal 7
Alessandro Capra
Architetture a Microservizi con Docker Container
Architetture a Microservizi con Docker ContainerArchitetture a Microservizi con Docker Container
Architetture a Microservizi con Docker Container
Roberto Messora
Rich Internet Application
Rich Internet ApplicationRich Internet Application
Rich Internet Application
Marcello Teodori
Software libero at ENEA
Software libero at ENEASoftware libero at ENEA
Software libero at ENEA
NaLUG
AngularJs, Bootstrap e Cordova: il connubio per app mobile cross-platform
AngularJs, Bootstrap e Cordova: il connubio per app mobile cross-platformAngularJs, Bootstrap e Cordova: il connubio per app mobile cross-platform
AngularJs, Bootstrap e Cordova: il connubio per app mobile cross-platform
Gabriele Gaggi
Sviluppo Web Agile con Castle Monorail
Sviluppo Web Agile con Castle MonorailSviluppo Web Agile con Castle Monorail
Sviluppo Web Agile con Castle Monorail
DotNetMarche
2014.04.04 Sviluppare applicazioni web (completamente) on line con Visual Stu...
2014.04.04 Sviluppare applicazioni web (completamente) on line con Visual Stu...2014.04.04 Sviluppare applicazioni web (completamente) on line con Visual Stu...
2014.04.04 Sviluppare applicazioni web (completamente) on line con Visual Stu...
Marco Parenzan
Omnis italianmeeting 2016-10-20
Omnis italianmeeting 2016-10-20Omnis italianmeeting 2016-10-20
Omnis italianmeeting 2016-10-20
Romualdo Gobbo
Erlug
ErlugErlug
Erlug
Linuxaria.com
Con Aruba, a lezione di cloud #lezione 31: 'API e Cloud Computing, personali...
Con Aruba, a lezione di cloud  #lezione 31: 'API e Cloud Computing, personali...Con Aruba, a lezione di cloud  #lezione 31: 'API e Cloud Computing, personali...
Con Aruba, a lezione di cloud #lezione 31: 'API e Cloud Computing, personali...
Aruba S.p.A.
Spring e Flex
Spring e FlexSpring e Flex
Spring e Flex
Marcello Teodori
Ocp-overview del progetto
Ocp-overview del progettoOcp-overview del progetto
Ocp-overview del progetto
opencityplatform
Angular js o React? Spunti e idee per la scelta di un framework
Angular js o React? Spunti e idee per la scelta di un frameworkAngular js o React? Spunti e idee per la scelta di un framework
Angular js o React? Spunti e idee per la scelta di un framework
Giovanni Buffa
Le Novita dello sviluppo applicazioni per IBM i
Le Novita dello sviluppo applicazioni per IBM iLe Novita dello sviluppo applicazioni per IBM i
Le Novita dello sviluppo applicazioni per IBM i
S.info Srl
Evento 18 giugno - Sviluppo applicativo
Evento 18 giugno - Sviluppo applicativoEvento 18 giugno - Sviluppo applicativo
Evento 18 giugno - Sviluppo applicativo
PRAGMA PROGETTI
Ocp presentazione generale - overview del progetto
Ocp presentazione generale - overview del progettoOcp presentazione generale - overview del progetto
Ocp presentazione generale - overview del progetto
opencityplatform
Fabio Cecaro - WorkShop PaaS Platform as a Services
Fabio Cecaro - WorkShop PaaS  Platform as a ServicesFabio Cecaro - WorkShop PaaS  Platform as a Services
Fabio Cecaro - WorkShop PaaS Platform as a Services
Fondazione CUOA
Creare distribuzioni con drupal
Creare distribuzioni con drupalCreare distribuzioni con drupal
Creare distribuzioni con drupal
Alessandro Capra
Framework per la realizzazione di ria
Framework per la realizzazione di riaFramework per la realizzazione di ria
Framework per la realizzazione di ria
Lorenzo Bortolotto
System integration: Drupal tra Alfresco ed Ext JS
System integration: Drupal tra Alfresco ed Ext JSSystem integration: Drupal tra Alfresco ed Ext JS
System integration: Drupal tra Alfresco ed Ext JS
Eugenio Minardi
Architetture a Microservizi con Docker Container
Architetture a Microservizi con Docker ContainerArchitetture a Microservizi con Docker Container
Architetture a Microservizi con Docker Container
Roberto Messora
Rich Internet Application
Rich Internet ApplicationRich Internet Application
Rich Internet Application
Marcello Teodori
Software libero at ENEA
Software libero at ENEASoftware libero at ENEA
Software libero at ENEA
NaLUG
AngularJs, Bootstrap e Cordova: il connubio per app mobile cross-platform
AngularJs, Bootstrap e Cordova: il connubio per app mobile cross-platformAngularJs, Bootstrap e Cordova: il connubio per app mobile cross-platform
AngularJs, Bootstrap e Cordova: il connubio per app mobile cross-platform
Gabriele Gaggi
Sviluppo Web Agile con Castle Monorail
Sviluppo Web Agile con Castle MonorailSviluppo Web Agile con Castle Monorail
Sviluppo Web Agile con Castle Monorail
DotNetMarche
2014.04.04 Sviluppare applicazioni web (completamente) on line con Visual Stu...
2014.04.04 Sviluppare applicazioni web (completamente) on line con Visual Stu...2014.04.04 Sviluppare applicazioni web (completamente) on line con Visual Stu...
2014.04.04 Sviluppare applicazioni web (completamente) on line con Visual Stu...
Marco Parenzan
Omnis italianmeeting 2016-10-20
Omnis italianmeeting 2016-10-20Omnis italianmeeting 2016-10-20
Omnis italianmeeting 2016-10-20
Romualdo Gobbo
Con Aruba, a lezione di cloud #lezione 31: 'API e Cloud Computing, personali...
Con Aruba, a lezione di cloud  #lezione 31: 'API e Cloud Computing, personali...Con Aruba, a lezione di cloud  #lezione 31: 'API e Cloud Computing, personali...
Con Aruba, a lezione di cloud #lezione 31: 'API e Cloud Computing, personali...
Aruba S.p.A.
Ocp-overview del progetto
Ocp-overview del progettoOcp-overview del progetto
Ocp-overview del progetto
opencityplatform
Angular js o React? Spunti e idee per la scelta di un framework
Angular js o React? Spunti e idee per la scelta di un frameworkAngular js o React? Spunti e idee per la scelta di un framework
Angular js o React? Spunti e idee per la scelta di un framework
Giovanni Buffa
Le Novita dello sviluppo applicazioni per IBM i
Le Novita dello sviluppo applicazioni per IBM iLe Novita dello sviluppo applicazioni per IBM i
Le Novita dello sviluppo applicazioni per IBM i
S.info Srl
Evento 18 giugno - Sviluppo applicativo
Evento 18 giugno - Sviluppo applicativoEvento 18 giugno - Sviluppo applicativo
Evento 18 giugno - Sviluppo applicativo
PRAGMA PROGETTI
Ocp presentazione generale - overview del progetto
Ocp presentazione generale - overview del progettoOcp presentazione generale - overview del progetto
Ocp presentazione generale - overview del progetto
opencityplatform
Fabio Cecaro - WorkShop PaaS Platform as a Services
Fabio Cecaro - WorkShop PaaS  Platform as a ServicesFabio Cecaro - WorkShop PaaS  Platform as a Services
Fabio Cecaro - WorkShop PaaS Platform as a Services
Fondazione CUOA

More from sparkfabrik (20)

Talks on my machine: Drupal, Storybook e SDC
Talks on my machine: Drupal, Storybook e SDCTalks on my machine: Drupal, Storybook e SDC
Talks on my machine: Drupal, Storybook e SDC
sparkfabrik
Talks on my machine: Drupal: AI e Typesense come integrare la ricerca semantica
Talks on my machine:  Drupal: AI e Typesense come integrare la ricerca semanticaTalks on my machine:  Drupal: AI e Typesense come integrare la ricerca semantica
Talks on my machine: Drupal: AI e Typesense come integrare la ricerca semantica
sparkfabrik
KCD Italy 2023 - Secure Software Supply chain for OCI Artifact on Kubernetes
KCD Italy 2023 - Secure Software Supply chain for OCI Artifact on KubernetesKCD Italy 2023 - Secure Software Supply chain for OCI Artifact on Kubernetes
KCD Italy 2023 - Secure Software Supply chain for OCI Artifact on Kubernetes
sparkfabrik
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
sparkfabrik
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirt
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirtIAD 2023 - 22 Years of Agile and all I got is this lousy t-shirt
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirt
sparkfabrik
2023 - Drupalcon - How Drupal builds your pages
2023 - Drupalcon - How Drupal builds your pages2023 - Drupalcon - How Drupal builds your pages
2023 - Drupalcon - How Drupal builds your pages
sparkfabrik
2023 - TAC23 - Agile HR - Racconti dal fronte
2023 - TAC23 - Agile HR - Racconti dal fronte2023 - TAC23 - Agile HR - Racconti dal fronte
2023 - TAC23 - Agile HR - Racconti dal fronte
sparkfabrik
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...
sparkfabrik
What is the Secure Supply Chain and the Current State of the PHP Ecosystem
What is the Secure Supply Chain and the Current State of the PHP EcosystemWhat is the Secure Supply Chain and the Current State of the PHP Ecosystem
What is the Secure Supply Chain and the Current State of the PHP Ecosystem
sparkfabrik
UX e Web sostenibile (UXday 2023).pdf
UX e Web sostenibile (UXday 2023).pdfUX e Web sostenibile (UXday 2023).pdf
UX e Web sostenibile (UXday 2023).pdf
sparkfabrik
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
sparkfabrik
Deep dive nella supply chain della nostra infrastruttura cloud
Deep dive nella supply chain della nostra infrastruttura cloudDeep dive nella supply chain della nostra infrastruttura cloud
Deep dive nella supply chain della nostra infrastruttura cloud
sparkfabrik
KCD Italy 2022 - Application driven infrastructure with Crossplane
KCD Italy 2022 - Application driven infrastructure with CrossplaneKCD Italy 2022 - Application driven infrastructure with Crossplane
KCD Italy 2022 - Application driven infrastructure with Crossplane
sparkfabrik
Come Drupal costruisce le tue pagine
Come Drupal costruisce le tue pagineCome Drupal costruisce le tue pagine
Come Drupal costruisce le tue pagine
sparkfabrik
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)
sparkfabrik
Do you know what your Drupal is doing_ Observe it!
Do you know what your Drupal is doing_ Observe it!Do you know what your Drupal is doing_ Observe it!
Do you know what your Drupal is doing_ Observe it!
sparkfabrik
Progettare e sviluppare soluzioni serverless con AWS
Progettare e sviluppare soluzioni serverless con AWSProgettare e sviluppare soluzioni serverless con AWS
Progettare e sviluppare soluzioni serverless con AWS
sparkfabrik
From React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I startedFrom React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I started
sparkfabrik
Headless Drupal: A modern approach to (micro)services and APIs
Headless Drupal: A modern approach to (micro)services and APIsHeadless Drupal: A modern approach to (micro)services and APIs
Headless Drupal: A modern approach to (micro)services and APIs
sparkfabrik
Cloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guideCloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guide
sparkfabrik
Talks on my machine: Drupal, Storybook e SDC
Talks on my machine: Drupal, Storybook e SDCTalks on my machine: Drupal, Storybook e SDC
Talks on my machine: Drupal, Storybook e SDC
sparkfabrik
Talks on my machine: Drupal: AI e Typesense come integrare la ricerca semantica
Talks on my machine:  Drupal: AI e Typesense come integrare la ricerca semanticaTalks on my machine:  Drupal: AI e Typesense come integrare la ricerca semantica
Talks on my machine: Drupal: AI e Typesense come integrare la ricerca semantica
sparkfabrik
KCD Italy 2023 - Secure Software Supply chain for OCI Artifact on Kubernetes
KCD Italy 2023 - Secure Software Supply chain for OCI Artifact on KubernetesKCD Italy 2023 - Secure Software Supply chain for OCI Artifact on Kubernetes
KCD Italy 2023 - Secure Software Supply chain for OCI Artifact on Kubernetes
sparkfabrik
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
sparkfabrik
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirt
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirtIAD 2023 - 22 Years of Agile and all I got is this lousy t-shirt
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirt
sparkfabrik
2023 - Drupalcon - How Drupal builds your pages
2023 - Drupalcon - How Drupal builds your pages2023 - Drupalcon - How Drupal builds your pages
2023 - Drupalcon - How Drupal builds your pages
sparkfabrik
2023 - TAC23 - Agile HR - Racconti dal fronte
2023 - TAC23 - Agile HR - Racconti dal fronte2023 - TAC23 - Agile HR - Racconti dal fronte
2023 - TAC23 - Agile HR - Racconti dal fronte
sparkfabrik
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...
sparkfabrik
What is the Secure Supply Chain and the Current State of the PHP Ecosystem
What is the Secure Supply Chain and the Current State of the PHP EcosystemWhat is the Secure Supply Chain and the Current State of the PHP Ecosystem
What is the Secure Supply Chain and the Current State of the PHP Ecosystem
sparkfabrik
UX e Web sostenibile (UXday 2023).pdf
UX e Web sostenibile (UXday 2023).pdfUX e Web sostenibile (UXday 2023).pdf
UX e Web sostenibile (UXday 2023).pdf
sparkfabrik
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
sparkfabrik
Deep dive nella supply chain della nostra infrastruttura cloud
Deep dive nella supply chain della nostra infrastruttura cloudDeep dive nella supply chain della nostra infrastruttura cloud
Deep dive nella supply chain della nostra infrastruttura cloud
sparkfabrik
KCD Italy 2022 - Application driven infrastructure with Crossplane
KCD Italy 2022 - Application driven infrastructure with CrossplaneKCD Italy 2022 - Application driven infrastructure with Crossplane
KCD Italy 2022 - Application driven infrastructure with Crossplane
sparkfabrik
Come Drupal costruisce le tue pagine
Come Drupal costruisce le tue pagineCome Drupal costruisce le tue pagine
Come Drupal costruisce le tue pagine
sparkfabrik
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)
sparkfabrik
Do you know what your Drupal is doing_ Observe it!
Do you know what your Drupal is doing_ Observe it!Do you know what your Drupal is doing_ Observe it!
Do you know what your Drupal is doing_ Observe it!
sparkfabrik
Progettare e sviluppare soluzioni serverless con AWS
Progettare e sviluppare soluzioni serverless con AWSProgettare e sviluppare soluzioni serverless con AWS
Progettare e sviluppare soluzioni serverless con AWS
sparkfabrik
From React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I startedFrom React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I started
sparkfabrik
Headless Drupal: A modern approach to (micro)services and APIs
Headless Drupal: A modern approach to (micro)services and APIsHeadless Drupal: A modern approach to (micro)services and APIs
Headless Drupal: A modern approach to (micro)services and APIs
sparkfabrik
Cloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guideCloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guide
sparkfabrik

Drupal 10: un framework PHP di sviluppo Cloud Native moderno

  • 1. Drupal 10: un framework PHP di sviluppo Cloud Native moderno 28/09/2022 - Drupal@127.0.0.1
  • 2. Marco Primitivo Drupal / PHP developer @ SparkFabrik Drupal.org: https://www.drupal.org/u/bladedu Twitter: https://www.twitter.com/BladeduMP LinkedIn: https://www.linkedin.com/in/marcoprimitivo
  • 3. Cosa vedremo NOVIT Symfony PHP 8 Drupal e symfony I PRINCIPI MACH De鍖nizioni Drupal e microservizi Le iniziative Api-鍖rst JSON:API ecosystem 12factor app CONCLUSIONI
  • 4. Drupal 10: le novit - Symfony 6 e PHP 8.1 - CKEditor 5 - Olivero tema Front-end di default - Claro tema amministrativo di default - Core pi湛 snello - Decoupled Menus (previsto dalla 10.1) - Nessun supporto per IE11 - Conversione di alcuni componenti jQuery con Javascript pi湛 moderno
  • 5. Symfony 6 Drupal 10 user la nuova release 6.2 per un miglior supporto sul lungo termine
  • 6. PHP 8.1 (8.2 ready) Alcune nuove features introdotte a partire dalla versione 8.0: - JIT - Null safe operator - Attributes - Union and intersection types - Match expression - Named arguments - Enums - Fibers
  • 7. Drupal e Symfony Drupal e Symfony Punti di contatto - Console - Dependency-injection - Event-dispatcher - Filesystem - Http-foundation - Http-kernel - Routing - Serializer - Validator - yaml
  • 8. Drupal e Symfony Drupal 竪 sia un CMS sia un CMF
  • 9. Drupal e Symfony Its really the Drupal community and not so much the software that makes the Drupal project what it is. So fostering the Drupal community is actually more important than just managing the code base. Dries Buytaert
  • 10. I principi del MACH alliance Microservices API-First Cloud-native Headless "Future proof enterprise technology and propel current and future digital experiences"
  • 12. Ma dunque Drupal 10 竪 architettato a microservizi?
  • 13. Non nel senso stretto
  • 14. Wikipedia Microservizi Martin Fowler While there is no precise de鍖nition of Microservice Architecture, there are certain common characteristics around organization around business capability, automated deployment, intelligence in the endpoints, and decentralized control of languages and data. Non c竪 una singola de鍖nizione di microservizi. I servizi in unarchitettura a microservizi sono spesso processi che comunicano su un network per raggiungere un obiettivo usando protocolli technology-agnostic come HTTP. CNCF Microservices are a modern approach to application development that takes advantage of cloud native technologies
  • 15. Tutto dipende dal sistema di riferimento da cui osservi le cose
  • 16. Drupal As A Service (the big picture) Microservizi - Pu嘆 essere rimodulato per speci鍖che funzioni di business - Permette una governance decentralizzata - Permette un data management decentralizzato - Completamente automatizzabile al livello infrastrutturale (CI/CD) - Comunicazione network con protocolli standard (di solito HTTP)
  • 17. Drupal al microscopio Microservizi - Core estremamente modulare - Servizi debolmente accoppiati tramite diversi meccanismi (sia Drupal che Symfony) - Composer e SemVer per un controllo serrato su dipendenze ed estensioni - Facilmente estendibile - Facilmente aggiornabile - Rilasci di sicurezza frequenti - Community attiva sia su nuove iniziative che sulla gestione delle issues
  • 18. Microservizi Services Dependency Injection - Dependency inversion principle - Facilita la testabilit del software - Overridable - Decorator pattern - Service Tags - Service Providers - Con鍖gurazione tramite yaml 鍖le (module_name.servi ces.yaml) - Sono de鍖niti nel DIC Plugins - Discovery by Annotations - A runtime - Estendibili - KISS principle - Factory e decorator design patterns Event dispatcher - Observer pattern - Subscribers de鍖niti con un tagged service
  • 19. Si, Drupal 竪 ancora un monolite, ma un monolite estremamente modulare
  • 21. Iniziative API-鍖rst Api-鍖rst initiative - Creata il 29 Jun 2016 - Arrivata al capolinea https://www.drupal.org/project/drupal/issues/3170020 - REST (core) - JSON:API (core) - GraphQL (contrib) - OpenAPI (contrib)
  • 22. Iniziative API-鍖rst Decoupled menus initiative - Creata 10 settembre 2020 - https://www.drupal.org/project/decoupled_menus_init iative - In pieno sviluppo - Al momento atteso nel core dalla 10.1 - Gi disponibile come contrib module per Drupal 9 https://www.drupal.org/project/decoupled_menus
  • 23. API-鍖rst Whats coming - Disaccoppiamento completo tra funzionalit del core e responsabilit delle logiche e dei dati grazie anche ai seguenti moduli contrib: - JSON:API Hypermedia support ( https://www.drupal.org/project/jsonapi_hypermedia) - JSON:API Resources (https://www.drupal.org/project/jsonapi_resources) - json-schema.org support (https://www.drupal.org/project/jsonapi_schema) - JSON:API cross-bundles support (https://www.drupal.org/project/jsonapi_cross_bundles) - OpenApi per JSON:API (https://www.drupal.org/project/openapi_jsonapi) - Nuovi scenari di integrazione cross-sites con Entity Share (https://www.drupal.org/project/entity_share)
  • 24. API-鍖rst Nel futuro c竪 JSON:API https://jsonapi.org/
  • 25. API-鍖rst JSON:API Client SDK - JavaScript - Typescript - iOS - Ruby - PHP - Dart - Perl - Java - Android - R - Elm - .NET - Python - Elixir
  • 26. API-鍖rst JSON:API Server SDK - Swift - PHP - Node.js - Ruby - Python - Go - .NET - Java - Scala - Elixir - Haskell - Perl - Vala - Rust - Dart - Crystal
  • 28. Cloud Native 12factor.net per un Cloud Native di successo
  • 29. 12 factor app Cloud Native Business Riduzione dei costi Servizi pi湛 affidabili Migliori performance Nessun downtime durante i deploy
  • 30. 12 factor app Cloud Native Tech Deploy pi湛 frequenti e pi湛 veloci (anche di venerd狸 pomeriggio dopo le 17) Scalabilit con poco sforzo Nessun bisogno di accedere allinfrastruttura Divergenza minima tra ambiente di sviluppo e produzione Onboard di nuovi sviluppatori minimizzato
  • 31. Con鍖gurazione (anche) in code Dependencies management con Composer Drush per la linea di comando S3fs come 鍖lesystem (https://www.drupal.org/project/s3fs) Integrazione con Prometheus (https://www.drupal.org/project/prometheusio_e xporter) Drupal 10 竪 a misura dei DevOps Cloud Native
  • 32. Ddev per il local stack DrupalPod (https://github.com/shaal/DrupalPod) MinIO con s3fs module Monolog (https://www.drupal.org/project/monolog) WebPro鍖ler (https://www.drupal.org/project/webpro鍖 ler) Con鍖g Manager (core) Upgrade paths con drush deploy Ma anche per i devs Cloud Native
  • 34. Vantaggi - Front-end completamente disaccoppiato dal Back-end - Omnichannel - Team e tecnologie differenti - UX/UI su misura Headless
  • 35. Alcune soluzioni gi disponibili con e per Drupal - REST (core) - JSON:API (core) - GraphQL (contrib) - Next.js per Drupal (https://next-drupal.org/) Headless
  • 37. Headless // Create a DrupalClient. const drupal = new DrupalClient("https://www.sparkfabrik.com", { auth: {} // Authentication fetcher: {} // Custom fetcher cache: {} // Cache support serializer: {} // Custom serializer }) // Fetch an article. const article = await drupal.getResource( "node--article", "907034d4-ab35-4949-84e4-d2b7afed82df" )
  • 38. Headless const article = await drupal.createResource("node--article", { attributes: { title: "Title of Article", body: { value: "<p>Content of body field</p>", format: "full_html", }, }, })
  • 39. Drupal 10: un framework PHP di sviluppo Cloud Native moderno Conclusioni - Semplicemente OOP e design patterns - Ampio spazio di manovra su molti fronti - Up-to-date con le ultime novit sul campo - Backward compatible (nel limiti del possibile) - Mai noioso
  • 42. WE ARE A TECH COMPANY OF ENGINEERS, DEVELOPERS AND DESIGNERS WHO WILL THINK, DESIGN AND BUILD YOUR CUSTOM APPLICATIONS, MODERNIZE YOUR LEGACY AND TAKE YOU TO THE CLOUD NATIVE ERA. SPARKFABRIK
  • 43. We help italian businesses to bridge the gap with China thanks to our Official Partnership with Alibaba Cloud. SparkFabrik is Cloud Native Computing Foundation Silver Member. SparkFabrik is Google Cloud Platform Technology Partner. SparkFabrik is AWS Official Partner. PROUD OF OUR PARTNERSHIPS