SlideShare une entreprise Scribd logo
1  sur  35
Télécharger pour lire hors ligne
ready2order.com© 2018 ready2order GmbH.
From Legacy To Laravel
A Refactoring Journey
Christopher Fuchs, Co-Founder & CTO
- Web- and cloudbased POS solution for catering, retail and service
- Start of development in 2012
- Founded ready2order GmbH in 2015 at 25 customers
- Currently 60+ employees
- 7000+ customers in Austria, Germany, Switzerland
- Vision: All-In-One Solution for SMBs
Who are we?
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 1 | X
- POS
- Stock & ingredients management
- Accounting (BMD, DATEV, SAP, …)
- Printer integrations
- Payment terminal integrations
- Time tracking
- Coupons, discounts & happy hours
- Price levels
- RKSV signature
- Bar- & QR-Code integrations
- Highly configurable
- ….
- Hybrid apps for
- iOS
- Android
- Windows
- Mac
- Offline mode
- Public API
- Live statistics
- Supplier management
- User & role management
- Detailed reports
- Offers & Delivery bills
- ...
Features
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 2 | X
1 | Meet Mr. Legacy
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 3 | X
The good parts first…
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 4 | X
…and the bad parts
„Just do it like it‘s 1999“
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 5 | X
- 200,000 lines of PHP code
- Mixture of PHP, JavaScript, CSS, HTML in one file
- Business, view and backend logic in one file
- Business logic redundancies
- No separation of concerns
- No single entry point
- Bad folder structure
- Messy interdependencies everywhere
- Big, fat models
- No CI, templating, jobs, queues
- class.ready2order.php is used in almost every file
- Impossible to follow for new developers
What was the code like?
„Just do it like it‘s 1999“
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 6 | X
Some things needs to change…
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 7 | X
2 | The journey
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 8 | X
- „WTF should we do“ (June – August 2017)
- „Let‘s do a rewrite“ (September 2017)
- „No this won‘t work...let‘s refactor!“ (2 days later)
- „DIY-framework...why not Laravel? Let‘s do it!“ (Begin of October 2017)
What did we do?
ready2order GmbH
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 9 | X
Refactor Rewritevs
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 10 | X
Legacy	Code
üNamespaced legacy code
üBuild and manage assets with grunt
üRestructured project structure
üImplemented fallback proxy controller
üRemoved globals & global states
üRewrote bash scripts to symfony console commands
üRemoved existing eloquent 5.2 from legacy code
üMigrated routes
üImplemented queue system
üGO LIVE - Begin of November 2017
2 people spent approx. 400 hours each within 4 weeks
What did we do to go live?
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 11 | X
- Refactor step-by-step, file-by-file, route-by-route
- Single point of entry
- No feature freeze
- Clean project structure
- Fast way into production
- Well-known framework – less scary for new developers
What benefits did we get?
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 12 | X
3 | Status quo
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 13 | X
- 70% of business logic code already refactored
- Use full power of Laravel
- Abstraction layers
- Authentication & Authorization
- Database migrations
- Broadcasting
- Caching & Mutexes
- Logging
- Custom app-specific Error Handlers (PublicExceptionInterface)
- Event system
- Implemented custom SessionManager on top of Laravel’s auth
- Controller – SessionService - Service – Repository -pattern
What happened since November 2017?
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 14 | X
- Router
- Resolves route to controller’s method
- Authentication
- Controller
- Map request data to business-logic-domain object (Model or DataClass)
- Perform route-specific authorization checks with policy
- Call business logic method via SessionXxyyzzService or return Blade-view
- SessionUserService
- Perform business-logic specific authorization checks
- Collect session data & call business logic method in XxyyzzService
- UserService
- Run business logic operation which gets all necessary information from method arguments (No access to session data
allowed!)
- UserRepo
- Extends autogenerated AbstractXxyyzzRepo
- CRUD-methods to access database-layer via models
- User (Model)
- AbstractionLayer for database tables
Code structure & layers Example: User
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 15 | X
- Administration
- POS
- Public API
Creating a user
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 16 | X
Back then…
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 17 | X
Router
routes/apps/api/users.php
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 18 | X
Controller
app/Http/Controllers/Api/V1/User/ApiUserController.php
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 19 | X
CreateUserMutationRequest
app/Http/Controllers/Api/V1/User/Request/CreateUserMutationRequest.php
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 20 | X
SessionUserService
src/R2/Modules/User/SessionUserService.php
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 21 | X
UserService
src/R2/Modules/User/UserService.php
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 22 | X
(Abstract)UserRepo
src/R2/Modules/User/UserRepo.php extends autogenerated
src/R2/Db/Repo/Base/AbstractUserRepo.php
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 23 | X
User(Model)
src/R2/Legacy/Database/Model/User.php extends autogenerated
src/R2/Legacy/Database/Model/Base/AbstractUser.php
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 24 | X
What about documentation?
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 25 | X
- Autogenerate API documentation to OpenAPI-spec with
zircote/swagger-php
Codegeneration FTW
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 26 | X
- GraphQL + React
- Code Generation
- Base models
- Base repositories
- Test-factories
- GraphQL type and query auto-generation
from spec-files
- Enhanced Gitlab CI
- phpcsfixer for coding style
- Static Code Analysis with phpstan
- Custom phpstan rules which detect
common code-style violations to speed-up
code reviews
- (Semi)Continous deployment
- Swagger for OpenAPI documentation
generation
- Many utility commands to make dev’s
lifes easier
- Database migrations with percona
- Distributed maintenance mode
- Automated release integration with jira
- ICU Intl-message-format
- docker-compose setup
- Upcoming
- kubernetes/GKE as long-term
replacement for AWS
What else is going on?
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 27 | X
We killed the monster! – 28.8.2018
class.ready2order.php
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 28 | X
- Grow development team
- Scale infrastructure
- Implement sharding and necessary tooling
- Improve UX
- API First with GraphQL
- Scale by extracting services
- Scalable logging, monitoring and reporting infrastructure
- Security-first with regular internal and external penetrations tests
- Train our chaos monkey
Roadmap
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 29 | X
- „think – prototype – discuss – repeat“
- Rewrites are mostly doomed to fail as a lot of knowledge get lost
- Refactoring should result in rewrite
- Clean up project first, then separate business logic
What did we learn?
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 30 | X
- Laravel IDE Helper (barryvdh/laravel-ide-helper)
- Phpstan (phpstan/phpstan)
- Code Sniffer (squizlabs/php_codesniffer)
- phpdbg (krakjoe/phpdbg)
- paratest (brianium/paratest)
- swagger/php
We are hiring
ready2order.com/jobs
Things to know
© 2018e ready2order GmbH. Alle Rechte vorbehalten. 31 | X
ready2order.com
© 2018 ready2order GmbH. Alle Rechte vorbehalten.
Refactor
+
- One code base, team, deployment
- Fast go-to-live
- Reuse existing code
- Step-by-step migration
-
- Hard to remove bad patterns
- Hard to move to framework
- Requires code insights
Rewrite
+
- Clean implementation
- Easy onboarding for new devs
- No architectural burdens
-
- Very large code base
- Long project doomed to fail
- Maintain two separate system
- Feature freeze
What to do?
„think – prototyp – discuss“
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 33 | X
What to consider?
„think – prototyp – discuss“
© 2018 ready2order GmbH. Alle Rechte vorbehalten. 34 | X
BATTLE	TIME
Refactor
vs
Rewrite
PHP Go /	Java	/	?
REST GraphQL
Fullstack Application API	only

