SlideShare uma empresa Scribd logo
1 de 40
Baixar para ler offline
What we learned by merging
two big Symfony based
applications
Ivo Lukač @ SymfonyCon 2017, Cluj
www.netgenlabs.com
• Ivo Lukač, co-founder of Netgen

Also: developer, site builder, architect, consultant, project manager,
evangelist, speaker, event organiser, business developer, …
• Netgen, web agency, Croatia, ~20 employees
• 15 years of experience building complex content-
centric web solutions, using eZ Publish since
2004, Symfony since 2013.
About me
www.netgenlabs.com
www.netgenlabs.com
Web Summer Camp
www.netgenlabs.com
HOW THIS STORY
STARTED
www.netgenlabs.com
• Clients are demanding better mixing of content and
commerce features
• Our stack:
• Content managed with eZ Publish / eZ Platform
• eCommerce features implemented with Sylius
CMS + eCommerce
www.netgenlabs.com
• eZ Publish CMS open-sourced in 1999 by eZ Systems
from Norway
• Complete refactoring started in 2011
• eZ Platform, the new generation based on Symfony,
released in 2015
• Flexible and customisable content model still the key
feature
www.netgenlabs.com
• Sylius - modern eCommerce based on Symfony2,
founded in 2011 by Paweł Jędrzejewski
• Modern coding standards, SOA, independent
components as bundles, IoC, BDD
• Version 1.0 stable released in 2017
www.netgenlabs.com
www.netgenlabs.com
INTEGRATION NEEDED!
www.netgenlabs.com
Loose integration
• A usual approach for integrating 2 or more systems
is by establishing remote connections via
standard protocols (e.g. http)
• Remote systems are treated as black boxes and
completely independent
• Lastest buzzwords: “microservices” and “serverless”
www.netgenlabs.com
Symfony - common denominator
• Both eZ and Sylius use Symfony full stack as their
baseline, they have the same:



database access, template engine, service container,
logging, events, caching, security, mailing, assets,
environment configuration, translation, …
www.netgenlabs.com
Tight integration
• If 2 systems are built on the same framework and
use a lot of the same components - there is a
possibility to tightly integrate them on the same
application instance
• Suggesting new buzzword: “coupling the decoupled”
www.netgenlabs.com
In 2015 we got a
suitable project.
Our partner Locastic
helped with Sylius
knowhow
First integration was
based on:

- eZ Publish 2014.11

- Sylius 0.14 

- Symfony 2.5
www.netgenlabs.com
www.netgenlabs.com
Repos
• github.com/netgen/ezpublish-community-sylius
Symfony application with merged Sylius and eZ
Publish
• github.com/netgen/NetgenEzSyliusBundle 

provides features that glue eZ and Sylius together
www.netgenlabs.com
In the meanwhile
• eZ Platform v1 was released, Sylius v1 was released, so
we are at the moment working on the new integration:
• ezplatform-sylius - new app repo, WiP
• ezpublish-community-sylius - deprecated
• NetgenEzSyliusBundle - master branch to be tagged as
version 2
www.netgenlabs.com
NetgenEzSyliusBundle - the glue
• Field type for linking Sylius products inside eZ Platform
content objects (translatable, sortable, removable)
• Replacing Sylius product routes with related eZ
Platform content routes
• User provider(s)
• Authentication success handler
www.netgenlabs.com
Working as expected?
• Twig template extend feature makes it easy to
integrate front side templates
• Database configuration can use the same
parameters
• Dependency injection and service container make it
trivial to use “the other system’s” features
www.netgenlabs.com
LETS TALK ABOUT
CHALLENGES
www.netgenlabs.com
1. Composing
2. Routing
3. Authentication
4. Authorization
5. Admin interface
Main challenges
www.netgenlabs.com
1. Composing
• Even if both systems are full stack Symfony it is possible to
run into problems during composing the app. Remember
we are talking about merging 2 big apps with many
dependencies
• Some dependencies could conflict (e.g. Doctrine)
• Fix choices:

- wait for the next release (create PRs to speed this up)

- some composer magic could help
www.netgenlabs.com
1. Composing
• It could happen that both systems support different Symfony
versions (Sylius 1.0 beta dropped support for Symfony 2
while eZ was still not working with Symfony 3)
• Fix choices:

