SlideShare ist ein Scribd-Unternehmen logo
1 von 43
Downloaden Sie, um offline zu lesen
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
●Definizioni
●Drupal e microservizi
●Le iniziative Api-first
●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
It’s 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 definition 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 definizione di
microservizi.
I servizi in un’architettura 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 specifiche 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
- Configurazione
tramite yaml file
(module_name.servi
ces.yaml)
- Sono definiti nel DIC
Plugins
- Discovery by
Annotations
- A runtime
- Estendibili
- KISS principle
- Factory e decorator
design patterns
Event dispatcher
- Observer pattern
- Subscribers definiti
con un tagged
service
Si, Drupal è ancora un monolite, ma un monolite estremamente modulare
API-First
Iniziative
API-first
Api-first 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-first
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-first
What’s 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-first
Nel futuro c’è JSON:API
https://jsonapi.org/
API-first
JSON:API
Client SDK
- JavaScript
- Typescript
- iOS
- Ruby
- PHP
- Dart
- Perl
- Java
- Android
- R
- Elm
- .NET
- Python
- Elixir
API-first
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 all’infrastruttura
● Divergenza minima tra ambiente di sviluppo e
produzione
● Onboard di nuovi sviluppatori minimizzato
● Configurazione (anche) in code
● Dependencies management con Composer
● Drush per la linea di comando
● S3fs come filesystem
(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)
● WebProfiler
(https://www.drupal.org/project/webprofi
ler)
● Config 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

Weitere ähnliche Inhalte

Ähnlich wie Drupal 10: un framework PHP di sviluppo Cloud Native moderno

Framework per la realizzazione di ria
Framework per la realizzazione di riaFramework per la realizzazione di ria
Framework per la realizzazione di riaLorenzo 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 JSEugenio Minardi
 
Architetture a Microservizi con Docker Container
Architetture a Microservizi con Docker ContainerArchitetture a Microservizi con Docker Container
Architetture a Microservizi con Docker ContainerRoberto Messora
 
Software libero at ENEA
Software libero at ENEASoftware libero at ENEA
Software libero at ENEANaLUG
 
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-platformGabriele Gaggi
 
Sviluppo Web Agile con Castle Monorail
Sviluppo Web Agile con Castle MonorailSviluppo Web Agile con Castle Monorail
Sviluppo Web Agile con Castle MonorailDotNetMarche
 
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-20Romualdo 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.
 
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 frameworkGiovanni 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 iS.info Srl
 
Evento 18 giugno - Sviluppo applicativo
Evento 18 giugno - Sviluppo applicativoEvento 18 giugno - Sviluppo applicativo
Evento 18 giugno - Sviluppo applicativoPRAGMA PROGETTI
 
Ocp presentazione generale - overview del progetto
Ocp presentazione generale - overview del progettoOcp presentazione generale - overview del progetto
Ocp presentazione generale - overview del progettoopencityplatform
 
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 ServicesFondazione CUOA
 
October 2009 - JBoss Cloud
October 2009 - JBoss CloudOctober 2009 - JBoss Cloud
October 2009 - JBoss CloudJBug Italy
 

Ähnlich wie Drupal 10: un framework PHP di sviluppo Cloud Native moderno (20)

Framework per la realizzazione di ria
Framework per la realizzazione di riaFramework per la realizzazione di ria
Framework per la realizzazione di ria
 
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
 
Drupal 7
Drupal 7Drupal 7
Drupal 7
 
Architetture a Microservizi con Docker Container
Architetture a Microservizi con Docker ContainerArchitetture a Microservizi con Docker Container
Architetture a Microservizi con Docker Container
 
Rich Internet Application
Rich Internet ApplicationRich Internet Application
Rich Internet Application
 
Software libero at ENEA
Software libero at ENEASoftware libero at ENEA
Software libero at ENEA
 
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
 
Sviluppo Web Agile con Castle Monorail
Sviluppo Web Agile con Castle MonorailSviluppo Web Agile con Castle Monorail
Sviluppo Web Agile con Castle Monorail
 
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...
 
Omnis italianmeeting 2016-10-20
Omnis italianmeeting 2016-10-20Omnis italianmeeting 2016-10-20
Omnis italianmeeting 2016-10-20
 