Contenu connexe

Similaire à Péhápkaři v Pecce: A refactoring Journey – From Legacy to Laravel – Christopher Fuchs – 14. 11.

SCADA a gyakorlatban - Accenture Industry X.0 Meetup
SCADA a gyakorlatban - Accenture Industry X.0 MeetupSCADA a gyakorlatban - Accenture Industry X.0 Meetup
SCADA a gyakorlatban - Accenture Industry X.0 MeetupAccenture Hungary
 
QCon 2018 | Gimel | PayPal's Analytic Platform
QCon 2018 | Gimel | PayPal's Analytic PlatformQCon 2018 | Gimel | PayPal's Analytic Platform
QCon 2018 | Gimel | PayPal's Analytic PlatformDeepak Chandramouli
 
Cross Section and Deep Dive into GE Predix
Cross Section and Deep Dive into GE PredixCross Section and Deep Dive into GE Predix
Cross Section and Deep Dive into GE PredixAltoros
 
Motadata - Unified Product Suite for IT Operations and Big Data Analytics
Motadata - Unified Product Suite for IT Operations and Big Data AnalyticsMotadata - Unified Product Suite for IT Operations and Big Data Analytics
Motadata - Unified Product Suite for IT Operations and Big Data Analyticsnovsela
 
MongoDB World 2018: From Disruption to Transformation: Document Databases, Do...
MongoDB World 2018: From Disruption to Transformation: Document Databases, Do...MongoDB World 2018: From Disruption to Transformation: Document Databases, Do...
MongoDB World 2018: From Disruption to Transformation: Document Databases, Do...MongoDB
 
Serverless survival kit
Serverless survival kitServerless survival kit
Serverless survival kitSteve Houël
 
Software AG- Aadabas and Natural in the Digital Enterprise - ProcessForum Nor...
Software AG- Aadabas and Natural in the Digital Enterprise - ProcessForum Nor...Software AG- Aadabas and Natural in the Digital Enterprise - ProcessForum Nor...
Software AG- Aadabas and Natural in the Digital Enterprise - ProcessForum Nor...Software AG
 
FSM integration with SAP
FSM integration with SAPFSM integration with SAP
FSM integration with SAPCapgemini
 
OpsRamp Fall Release November 2020
OpsRamp Fall Release November 2020OpsRamp Fall Release November 2020
OpsRamp Fall Release November 2020OpsRamp
 
Kamanja: Driving Business Value through Real-Time Decisioning Solutions
Kamanja: Driving Business Value through Real-Time Decisioning SolutionsKamanja: Driving Business Value through Real-Time Decisioning Solutions
Kamanja: Driving Business Value through Real-Time Decisioning SolutionsGreg Makowski
 