- basically nothing, just waiting

- Sylius created a temporary BC branch:



"sylius/sylius":	"dev-revert-symfony3-updated	as	1.0"
www.netgenlabs.com
2. Routing
• If any of the systems doesn’t use the system router,
they should support the Chain router well (we had a
related bug in Sylius needed to be solved)
• One side should be prefixed:



sylius:

				resource:	"sylius_routing.yml"

				prefix:	%ez_sylius.shop_path_prefix%
www.netgenlabs.com
3. Authentication
• Authenticating users separately should work
• Sylius 0.* used FOSUserBundle,
• Sylius 1.* uses custom user providers (plural !!!)
• eZ uses custom user provider
www.netgenlabs.com
3. SSO Authentication
• For SSO a security event listener is needed for
authenticating the user with both providers
• eZ Publish used the user class directly (not the
interface) so we couldn’t pass the Sylius user class:
we created a PR to be able to do this eventually
www.netgenlabs.com
4. Authorisation
• For authorisation to work a user object from one system
needs to be connected (treated as same) to the related
user object in another system
• If possible avoid the need for authorisation on both sides.
• For example, in our first project we need to connect the
admin users from both system but the site users didn’t
have to be authorised on eZ, only on Sylius
www.netgenlabs.com
4. Connecting related users
• To allow manual connecting of users we
implemented a script:



ezsylius:user:connect	<sylius-user-type>	
<sylius-user-email>	<ez-user-login>
• Of course, a post update/create user event support
would be a nicer solution
www.netgenlabs.com
4. Trouble with Sylius 1.*
• For Sylius 1.* lot of refactoring was done with lot of
BC brakes. One of the things was the user
management part: admin users and normal users
got completely separated.
• Our authentication and authorisation needed to be
done from scratch - we implemented a composite
user provider to handle all providers
www.netgenlabs.com
5. User interface
• If authentication and admin users authorisation is
working there is a chance to even merge the admin
interface
• In most cases probably not a straight forward to do
due to different UI frontend architectures. We needed
to do a PR to Sylius and also use bundle inheritance
www.netgenlabs.com
Pros
• With both systems working on the same instance the
possibility to mesh up things are much bigger
• Provides a single admin interface
• Problems could be spotted earlier, while in
development
www.netgenlabs.com
Cons
• Complexity, good expertise on both systems needed
• Depending on 2 roadmaps instead of 1
• Might be performance issues, at least when doing
composer update, due to lot of dependencies
www.netgenlabs.com
What we learned?
• A lot about Symfony and Composer :)
• To appreciate good roadmaps, semantic
versioning, extensible code
• Symfony does a lot of lifting
www.netgenlabs.com
MAYBE ALL THIS WILL GET
DEPRECATED WITH FLEX :)
www.netgenlabs.com
If you need something similar
• Have expertise on Symfony and both systems you
want to merge
• Check if both roadmaps and release cycles are
aligned
• Check if PRs are merged in reasonable time
• Check what licensing you need to apply
www.netgenlabs.com
Conclusion
• Tightly integrating 2 systems is probably an overkill
in lot of situations
• Could be worth the effort if you need:
• access to all underlaying features
• a single UI
• SSO and complex authorisation
www.netgenlabs.com
DO YOU HAVE A
SIMILAR USE CASE?
Thank you!
ivo@netgen.hr
ilukac.com/twitter
ilukac.com/facebook
ilukac.com/linkedin

Mais conteúdo relacionado

Mais procurados

Git and Github - a 90 Minute interactive workshop
Git and Github - a 90 Minute interactive workshopGit and Github - a 90 Minute interactive workshop
Git and Github - a 90 Minute interactive workshopBram Luyten
 
REST In Action: The Live Coverage Platform at the New York Times
REST In Action: The Live Coverage Platform at the New York TimesREST In Action: The Live Coverage Platform at the New York Times
REST In Action: The Live Coverage Platform at the New York TimesScott Taylor
 
Hire laravel-php-developers- Hire Laravel Programmers
Hire laravel-php-developers- Hire Laravel ProgrammersHire laravel-php-developers- Hire Laravel Programmers
Hire laravel-php-developers- Hire Laravel ProgrammersSummation IT
 
