SlideShare a Scribd company logo
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

More Related Content

PDF
Next Gen Big Data Plattform mit Hadoop, APIs und Kubernetes
PDF
Cloud-Native Microservices using Helidon
PPTX
No-Java Enterprise Applications: It’s All About JavaScript [DEV5107]
PDF
From EAI to Serverless
PDF
From EAI to Serverless - Evolution of integration architectures
PPTX
ApI first Microservices meetup
PDF
Agile Integration Workshop
PDF
Let's be real. Quarkus in the wild.
Next Gen Big Data Plattform mit Hadoop, APIs und Kubernetes
Cloud-Native Microservices using Helidon
No-Java Enterprise Applications: It’s All About JavaScript [DEV5107]
From EAI to Serverless
From EAI to Serverless - Evolution of integration architectures
ApI first Microservices meetup
Agile Integration Workshop
Let's be real. Quarkus in the wild.

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

PDF
SDPHP Lightning Talk - Let's Talk Laravel
PPTX
Software Development with PHP & Laravel
PPTX
Introduction to Laravel Framework (5.2)
PPTX
They why behind php frameworks
PPTX
Introduction to Monsoon PHP framework
PPT
Bridging the Gap - Laracon 2013
PPTX
Developing clean services using laravel
PDF
High quality ap is with api platform
PDF
What's New In Laravel 5
PDF
An Introduction to the Laravel Framework (AFUP Forum PHP 2014)
PPT
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
PDF
Fighting legacy with hexagonal architecture and frameworkless php
PPTX
Building Large Scale PHP Web Applications with Laravel 4
PPTX
Laravel совместимые технологии
PPTX
Object Oriented Apologetics
PDF
Yii2 guide
PDF
Laravel intake 37 all days
PDF
Web Development Solutions for Your Business Needs
PDF
Laravel Web Development: A Comprehensive Guide
SDPHP Lightning Talk - Let's Talk Laravel
Software Development with PHP & Laravel
Introduction to Laravel Framework (5.2)
They why behind php frameworks
Introduction to Monsoon PHP framework
Bridging the Gap - Laracon 2013
Developing clean services using laravel
High quality ap is with api platform
What's New In Laravel 5
An Introduction to the Laravel Framework (AFUP Forum PHP 2014)
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Fighting legacy with hexagonal architecture and frameworkless php
Building Large Scale PHP Web Applications with Laravel 4
Laravel совместимые технологии
Object Oriented Apologetics
Yii2 guide
Laravel intake 37 all days
Web Development Solutions for Your Business Needs
Laravel Web Development: A Comprehensive Guide
Ad

More from PeckaDesign.cz (20)

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

Recently uploaded (20)

PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Spectroscopy.pptx food analysis technology
PDF
cuic standard and advanced reporting.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Cloud computing and distributed systems.
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Encapsulation theory and applications.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
Empathic Computing: Creating Shared Understanding
Encapsulation_ Review paper, used for researhc scholars
Building Integrated photovoltaic BIPV_UPV.pdf
Programs and apps: productivity, graphics, security and other tools
Spectroscopy.pptx food analysis technology
cuic standard and advanced reporting.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Diabetes mellitus diagnosis method based random forest with bat algorithm
MIND Revenue Release Quarter 2 2025 Press Release
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
sap open course for s4hana steps from ECC to s4
Big Data Technologies - Introduction.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Advanced methodologies resolving dimensionality complications for autism neur...
Reach Out and Touch Someone: Haptics and Empathic Computing
Cloud computing and distributed systems.
Mobile App Security Testing_ A Comprehensive Guide.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Encapsulation theory and applications.pdf
Machine learning based COVID-19 study performance prediction
Empathic Computing: Creating Shared Understanding

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