SAP Hybris Cloud for Customer Integration Scenarios and Best-Practices Overview
SAP Hybris Cloud for Customer Integration Scenarios and Best-Practices OverviewSAP Hybris Cloud for Customer Integration Scenarios and Best-Practices Overview
SAP Hybris Cloud for Customer Integration Scenarios and Best-Practices OverviewSAP Customer Experience
 
Continuous Code Quality with the Sonar Ecosystem @GeeCON 2017 in Prague
Continuous Code Quality with the Sonar Ecosystem @GeeCON 2017 in PragueContinuous Code Quality with the Sonar Ecosystem @GeeCON 2017 in Prague
Continuous Code Quality with the Sonar Ecosystem @GeeCON 2017 in PragueRoman Pickl
 
Building Microservices with the Twelve Factor App Pattern on AWS
Building Microservices with the Twelve Factor App Pattern on AWSBuilding Microservices with the Twelve Factor App Pattern on AWS
Building Microservices with the Twelve Factor App Pattern on AWSAmazon Web Services
 
What Prometheus means for monitoring vendors
What Prometheus means for monitoring vendorsWhat Prometheus means for monitoring vendors
What Prometheus means for monitoring vendorsSysdig
 
CWIN17 New-York / demanding markets digital business dynamic outcomes
CWIN17 New-York / demanding markets digital business dynamic outcomesCWIN17 New-York / demanding markets digital business dynamic outcomes
CWIN17 New-York / demanding markets digital business dynamic outcomesCapgemini
 

Similaire à Péhápkaři v Pecce: A refactoring Journey – From Legacy to Laravel – Christopher Fuchs – 14. 11. (20)

SCADA a gyakorlatban - Accenture Industry X.0 Meetup
SCADA a gyakorlatban - Accenture Industry X.0 MeetupSCADA a gyakorlatban - Accenture Industry X.0 Meetup
SCADA a gyakorlatban - Accenture Industry X.0 Meetup
 
QCon 2018 | Gimel | PayPal's Analytic Platform
QCon 2018 | Gimel | PayPal's Analytic PlatformQCon 2018 | Gimel | PayPal's Analytic Platform
QCon 2018 | Gimel | PayPal's Analytic Platform
 
Cross Section and Deep Dive into GE Predix
Cross Section and Deep Dive into GE PredixCross Section and Deep Dive into GE Predix
Cross Section and Deep Dive into GE Predix
 
Motadata - Unified Product Suite for IT Operations and Big Data Analytics
Motadata - Unified Product Suite for IT Operations and Big Data AnalyticsMotadata - Unified Product Suite for IT Operations and Big Data Analytics
Motadata - Unified Product Suite for IT Operations and Big Data Analytics
 
MongoDB World 2018: From Disruption to Transformation: Document Databases, Do...
MongoDB World 2018: From Disruption to Transformation: Document Databases, Do...MongoDB World 2018: From Disruption to Transformation: Document Databases, Do...
MongoDB World 2018: From Disruption to Transformation: Document Databases, Do...
 
Serverless survival kit
Serverless survival kitServerless survival kit
Serverless survival kit
 
Software AG- Aadabas and Natural in the Digital Enterprise - ProcessForum Nor...
Software AG- Aadabas and Natural in the Digital Enterprise - ProcessForum Nor...Software AG- Aadabas and Natural in the Digital Enterprise - ProcessForum Nor...
Software AG- Aadabas and Natural in the Digital Enterprise - ProcessForum Nor...
 
Evolve18 | Carmen Sutter & Sarah Xu | Accelerate your Digital Experience with...
Evolve18 | Carmen Sutter & Sarah Xu | Accelerate your Digital Experience with...Evolve18 | Carmen Sutter & Sarah Xu | Accelerate your Digital Experience with...
Evolve18 | Carmen Sutter & Sarah Xu | Accelerate your Digital Experience with...
 
FSM integration with SAP
FSM integration with SAPFSM integration with SAP
FSM integration with SAP
 
OpsRamp Fall Release November 2020
OpsRamp Fall Release November 2020OpsRamp Fall Release November 2020
OpsRamp Fall Release November 2020
 
Cloud Native with Kyma
Cloud Native with KymaCloud Native with Kyma
Cloud Native with Kyma
 
Kamanja: Driving Business Value through Real-Time Decisioning Solutions
Kamanja: Driving Business Value through Real-Time Decisioning SolutionsKamanja: Driving Business Value through Real-Time Decisioning Solutions
Kamanja: Driving Business Value through Real-Time Decisioning Solutions
 
System Platform
System PlatformSystem Platform
System Platform
 
Sst hackathon express
Sst hackathon expressSst hackathon express
Sst hackathon express
 
SAP Hybris Cloud for Customer Integration Scenarios and Best-Practices Overview
SAP Hybris Cloud for Customer Integration Scenarios and Best-Practices OverviewSAP Hybris Cloud for Customer Integration Scenarios and Best-Practices Overview
SAP Hybris Cloud for Customer Integration Scenarios and Best-Practices Overview
 
Continuous Code Quality with the Sonar Ecosystem @GeeCON 2017 in Prague
Continuous Code Quality with the Sonar Ecosystem @GeeCON 2017 in PragueContinuous Code Quality with the Sonar Ecosystem @GeeCON 2017 in Prague
Continuous Code Quality with the Sonar Ecosystem @GeeCON 2017 in Prague
 