Servlets made easy. 
Write once and run everywhere.
Servlets made easy. 
Write once and run everywhere.Servlets made easy. 
Write once and run everywhere.
Servlets made easy. 
Write once and run everywhere.ICON UK EVENTS Limited
 
Flexible Permissions Management with ACL Templates
Flexible Permissions Management with ACL TemplatesFlexible Permissions Management with ACL Templates
Flexible Permissions Management with ACL TemplatesJeff Potts
 
Symfony 4: A new way to develop applications #ipc19
Symfony 4: A new way to develop applications #ipc19Symfony 4: A new way to develop applications #ipc19
Symfony 4: A new way to develop applications #ipc19Antonio Peric-Mazar
 
Find your data - use GraphDB capabilities in XPages applications - and beyond
Find your data - use GraphDB capabilities in XPages applications - and beyond	Find your data - use GraphDB capabilities in XPages applications - and beyond
Find your data - use GraphDB capabilities in XPages applications - and beyond ICON UK EVENTS Limited
 
DSpace UI prototype dsember
DSpace UI prototype dsemberDSpace UI prototype dsember
DSpace UI prototype dsemberBram Luyten
 
Alfresco Process Services extension project - Alfresco DevCon 2018
Alfresco Process Services extension project - Alfresco DevCon 2018Alfresco Process Services extension project - Alfresco DevCon 2018
Alfresco Process Services extension project - Alfresco DevCon 2018Dennis Koch
 
Real World Rails Deployment
Real World Rails DeploymentReal World Rails Deployment
Real World Rails DeploymentAlan Hecht
 
Basic web application development with Apache Cocoon 2.1
Basic web application development with  Apache Cocoon 2.1Basic web application development with  Apache Cocoon 2.1
Basic web application development with Apache Cocoon 2.1Jeroen Reijn
 
Serverless Media Workflow
Serverless Media WorkflowServerless Media Workflow
Serverless Media WorkflowMooYeol Lee
 
Symfony 4: A new way to develop applications #phpsrb
 Symfony 4: A new way to develop applications #phpsrb Symfony 4: A new way to develop applications #phpsrb
Symfony 4: A new way to develop applications #phpsrbAntonio Peric-Mazar
 
Alfresco DevCon 2019 Performance Tools of the Trade
Alfresco DevCon 2019   Performance Tools of the TradeAlfresco DevCon 2019   Performance Tools of the Trade
Alfresco DevCon 2019 Performance Tools of the TradeLuis Colorado
 
Dev112 let's calendar that
Dev112   let's calendar thatDev112   let's calendar that
Dev112 let's calendar thatHoward Greenberg
 
An Introduction to the Laravel Framework (AFUP Forum PHP 2014)
An Introduction to the Laravel Framework (AFUP Forum PHP 2014)An Introduction to the Laravel Framework (AFUP Forum PHP 2014)
An Introduction to the Laravel Framework (AFUP Forum PHP 2014)daylerees
 
Tarabica 2019 - Migration from ASP.NET MVC to ASP.NET Core
Tarabica 2019 - Migration from ASP.NET MVC to ASP.NET CoreTarabica 2019 - Migration from ASP.NET MVC to ASP.NET Core
Tarabica 2019 - Migration from ASP.NET MVC to ASP.NET CoreMiroslav Popovic
 
Isomorphic JavaScript – future of the web
Isomorphic JavaScript – future of the webIsomorphic JavaScript – future of the web
Isomorphic JavaScript – future of the webSigma Software
 

Mais procurados (20)

Git and Github - a 90 Minute interactive workshop
Git and Github - a 90 Minute interactive workshopGit and Github - a 90 Minute interactive workshop
Git and Github - a 90 Minute interactive workshop
 
REST In Action: The Live Coverage Platform at the New York Times
REST In Action: The Live Coverage Platform at the New York TimesREST In Action: The Live Coverage Platform at the New York Times
REST In Action: The Live Coverage Platform at the New York Times
 
Hire laravel-php-developers- Hire Laravel Programmers
Hire laravel-php-developers- Hire Laravel ProgrammersHire laravel-php-developers- Hire Laravel Programmers
Hire laravel-php-developers- Hire Laravel Programmers
 