Erlug
ErlugErlug
Erlug
 
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...
 
Spring e Flex
Spring e FlexSpring e Flex
Spring e Flex
 
Ocp-overview del progetto
Ocp-overview del progettoOcp-overview del progetto
Ocp-overview del progetto
 
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
 
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
 
Evento 18 giugno - Sviluppo applicativo
Evento 18 giugno - Sviluppo applicativoEvento 18 giugno - Sviluppo applicativo
Evento 18 giugno - Sviluppo applicativo
 
Ocp presentazione generale - overview del progetto
Ocp presentazione generale - overview del progettoOcp presentazione generale - overview del progetto
Ocp presentazione generale - overview del progetto
 
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
 
October 2009 - JBoss Cloud
October 2009 - JBoss CloudOctober 2009 - JBoss Cloud
October 2009 - JBoss Cloud
 

Mehr von 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 Kubernetessparkfabrik
 
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-shirtsparkfabrik
 
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 pagessparkfabrik
 
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 frontesparkfabrik
 
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 Ecosystemsparkfabrik
 
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).pdfsparkfabrik
 
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 cloudsparkfabrik
 
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 Crossplanesparkfabrik
 
Come Drupal costruisce le tue pagine
Come Drupal costruisce le tue pagineCome Drupal costruisce le tue pagine
Come Drupal costruisce le tue paginesparkfabrik
 
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 AWSsparkfabrik
 
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 startedsparkfabrik
 
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 APIssparkfabrik
 
Cloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guideCloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guidesparkfabrik
 
Mobile Development: una introduzione per Web Developers
Mobile Development: una introduzione per Web DevelopersMobile Development: una introduzione per Web Developers
Mobile Development: una introduzione per Web Developerssparkfabrik
 
Retro gaming machine made with Javascript and Kubernetes
Retro gaming machine made with Javascript and Kubernetes Retro gaming machine made with Javascript and Kubernetes
Retro gaming machine made with Javascript and Kubernetes sparkfabrik
 

Mehr von sparkfabrik (20)

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
 
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...
 
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
 
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
 
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
 
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...
 
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
 
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
 
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...
 
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
 
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
 
Come Drupal costruisce le tue pagine
Come Drupal costruisce le tue pagineCome Drupal costruisce le tue pagine
Come Drupal costruisce le tue pagine
 
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)
 
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!
 
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
 
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
 
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
 
Cloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guideCloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guide
 
Mobile Development: una introduzione per Web Developers
Mobile Development: una introduzione per Web DevelopersMobile Development: una introduzione per Web Developers
Mobile Development: una introduzione per Web Developers
 
Retro gaming machine made with Javascript and Kubernetes
Retro gaming machine made with Javascript and Kubernetes Retro gaming machine made with Javascript and Kubernetes
Retro gaming machine made with Javascript and Kubernetes
 

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 ●Definizioni ●Drupal e microservizi ●Le iniziative Api-first ●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 It’s 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 definition 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 definizione di microservizi. I servizi in un’architettura 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 specifiche 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 - Configurazione tramite yaml file (module_name.servi ces.yaml) - Sono definiti nel DIC Plugins - Discovery by Annotations - A runtime - Estendibili - KISS principle - Factory e decorator design patterns Event dispatcher - Observer pattern - Subscribers definiti con un tagged service
  • 19. Si, Drupal è ancora un monolite, ma un monolite estremamente modulare
  • 21. Iniziative API-first Api-first 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-first 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-first What’s 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-first Nel futuro c’è JSON:API https://jsonapi.org/
  • 25. API-first JSON:API Client SDK - JavaScript - Typescript - iOS - Ruby - PHP - Dart - Perl - Java - Android - R - Elm - .NET - Python - Elixir
  • 26. API-first 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 all’infrastruttura ● Divergenza minima tra ambiente di sviluppo e produzione ● Onboard di nuovi sviluppatori minimizzato
  • 31. ● Configurazione (anche) in code ● Dependencies management con Composer ● Drush per la linea di comando ● S3fs come filesystem (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) ● WebProfiler (https://www.drupal.org/project/webprofi ler) ● Config 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