Building Microservices with the Twelve Factor App Pattern on AWS
Building Microservices with the Twelve Factor App Pattern on AWSBuilding Microservices with the Twelve Factor App Pattern on AWS
Building Microservices with the Twelve Factor App Pattern on AWS
 
GE Predix - The IIoT Platform
GE Predix - The IIoT PlatformGE Predix - The IIoT Platform
GE Predix - The IIoT Platform
 
What Prometheus means for monitoring vendors
What Prometheus means for monitoring vendorsWhat Prometheus means for monitoring vendors
What Prometheus means for monitoring vendors
 
CWIN17 New-York / demanding markets digital business dynamic outcomes
CWIN17 New-York / demanding markets digital business dynamic outcomesCWIN17 New-York / demanding markets digital business dynamic outcomes
CWIN17 New-York / demanding markets digital business dynamic outcomes
 

Plus de PeckaDesign.cz

Péhápkaři v Pecce: Naše cesta k read-modelu – Vojtěch Buba –18. 5. 2022
Péhápkaři v Pecce: Naše cesta k read-modelu – Vojtěch Buba –18. 5. 2022Péhápkaři v Pecce: Naše cesta k read-modelu – Vojtěch Buba –18. 5. 2022
Péhápkaři v Pecce: Naše cesta k read-modelu – Vojtěch Buba –18. 5. 2022PeckaDesign.cz
 
Péhápkaři v Pecce: Jak zrefaktorovat letitou aplikaci a zároveň začít na zele...
Péhápkaři v Pecce: Jak zrefaktorovat letitou aplikaci a zároveň začít na zele...Péhápkaři v Pecce: Jak zrefaktorovat letitou aplikaci a zároveň začít na zele...
Péhápkaři v Pecce: Jak zrefaktorovat letitou aplikaci a zároveň začít na zele...PeckaDesign.cz
 
WebTop100 Case study MEGAPIXEL – Redesign spuštěný proti pravidlům
WebTop100 Case study MEGAPIXEL – Redesign spuštěný proti pravidlůmWebTop100 Case study MEGAPIXEL – Redesign spuštěný proti pravidlům
WebTop100 Case study MEGAPIXEL – Redesign spuštěný proti pravidlůmPeckaDesign.cz
 
Péhápkaři v Pecce: Sbohem PeckaCI, vítej Github Actions – Jakub Englický –27....
Péhápkaři v Pecce: Sbohem PeckaCI, vítej Github Actions – Jakub Englický –27....Péhápkaři v Pecce: Sbohem PeckaCI, vítej Github Actions – Jakub Englický –27....
Péhápkaři v Pecce: Sbohem PeckaCI, vítej Github Actions – Jakub Englický –27....PeckaDesign.cz
 
Péhápkaři v Pecce: Podpora PHP8 v Kdyby/Redis a Kdyby/RabbitMQ – Václav Čevel...
Péhápkaři v Pecce: Podpora PHP8 v Kdyby/Redis a Kdyby/RabbitMQ – Václav Čevel...Péhápkaři v Pecce: Podpora PHP8 v Kdyby/Redis a Kdyby/RabbitMQ – Václav Čevel...
Péhápkaři v Pecce: Podpora PHP8 v Kdyby/Redis a Kdyby/RabbitMQ – Václav Čevel...PeckaDesign.cz
 
Péhápkaři v Pecce: Půl roku na cestách jako digitální nomád – Jan Kadeřábek –...
Péhápkaři v Pecce: Půl roku na cestách jako digitální nomád – Jan Kadeřábek –...Péhápkaři v Pecce: Půl roku na cestách jako digitální nomád – Jan Kadeřábek –...
Péhápkaři v Pecce: Půl roku na cestách jako digitální nomád – Jan Kadeřábek –...PeckaDesign.cz
 
Péhápkaři v Pecce: Vývoj vlastního 'ORM' – Václav Čevela – 20. 11. 2019
Péhápkaři v Pecce: Vývoj vlastního 'ORM' – Václav Čevela – 20. 11. 2019Péhápkaři v Pecce: Vývoj vlastního 'ORM' – Václav Čevela – 20. 11. 2019
Péhápkaři v Pecce: Vývoj vlastního 'ORM' – Václav Čevela – 20. 11. 2019PeckaDesign.cz
 
Tvorba nových vstupních stránek z pohledu SEO
Tvorba nových vstupních stránek z pohledu SEO Tvorba nových vstupních stránek z pohledu SEO
Tvorba nových vstupních stránek z pohledu SEO PeckaDesign.cz
 
Péhápkaři v Pecce: pd/forms – Petr Klobás – 16. 10. 2019
Péhápkaři v Pecce: pd/forms – Petr Klobás – 16. 10. 2019Péhápkaři v Pecce: pd/forms – Petr Klobás – 16. 10. 2019
Péhápkaři v Pecce: pd/forms – Petr Klobás – 16. 10. 2019PeckaDesign.cz
 