Servlets made easy. 
Write once and run everywhere.
Servlets made easy. 
Write once and run everywhere.Servlets made easy. 
Write once and run everywhere.
Servlets made easy. 
Write once and run everywhere.
 
Flexible Permissions Management with ACL Templates
Flexible Permissions Management with ACL TemplatesFlexible Permissions Management with ACL Templates
Flexible Permissions Management with ACL Templates
 
Symfony 4: A new way to develop applications #ipc19
Symfony 4: A new way to develop applications #ipc19Symfony 4: A new way to develop applications #ipc19
Symfony 4: A new way to develop applications #ipc19
 
Find your data - use GraphDB capabilities in XPages applications - and beyond
Find your data - use GraphDB capabilities in XPages applications - and beyond	Find your data - use GraphDB capabilities in XPages applications - and beyond
Find your data - use GraphDB capabilities in XPages applications - and beyond
 
Fluxible
FluxibleFluxible
Fluxible
 
DSpace UI prototype dsember
DSpace UI prototype dsemberDSpace UI prototype dsember
DSpace UI prototype dsember
 
Alfresco Process Services extension project - Alfresco DevCon 2018
Alfresco Process Services extension project - Alfresco DevCon 2018Alfresco Process Services extension project - Alfresco DevCon 2018
Alfresco Process Services extension project - Alfresco DevCon 2018
 
Real World Rails Deployment
Real World Rails DeploymentReal World Rails Deployment
Real World Rails Deployment
 
Basic web application development with Apache Cocoon 2.1
Basic web application development with  Apache Cocoon 2.1Basic web application development with  Apache Cocoon 2.1
Basic web application development with Apache Cocoon 2.1
 
Serverless Media Workflow
Serverless Media WorkflowServerless Media Workflow
Serverless Media Workflow
 
Symfony 4: A new way to develop applications #phpsrb
 Symfony 4: A new way to develop applications #phpsrb Symfony 4: A new way to develop applications #phpsrb
Symfony 4: A new way to develop applications #phpsrb
 
Alfresco DevCon 2019 Performance Tools of the Trade
Alfresco DevCon 2019   Performance Tools of the TradeAlfresco DevCon 2019   Performance Tools of the Trade
Alfresco DevCon 2019 Performance Tools of the Trade
 
Dev112 let's calendar that
Dev112   let's calendar thatDev112   let's calendar that
Dev112 let's calendar that
 
An Introduction to the Laravel Framework (AFUP Forum PHP 2014)
An Introduction to the Laravel Framework (AFUP Forum PHP 2014)An Introduction to the Laravel Framework (AFUP Forum PHP 2014)
An Introduction to the Laravel Framework (AFUP Forum PHP 2014)
 
Tarabica 2019 - Migration from ASP.NET MVC to ASP.NET Core
Tarabica 2019 - Migration from ASP.NET MVC to ASP.NET CoreTarabica 2019 - Migration from ASP.NET MVC to ASP.NET Core
Tarabica 2019 - Migration from ASP.NET MVC to ASP.NET Core
 
Isomorphic JavaScript – future of the web
Isomorphic JavaScript – future of the webIsomorphic JavaScript – future of the web
Isomorphic JavaScript – future of the web
 
Let's serve your data
Let's serve your dataLet's serve your data
Let's serve your data
 

Semelhante a Merging two big Symfony based applications - SymfonyCon 2017

Free Mongo on OpenShift
Free Mongo on OpenShiftFree Mongo on OpenShift
Free Mongo on OpenShiftSteven Pousty
 
The new way of managing layouts and blocks
The new way of managing layouts and blocksThe new way of managing layouts and blocks
The new way of managing layouts and blocksIvo Lukac
 
OpenShift with Eclipse Tooling - EclipseCon 2012
OpenShift with Eclipse Tooling - EclipseCon 2012OpenShift with Eclipse Tooling - EclipseCon 2012
OpenShift with Eclipse Tooling - EclipseCon 2012Steven Pousty
 
Bluemix and DevOps workshop lab
Bluemix and DevOps workshop labBluemix and DevOps workshop lab
Bluemix and DevOps workshop labbenm4nn
 
