Home >Backend Development >PHP Tutorial >From software legacy to strategic opportunity: The starting point (I)
This article tells how we handle the internationalization of an logistics management system (OMS) and the challenges of integrating with new e-commerce platforms. The system was developed in 2018 to optimize the order preparation process of a booming e-commerce company and efficiently integrate with different logistics operators. Built using PHP (Symfony), MySQL, Socket.io, and jQuery, it covers the entire process from packaging to shipping, including features such as order tracking, courier connections, label generation, and order preparation performance metrics.
This system worked well for many years, but as the business grew, its limitations became increasingly apparent. Technical debt is particularly worrisome, affecting multiple levels of a project. In terms of technical infrastructure, the application runs on outdated frameworks and base language versions:
In addition to outdated versions, the project also has serious flaws in the fundamentals of software development:
The accumulation of technical debt not only poses a threat to the stability and security of the system, but also:
The original architecture had coupling issues that seriously affected its flexibility and scalability:
These structural limitations not only reduce the maintainability and scalability of the system, but also increase the risks associated with any modification or evolution, leaving the application in a technically fragile and strategically vulnerable state.
One of the most significant challenges is not only technical, but also strategic. While external development is functionally correct, there are significant organizational limitations:
This situation is unsustainable in the long term because it:
An often overlooked but particularly important aspect in this project is base cost, which I believe is a key concept in software development and refers to the cost of keeping a system running even without adding new features or making improvements. minimum cost required.
In our case, base costs include all costs associated with maintaining obsolete framework and language versions, resolving emergencies due to accumulation of technical debt, managing dependencies with other systems, adapting to coupled architectures, and domain knowledge costs incurred due to insufficient understanding. All of this consumes a significant amount of available resources and directly impacts the ability to invest in innovation and continuous improvement.
Although this factor was not the decisive factor in our decision to internalize development, it was quite influential in the initial diagnosis of the project. Base costs are often ignored when assessing the sustainability of a system, but in this case it clearly demonstrates that current strategies are unsustainable in the long term. Furthermore, as we will see in subsequent articles, any attempt to maintain the existing structure will exponentially increase the base cost over time.
For a more detailed explanation of basic cost concepts and their importance, it is recommended to refer to Eduardo Ferro’s original article.
In any refactoring project, there are multiple strategies that can be employed, and the dilemma is often encountered: strangler fig or big bang rewrite.
The initial technical decision was to work within the same legacy project using the Strangler Pattern, an approach that involves developing a new module or system that gradually replaces parts of the old system. This strategy allows us to make parallel changes, reduce risk, and maintain current functionality while building a stronger foundation to support future functionality.
However, from a business perspective, this option poses an undue risk to the existing system (which is already operational and performing its functions). We decided to avoid touching the existing project and instead develop a standalone application to meet the new needs.
This shift resulted in us forking the existing codebase, a decision that was technically feasible but had certain drawbacks:
This approach allows us to move towards independent solutions, ensuring the stability of existing systems while developing a project aligned with new strategic goals. However, a detailed analysis of the pros and cons is necessary to plan and address this challenge with confidence. In addition, we reached a consensus with the business level not to expand functionality and to tightly control the project's backlog until the migration to the new e-commerce platform was completed.
优点 | 缺点 |
---|---|
在非生产环境中工作,降低生产环境的风险 | 需要暂时维护多个项目 |
自由地从零开始实施新技术和模式 | 在维护方面的努力暂时重复 |
不必担心旧系统的技术限制或依赖关系 | 由于需要在系统之间同步更改,功能的重复可能会长期减缓开发速度 |
能够专注于必要的特性 | 截止日期的风险,因为有两个代码库 |
有机会从一开始就实施最佳实践 | 项目管理的复杂性 |
更容易从一开始就实施测试 | 需要与历史数据保持兼容性 |
灵活地适应新的业务需求 | 初始时间和资源成本更高 |
更好地与公司的整体战略相一致 | 可能暂时丢失非必要的特性 |
The decision to internalize and rewrite legacy software is never easy, especially when the software is capable of doing its job. The saying "If it works, don't touch it" will always be there. However, sometimes it takes one step back to take two steps forward.
In subsequent articles in this series, we will explore how we responded to these challenges, the technical and strategic decisions we made, and how we turned these challenges into opportunities for improvement and team development.
The above is the detailed content of From software legacy to strategic opportunity: The starting point (I). For more information, please follow other related articles on the PHP Chinese website!