Péhápkaři v Pecce: Za hranicemi DateTime – Jiří Pudil – 16. 10. 2019
Péhápkaři v Pecce: Za hranicemi DateTime – Jiří Pudil – 16. 10. 2019Péhápkaři v Pecce: Za hranicemi DateTime – Jiří Pudil – 16. 10. 2019
Péhápkaři v Pecce: Za hranicemi DateTime – Jiří Pudil – 16. 10. 2019PeckaDesign.cz
 
Péhápkaři v Pecce: Úvod do monitoringu – Tomáš Kozák – 16. 10. 2019
Péhápkaři v Pecce: Úvod do monitoringu – Tomáš Kozák – 16. 10. 2019Péhápkaři v Pecce: Úvod do monitoringu – Tomáš Kozák – 16. 10. 2019
Péhápkaři v Pecce: Úvod do monitoringu – Tomáš Kozák – 16. 10. 2019PeckaDesign.cz
 
Asynchronní programování
Asynchronní programováníAsynchronní programování
Asynchronní programováníPeckaDesign.cz
 
Pokročilá validace síly hesla
Pokročilá validace síly heslaPokročilá validace síly hesla
Pokročilá validace síly heslaPeckaDesign.cz
 
Péhápkaři v Pecce: Každodenní problémy s implementací Facebook Api – Marek Hu...
Péhápkaři v Pecce: Každodenní problémy s implementací Facebook Api – Marek Hu...Péhápkaři v Pecce: Každodenní problémy s implementací Facebook Api – Marek Hu...
Péhápkaři v Pecce: Každodenní problémy s implementací Facebook Api – Marek Hu...PeckaDesign.cz
 
Péhápkaři v Pecce: Čtyři hlavní příčiny dysfunkčních návyků v týmu – Michal A...
Péhápkaři v Pecce: Čtyři hlavní příčiny dysfunkčních návyků v týmu – Michal A...Péhápkaři v Pecce: Čtyři hlavní příčiny dysfunkčních návyků v týmu – Michal A...
Péhápkaři v Pecce: Čtyři hlavní příčiny dysfunkčních návyků v týmu – Michal A...PeckaDesign.cz
 
Péhápkaři v Pecce: Jak si lokálně spustit Travis CI Build – Jakub Englický – ...
Péhápkaři v Pecce: Jak si lokálně spustit Travis CI Build – Jakub Englický – ...Péhápkaři v Pecce: Jak si lokálně spustit Travis CI Build – Jakub Englický – ...
Péhápkaři v Pecce: Jak si lokálně spustit Travis CI Build – Jakub Englický – ...PeckaDesign.cz
 
Péhápkaři v Pecce: Jak jsme neposlali pull request do PHP – Milan Pála – 17. ...
Péhápkaři v Pecce: Jak jsme neposlali pull request do PHP – Milan Pála – 17. ...Péhápkaři v Pecce: Jak jsme neposlali pull request do PHP – Milan Pála – 17. ...
Péhápkaři v Pecce: Jak jsme neposlali pull request do PHP – Milan Pála – 17. ...PeckaDesign.cz
 
Péhápkaři v Pecce: Zend Expressive: PSR framework který vás dostane – Jan Kad...
Péhápkaři v Pecce: Zend Expressive: PSR framework který vás dostane – Jan Kad...Péhápkaři v Pecce: Zend Expressive: PSR framework který vás dostane – Jan Kad...
Péhápkaři v Pecce: Zend Expressive: PSR framework který vás dostane – Jan Kad...PeckaDesign.cz
 
Péhápkaři v Pecce: Jak na bezpečnostní hlavičky – Marek Humpolík – 23. 1. 2019
Péhápkaři v Pecce: Jak na bezpečnostní hlavičky – Marek Humpolík – 23. 1. 2019Péhápkaři v Pecce: Jak na bezpečnostní hlavičky – Marek Humpolík – 23. 1. 2019
Péhápkaři v Pecce: Jak na bezpečnostní hlavičky – Marek Humpolík – 23. 1. 2019PeckaDesign.cz
 

Plus de PeckaDesign.cz (20)

Péhápkaři v Pecce: Naše cesta k read-modelu – Vojtěch Buba –18. 5. 2022
Péhápkaři v Pecce: Naše cesta k read-modelu – Vojtěch Buba –18. 5. 2022Péhápkaři v Pecce: Naše cesta k read-modelu – Vojtěch Buba –18. 5. 2022
Péhápkaři v Pecce: Naše cesta k read-modelu – Vojtěch Buba –18. 5. 2022
 
Péhápkaři v Pecce: Jak zrefaktorovat letitou aplikaci a zároveň začít na zele...
Péhápkaři v Pecce: Jak zrefaktorovat letitou aplikaci a zároveň začít na zele...Péhápkaři v Pecce: Jak zrefaktorovat letitou aplikaci a zároveň začít na zele...
Péhápkaři v Pecce: Jak zrefaktorovat letitou aplikaci a zároveň začít na zele...
 
WebTop100 Case study MEGAPIXEL – Redesign spuštěný proti pravidlům
WebTop100 Case study MEGAPIXEL – Redesign spuštěný proti pravidlůmWebTop100 Case study MEGAPIXEL – Redesign spuštěný proti pravidlům
WebTop100 Case study MEGAPIXEL – Redesign spuštěný proti pravidlům
 