A Tale of Two Pizzas: Accelerating Software Delivery with Developer Tools - D...
A Tale of Two Pizzas: Accelerating Software Delivery with Developer Tools - D...A Tale of Two Pizzas: Accelerating Software Delivery with Developer Tools - D...
A Tale of Two Pizzas: Accelerating Software Delivery with Developer Tools - D...Amazon Web Services
 
A Tale of Two Pizzas: Developer Tools at AWS - DevDay Los Angeles 2017
A Tale of Two Pizzas: Developer Tools at AWS - DevDay Los Angeles 2017A Tale of Two Pizzas: Developer Tools at AWS - DevDay Los Angeles 2017
A Tale of Two Pizzas: Developer Tools at AWS - DevDay Los Angeles 2017Amazon Web Services
 
eSoftHead - groupware solution
eSoftHead - groupware solutioneSoftHead - groupware solution
eSoftHead - groupware solutionNguyen Hai
 
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)TIMETOACT GROUP
 
Joomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesJoomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesAndy_Gaskell
 
AliExpress’ Way to Microservices - microXchg 2017
AliExpress’ Way to Microservices  - microXchg 2017AliExpress’ Way to Microservices  - microXchg 2017
AliExpress’ Way to Microservices - microXchg 2017juvenxu
 
DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2Docker, Inc.
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchHoward Greenberg
 
Microservices: Yes or not?
Microservices: Yes or not?Microservices: Yes or not?
Microservices: Yes or not?Eduard Tomàs
 
Modern websites in 2020 and Joomla
Modern websites in 2020 and JoomlaModern websites in 2020 and Joomla
Modern websites in 2020 and JoomlaGeorge Wilson
 
DevOps on AWS: DevOps Day San Francisco
DevOps on AWS: DevOps Day San FranciscoDevOps on AWS: DevOps Day San Francisco
DevOps on AWS: DevOps Day San FranciscoAmazon Web Services
 