Péhápkaři v Pecce: Sbohem PeckaCI, vítej Github Actions – Jakub Englický –27....
Péhápkaři v Pecce: Sbohem PeckaCI, vítej Github Actions – Jakub Englický –27....Péhápkaři v Pecce: Sbohem PeckaCI, vítej Github Actions – Jakub Englický –27....
Péhápkaři v Pecce: Sbohem PeckaCI, vítej Github Actions – Jakub Englický –27....
 
Péhápkaři v Pecce: Podpora PHP8 v Kdyby/Redis a Kdyby/RabbitMQ – Václav Čevel...
Péhápkaři v Pecce: Podpora PHP8 v Kdyby/Redis a Kdyby/RabbitMQ – Václav Čevel...Péhápkaři v Pecce: Podpora PHP8 v Kdyby/Redis a Kdyby/RabbitMQ – Václav Čevel...
Péhápkaři v Pecce: Podpora PHP8 v Kdyby/Redis a Kdyby/RabbitMQ – Václav Čevel...
 
Péhápkaři v Pecce: Půl roku na cestách jako digitální nomád – Jan Kadeřábek –...
Péhápkaři v Pecce: Půl roku na cestách jako digitální nomád – Jan Kadeřábek –...Péhápkaři v Pecce: Půl roku na cestách jako digitální nomád – Jan Kadeřábek –...
Péhápkaři v Pecce: Půl roku na cestách jako digitální nomád – Jan Kadeřábek –...
 
Péhápkaři v Pecce: Vývoj vlastního 'ORM' – Václav Čevela – 20. 11. 2019
Péhápkaři v Pecce: Vývoj vlastního 'ORM' – Václav Čevela – 20. 11. 2019Péhápkaři v Pecce: Vývoj vlastního 'ORM' – Václav Čevela – 20. 11. 2019
Péhápkaři v Pecce: Vývoj vlastního 'ORM' – Václav Čevela – 20. 11. 2019
 
Tvorba nových vstupních stránek z pohledu SEO
Tvorba nových vstupních stránek z pohledu SEO Tvorba nových vstupních stránek z pohledu SEO
Tvorba nových vstupních stránek z pohledu SEO
 
Péhápkaři v Pecce: pd/forms – Petr Klobás – 16. 10. 2019
Péhápkaři v Pecce: pd/forms – Petr Klobás – 16. 10. 2019Péhápkaři v Pecce: pd/forms – Petr Klobás – 16. 10. 2019
Péhápkaři v Pecce: pd/forms – Petr Klobás – 16. 10. 2019
 
Péhápkaři v Pecce: Za hranicemi DateTime – Jiří Pudil – 16. 10. 2019
Péhápkaři v Pecce: Za hranicemi DateTime – Jiří Pudil – 16. 10. 2019Péhápkaři v Pecce: Za hranicemi DateTime – Jiří Pudil – 16. 10. 2019
Péhápkaři v Pecce: Za hranicemi DateTime – Jiří Pudil – 16. 10. 2019
 
Péhápkaři v Pecce: Úvod do monitoringu – Tomáš Kozák – 16. 10. 2019
Péhápkaři v Pecce: Úvod do monitoringu – Tomáš Kozák – 16. 10. 2019Péhápkaři v Pecce: Úvod do monitoringu – Tomáš Kozák – 16. 10. 2019
Péhápkaři v Pecce: Úvod do monitoringu – Tomáš Kozák – 16. 10. 2019
 
Asynchronní programování
Asynchronní programováníAsynchronní programování
Asynchronní programování
 
ElasticSearch Dump
ElasticSearch DumpElasticSearch Dump
ElasticSearch Dump
 
Pokročilá validace síly hesla
Pokročilá validace síly heslaPokročilá validace síly hesla
Pokročilá validace síly hesla
 
Péhápkaři v Pecce: Každodenní problémy s implementací Facebook Api – Marek Hu...
Péhápkaři v Pecce: Každodenní problémy s implementací Facebook Api – Marek Hu...Péhápkaři v Pecce: Každodenní problémy s implementací Facebook Api – Marek Hu...
Péhápkaři v Pecce: Každodenní problémy s implementací Facebook Api – Marek Hu...
 
Péhápkaři v Pecce: Čtyři hlavní příčiny dysfunkčních návyků v týmu – Michal A...
Péhápkaři v Pecce: Čtyři hlavní příčiny dysfunkčních návyků v týmu – Michal A...Péhápkaři v Pecce: Čtyři hlavní příčiny dysfunkčních návyků v týmu – Michal A...
Péhápkaři v Pecce: Čtyři hlavní příčiny dysfunkčních návyků v týmu – Michal A...
 
Péhápkaři v Pecce: Jak si lokálně spustit Travis CI Build – Jakub Englický – ...
Péhápkaři v Pecce: Jak si lokálně spustit Travis CI Build – Jakub Englický – ...Péhápkaři v Pecce: Jak si lokálně spustit Travis CI Build – Jakub Englický – ...
Péhápkaři v Pecce: Jak si lokálně spustit Travis CI Build – Jakub Englický – ...
 
Péhápkaři v Pecce: Jak jsme neposlali pull request do PHP – Milan Pála – 17. ...
Péhápkaři v Pecce: Jak jsme neposlali pull request do PHP – Milan Pála – 17. ...Péhápkaři v Pecce: Jak jsme neposlali pull request do PHP – Milan Pála – 17. ...
Péhápkaři v Pecce: Jak jsme neposlali pull request do PHP – Milan Pála – 17. ...
 
Péhápkaři v Pecce: Zend Expressive: PSR framework který vás dostane – Jan Kad...
Péhápkaři v Pecce: Zend Expressive: PSR framework který vás dostane – Jan Kad...Péhápkaři v Pecce: Zend Expressive: PSR framework který vás dostane – Jan Kad...
Péhápkaři v Pecce: Zend Expressive: PSR framework který vás dostane – Jan Kad...
 
Péhápkaři v Pecce: Jak na bezpečnostní hlavičky – Marek Humpolík – 23. 1. 2019
Péhápkaři v Pecce: Jak na bezpečnostní hlavičky – Marek Humpolík – 23. 1. 2019Péhápkaři v Pecce: Jak na bezpečnostní hlavičky – Marek Humpolík – 23. 1. 2019
Péhápkaři v Pecce: Jak na bezpečnostní hlavičky – Marek Humpolík – 23. 1. 2019
 

Dernier

WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxJennifer Lim
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfFIDO Alliance
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...CzechDreamin
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsStefano
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfFIDO Alliance
 
The UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, OcadoThe UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, OcadoUXDXConf
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1DianaGray10
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Patrick Viafore
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaCzechDreamin
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FIDO Alliance
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...FIDO Alliance
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2DianaGray10
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...FIDO Alliance
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoTAnalytics
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101vincent683379
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Julian Hyde
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastUXDXConf
 

Dernier (20)

WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
The UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, OcadoThe UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, Ocado
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 