Webcast Presentation: Be lean. Be agile. Work together with DevOps Services (...
Webcast Presentation: Be lean. Be agile. Work together with DevOps Services (...Webcast Presentation: Be lean. Be agile. Work together with DevOps Services (...
Webcast Presentation: Be lean. Be agile. Work together with DevOps Services (...GRUC
 

Semelhante a Merging two big Symfony based applications - SymfonyCon 2017 (20)

Free Mongo on OpenShift
Free Mongo on OpenShiftFree Mongo on OpenShift
Free Mongo on OpenShift
 
The new way of managing layouts and blocks
The new way of managing layouts and blocksThe new way of managing layouts and blocks
The new way of managing layouts and blocks
 
OpenShift with Eclipse Tooling - EclipseCon 2012
OpenShift with Eclipse Tooling - EclipseCon 2012OpenShift with Eclipse Tooling - EclipseCon 2012
OpenShift with Eclipse Tooling - EclipseCon 2012
 
Building APIs with Mule and Spring Boot
Building APIs with Mule and Spring BootBuilding APIs with Mule and Spring Boot
Building APIs with Mule and Spring Boot
 
Bluemix and DevOps workshop lab
Bluemix and DevOps workshop labBluemix and DevOps workshop lab
Bluemix and DevOps workshop lab
 
A Tale of Two Pizzas: Accelerating Software Delivery with Developer Tools - D...
A Tale of Two Pizzas: Accelerating Software Delivery with Developer Tools - D...A Tale of Two Pizzas: Accelerating Software Delivery with Developer Tools - D...
A Tale of Two Pizzas: Accelerating Software Delivery with Developer Tools - D...
 
DevOps demystified
DevOps demystifiedDevOps demystified
DevOps demystified
 
A Tale of Two Pizzas: Developer Tools at AWS - DevDay Los Angeles 2017
A Tale of Two Pizzas: Developer Tools at AWS - DevDay Los Angeles 2017A Tale of Two Pizzas: Developer Tools at AWS - DevDay Los Angeles 2017
A Tale of Two Pizzas: Developer Tools at AWS - DevDay Los Angeles 2017
 
eSoftHead - groupware solution
eSoftHead - groupware solutioneSoftHead - groupware solution
eSoftHead - groupware solution
 
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
 
Joomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesJoomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiences
 
AliExpress’ Way to Microservices - microXchg 2017
AliExpress’ Way to Microservices  - microXchg 2017AliExpress’ Way to Microservices  - microXchg 2017
AliExpress’ Way to Microservices - microXchg 2017
 
DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 
Short-Training asp.net vNext
Short-Training asp.net vNextShort-Training asp.net vNext
Short-Training asp.net vNext
 
Microservices: Yes or not?
Microservices: Yes or not?Microservices: Yes or not?
Microservices: Yes or not?
 
Modern websites in 2020 and Joomla
Modern websites in 2020 and JoomlaModern websites in 2020 and Joomla
Modern websites in 2020 and Joomla
 
DevOps on AWS: DevOps Day San Francisco
DevOps on AWS: DevOps Day San FranciscoDevOps on AWS: DevOps Day San Francisco
DevOps on AWS: DevOps Day San Francisco
 
Webcast Presentation: Be lean. Be agile. Work together with DevOps Services (...
Webcast Presentation: Be lean. Be agile. Work together with DevOps Services (...Webcast Presentation: Be lean. Be agile. Work together with DevOps Services (...
Webcast Presentation: Be lean. Be agile. Work together with DevOps Services (...
 
OpenWhisk JavaOne
OpenWhisk JavaOneOpenWhisk JavaOne
OpenWhisk JavaOne
 

Último

Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 

Último (20)

Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

Merging two big Symfony based applications - SymfonyCon 2017

  • 1. What we learned by merging two big Symfony based applications Ivo Lukač @ SymfonyCon 2017, Cluj
  • 2. www.netgenlabs.com • Ivo Lukač, co-founder of Netgen
 Also: developer, site builder, architect, consultant, project manager, evangelist, speaker, event organiser, business developer, … • Netgen, web agency, Croatia, ~20 employees • 15 years of experience building complex content- centric web solutions, using eZ Publish since 2004, Symfony since 2013. About me
  • 6. www.netgenlabs.com • Clients are demanding better mixing of content and commerce features • Our stack: • Content managed with eZ Publish / eZ Platform • eCommerce features implemented with Sylius CMS + eCommerce
  • 7. www.netgenlabs.com • eZ Publish CMS open-sourced in 1999 by eZ Systems from Norway • Complete refactoring started in 2011 • eZ Platform, the new generation based on Symfony, released in 2015 • Flexible and customisable content model still the key feature
  • 8. www.netgenlabs.com • Sylius - modern eCommerce based on Symfony2, founded in 2011 by Paweł Jędrzejewski • Modern coding standards, SOA, independent components as bundles, IoC, BDD • Version 1.0 stable released in 2017
  • 11. www.netgenlabs.com Loose integration • A usual approach for integrating 2 or more systems is by establishing remote connections via standard protocols (e.g. http) • Remote systems are treated as black boxes and completely independent • Lastest buzzwords: “microservices” and “serverless”
  • 12. www.netgenlabs.com Symfony - common denominator • Both eZ and Sylius use Symfony full stack as their baseline, they have the same:
 
 database access, template engine, service container, logging, events, caching, security, mailing, assets, environment configuration, translation, …
  • 13. www.netgenlabs.com Tight integration • If 2 systems are built on the same framework and use a lot of the same components - there is a possibility to tightly integrate them on the same application instance • Suggesting new buzzword: “coupling the decoupled”
  • 14. www.netgenlabs.com In 2015 we got a suitable project. Our partner Locastic helped with Sylius knowhow First integration was based on:
 - eZ Publish 2014.11
 - Sylius 0.14 
 - Symfony 2.5
  • 16. www.netgenlabs.com Repos • github.com/netgen/ezpublish-community-sylius Symfony application with merged Sylius and eZ Publish • github.com/netgen/NetgenEzSyliusBundle 
 provides features that glue eZ and Sylius together
  • 17. www.netgenlabs.com In the meanwhile • eZ Platform v1 was released, Sylius v1 was released, so we are at the moment working on the new integration: • ezplatform-sylius - new app repo, WiP • ezpublish-community-sylius - deprecated • NetgenEzSyliusBundle - master branch to be tagged as version 2
  • 18. www.netgenlabs.com NetgenEzSyliusBundle - the glue • Field type for linking Sylius products inside eZ Platform content objects (translatable, sortable, removable) • Replacing Sylius product routes with related eZ Platform content routes • User provider(s) • Authentication success handler
  • 19. www.netgenlabs.com Working as expected? • Twig template extend feature makes it easy to integrate front side templates • Database configuration can use the same parameters • Dependency injection and service container make it trivial to use “the other system’s” features
  • 21. www.netgenlabs.com 1. Composing 2. Routing 3. Authentication 4. Authorization 5. Admin interface Main challenges
  • 22. www.netgenlabs.com 1. Composing • Even if both systems are full stack Symfony it is possible to run into problems during composing the app. Remember we are talking about merging 2 big apps with many dependencies • Some dependencies could conflict (e.g. Doctrine) • Fix choices:
 - wait for the next release (create PRs to speed this up)
 - some composer magic could help
  • 23. www.netgenlabs.com 1. Composing • It could happen that both systems support different Symfony versions (Sylius 1.0 beta dropped support for Symfony 2 while eZ was still not working with Symfony 3) • Fix choices:
 - basically nothing, just waiting
 - Sylius created a temporary BC branch:
 
 "sylius/sylius": "dev-revert-symfony3-updated as 1.0"
  • 24. www.netgenlabs.com 2. Routing • If any of the systems doesn’t use the system router, they should support the Chain router well (we had a related bug in Sylius needed to be solved) • One side should be prefixed:
 
 sylius:
 resource: "sylius_routing.yml"
 prefix: %ez_sylius.shop_path_prefix%
  • 25. www.netgenlabs.com 3. Authentication • Authenticating users separately should work • Sylius 0.* used FOSUserBundle, • Sylius 1.* uses custom user providers (plural !!!) • eZ uses custom user provider
  • 26. www.netgenlabs.com 3. SSO Authentication • For SSO a security event listener is needed for authenticating the user with both providers • eZ Publish used the user class directly (not the interface) so we couldn’t pass the Sylius user class: we created a PR to be able to do this eventually
  • 27. www.netgenlabs.com 4. Authorisation • For authorisation to work a user object from one system needs to be connected (treated as same) to the related user object in another system • If possible avoid the need for authorisation on both sides. • For example, in our first project we need to connect the admin users from both system but the site users didn’t have to be authorised on eZ, only on Sylius
  • 28. www.netgenlabs.com 4. Connecting related users • To allow manual connecting of users we implemented a script:
 
 ezsylius:user:connect <sylius-user-type> <sylius-user-email> <ez-user-login> • Of course, a post update/create user event support would be a nicer solution
  • 29. www.netgenlabs.com 4. Trouble with Sylius 1.* • For Sylius 1.* lot of refactoring was done with lot of BC brakes. One of the things was the user management part: admin users and normal users got completely separated. • Our authentication and authorisation needed to be done from scratch - we implemented a composite user provider to handle all providers
  • 30. www.netgenlabs.com 5. User interface • If authentication and admin users authorisation is working there is a chance to even merge the admin interface • In most cases probably not a straight forward to do due to different UI frontend architectures. We needed to do a PR to Sylius and also use bundle inheritance
  • 31.
  • 32.
  • 33. www.netgenlabs.com Pros • With both systems working on the same instance the possibility to mesh up things are much bigger • Provides a single admin interface • Problems could be spotted earlier, while in development
  • 34. www.netgenlabs.com Cons • Complexity, good expertise on both systems needed • Depending on 2 roadmaps instead of 1 • Might be performance issues, at least when doing composer update, due to lot of dependencies
  • 35. www.netgenlabs.com What we learned? • A lot about Symfony and Composer :) • To appreciate good roadmaps, semantic versioning, extensible code • Symfony does a lot of lifting
  • 36. www.netgenlabs.com MAYBE ALL THIS WILL GET DEPRECATED WITH FLEX :)
  • 37. www.netgenlabs.com If you need something similar • Have expertise on Symfony and both systems you want to merge • Check if both roadmaps and release cycles are aligned • Check if PRs are merged in reasonable time • Check what licensing you need to apply
  • 38. www.netgenlabs.com Conclusion • Tightly integrating 2 systems is probably an overkill in lot of situations • Could be worth the effort if you need: • access to all underlaying features • a single UI • SSO and complex authorisation
  • 39. www.netgenlabs.com DO YOU HAVE A SIMILAR USE CASE?