Péhápkaři v Pecce: A refactoring Journey – From Legacy to Laravel – Christopher Fuchs – 14. 11.

  • 1. ready2order.com© 2018 ready2order GmbH. From Legacy To Laravel A Refactoring Journey Christopher Fuchs, Co-Founder & CTO
  • 2. - Web- and cloudbased POS solution for catering, retail and service - Start of development in 2012 - Founded ready2order GmbH in 2015 at 25 customers - Currently 60+ employees - 7000+ customers in Austria, Germany, Switzerland - Vision: All-In-One Solution for SMBs Who are we? © 2018 ready2order GmbH. Alle Rechte vorbehalten. 1 | X
  • 3. - POS - Stock & ingredients management - Accounting (BMD, DATEV, SAP, …) - Printer integrations - Payment terminal integrations - Time tracking - Coupons, discounts & happy hours - Price levels - RKSV signature - Bar- & QR-Code integrations - Highly configurable - …. - Hybrid apps for - iOS - Android - Windows - Mac - Offline mode - Public API - Live statistics - Supplier management - User & role management - Detailed reports - Offers & Delivery bills - ... Features © 2018 ready2order GmbH. Alle Rechte vorbehalten. 2 | X
  • 4. 1 | Meet Mr. Legacy © 2018 ready2order GmbH. Alle Rechte vorbehalten. 3 | X
  • 5. The good parts first… © 2018 ready2order GmbH. Alle Rechte vorbehalten. 4 | X
  • 6. …and the bad parts „Just do it like it‘s 1999“ © 2018 ready2order GmbH. Alle Rechte vorbehalten. 5 | X - 200,000 lines of PHP code - Mixture of PHP, JavaScript, CSS, HTML in one file - Business, view and backend logic in one file - Business logic redundancies - No separation of concerns - No single entry point - Bad folder structure - Messy interdependencies everywhere - Big, fat models - No CI, templating, jobs, queues - class.ready2order.php is used in almost every file - Impossible to follow for new developers
  • 7. What was the code like? „Just do it like it‘s 1999“ © 2018 ready2order GmbH. Alle Rechte vorbehalten. 6 | X
  • 8. Some things needs to change… © 2018 ready2order GmbH. Alle Rechte vorbehalten. 7 | X
  • 9. 2 | The journey © 2018 ready2order GmbH. Alle Rechte vorbehalten. 8 | X
  • 10. - „WTF should we do“ (June – August 2017) - „Let‘s do a rewrite“ (September 2017) - „No this won‘t work...let‘s refactor!“ (2 days later) - „DIY-framework...why not Laravel? Let‘s do it!“ (Begin of October 2017) What did we do? ready2order GmbH © 2018 ready2order GmbH. Alle Rechte vorbehalten. 9 | X Refactor Rewritevs
  • 11. © 2018 ready2order GmbH. Alle Rechte vorbehalten. 10 | X Legacy Code
  • 12. üNamespaced legacy code üBuild and manage assets with grunt üRestructured project structure üImplemented fallback proxy controller üRemoved globals & global states üRewrote bash scripts to symfony console commands üRemoved existing eloquent 5.2 from legacy code üMigrated routes üImplemented queue system üGO LIVE - Begin of November 2017 2 people spent approx. 400 hours each within 4 weeks What did we do to go live? © 2018 ready2order GmbH. Alle Rechte vorbehalten. 11 | X
  • 13. - Refactor step-by-step, file-by-file, route-by-route - Single point of entry - No feature freeze - Clean project structure - Fast way into production - Well-known framework – less scary for new developers What benefits did we get? © 2018 ready2order GmbH. Alle Rechte vorbehalten. 12 | X
  • 14. 3 | Status quo © 2018 ready2order GmbH. Alle Rechte vorbehalten. 13 | X
  • 15. - 70% of business logic code already refactored - Use full power of Laravel - Abstraction layers - Authentication & Authorization - Database migrations - Broadcasting - Caching & Mutexes - Logging - Custom app-specific Error Handlers (PublicExceptionInterface) - Event system - Implemented custom SessionManager on top of Laravel’s auth - Controller – SessionService - Service – Repository -pattern What happened since November 2017? © 2018 ready2order GmbH. Alle Rechte vorbehalten. 14 | X
  • 16. - Router - Resolves route to controller’s method - Authentication - Controller - Map request data to business-logic-domain object (Model or DataClass) - Perform route-specific authorization checks with policy - Call business logic method via SessionXxyyzzService or return Blade-view - SessionUserService - Perform business-logic specific authorization checks - Collect session data & call business logic method in XxyyzzService - UserService - Run business logic operation which gets all necessary information from method arguments (No access to session data allowed!) - UserRepo - Extends autogenerated AbstractXxyyzzRepo - CRUD-methods to access database-layer via models - User (Model) - AbstractionLayer for database tables Code structure & layers Example: User © 2018 ready2order GmbH. Alle Rechte vorbehalten. 15 | X
  • 17. - Administration - POS - Public API Creating a user © 2018 ready2order GmbH. Alle Rechte vorbehalten. 16 | X
  • 18. Back then… © 2018 ready2order GmbH. Alle Rechte vorbehalten. 17 | X
  • 19. Router routes/apps/api/users.php © 2018 ready2order GmbH. Alle Rechte vorbehalten. 18 | X
  • 26. What about documentation? © 2018 ready2order GmbH. Alle Rechte vorbehalten. 25 | X
  • 27. - Autogenerate API documentation to OpenAPI-spec with zircote/swagger-php Codegeneration FTW © 2018 ready2order GmbH. Alle Rechte vorbehalten. 26 | X
  • 28. - GraphQL + React - Code Generation - Base models - Base repositories - Test-factories - GraphQL type and query auto-generation from spec-files - Enhanced Gitlab CI - phpcsfixer for coding style - Static Code Analysis with phpstan - Custom phpstan rules which detect common code-style violations to speed-up code reviews - (Semi)Continous deployment - Swagger for OpenAPI documentation generation - Many utility commands to make dev’s lifes easier - Database migrations with percona - Distributed maintenance mode - Automated release integration with jira - ICU Intl-message-format - docker-compose setup - Upcoming - kubernetes/GKE as long-term replacement for AWS What else is going on? © 2018 ready2order GmbH. Alle Rechte vorbehalten. 27 | X
  • 29. We killed the monster! – 28.8.2018 class.ready2order.php © 2018 ready2order GmbH. Alle Rechte vorbehalten. 28 | X
  • 30. - Grow development team - Scale infrastructure - Implement sharding and necessary tooling - Improve UX - API First with GraphQL - Scale by extracting services - Scalable logging, monitoring and reporting infrastructure - Security-first with regular internal and external penetrations tests - Train our chaos monkey Roadmap © 2018 ready2order GmbH. Alle Rechte vorbehalten. 29 | X
  • 31. - „think – prototype – discuss – repeat“ - Rewrites are mostly doomed to fail as a lot of knowledge get lost - Refactoring should result in rewrite - Clean up project first, then separate business logic What did we learn? © 2018 ready2order GmbH. Alle Rechte vorbehalten. 30 | X
  • 32. - Laravel IDE Helper (barryvdh/laravel-ide-helper) - Phpstan (phpstan/phpstan) - Code Sniffer (squizlabs/php_codesniffer) - phpdbg (krakjoe/phpdbg) - paratest (brianium/paratest) - swagger/php We are hiring ready2order.com/jobs Things to know © 2018e ready2order GmbH. Alle Rechte vorbehalten. 31 | X
  • 33. ready2order.com © 2018 ready2order GmbH. Alle Rechte vorbehalten.
  • 34. Refactor + - One code base, team, deployment - Fast go-to-live - Reuse existing code - Step-by-step migration - - Hard to remove bad patterns - Hard to move to framework - Requires code insights Rewrite + - Clean implementation - Easy onboarding for new devs - No architectural burdens - - Very large code base - Long project doomed to fail - Maintain two separate system - Feature freeze What to do? „think – prototyp – discuss“ © 2018 ready2order GmbH. Alle Rechte vorbehalten. 33 | X
  • 35. What to consider? „think – prototyp – discuss“ © 2018 ready2order GmbH. Alle Rechte vorbehalten. 34 | X BATTLE TIME Refactor vs Rewrite PHP Go / Java / ? REST GraphQL Fullstack Application API only