Legacy system transformation methods

Greenfields and Brownfields

The terms greenfield (gromfied) and brownfield (browmfied) are often mentioned during project execution and are widely used in
IT, construction, manufacturing and other industries. They are related to project development, and their specific meanings are as follows.

  • Greenfield: A greenfield project refers to the installation of a brand new application. We are free to choose the architecture, platform and all other technologies. The entire development process starts from scratch. We need to analyze the requirements, specify technical solutions, and implement them one by one.
  • Brownfield: A brownfield project is one where some work has already been done. For the software industry, updating and retrofitting existing applications can be considered brownfield projects. We need to analyze the legacy system first, possibly starting with a code audit, to fully understand the implementation details. In the industrial world, brownfield often means abandoned and polluted, and its color vividly reflects this characteristic. Landmark projects in the software industry are not so serious, but developers who take over do face more restrictions than developing greenfield projects.

Greenfield projects have almost no restrictions on technology selection and design. They will not be constrained by legacy system technology stacks, do not need to be integrated with legacy code, and are more free at the implementation level. Typical greenfield software projects generally include the following two types.

  • Develop a new application and implement a new business.
  • Rewrite an old system in a new language, implementing only the original business logic but not using any old code.

Developing greenfield projects sounds very advantageous and is a generally preferred approach among developers. After all, it's much easier to create someone else's work on a blank piece of paper. However, the disadvantages of this kind of project are also obvious, that is, the investment is larger, the cost is higher, and the implementation time is longer. Factors that need to be considered include team, project management, hardware, platform, infrastructure, etc. Not only the development process itself, but also the scope of the project needs to be carefully planned to be consistent with business needs and avoid mistakes in the project direction. Therefore, if you have cost and time constraints on your peers and want to quickly migrate to a new technology stack, a greenfield approach is not appropriate.


Brownfield projects often benefit from legacy code, reducing the cost of developing new projects. However, it hinders developers' design flexibility to a certain extent. Many projects are abandoned due to poor design, chaotic implementation, or poor execution. Developers are not even willing to touch a line of code and would rather start over. However, based on cost and time considerations, customers are more willing to try to revive them rather than overthrow them. Of course, not all brownfield projects are without merit. As long as the code structure is good and not polluted, and the project is easy to maintain, an experienced development team can still take over the brownfield project well. A typical brownfield project has the following characteristics.

  • Integrate new features into existing systems.
  • Modify existing code to meet business changes.
  • Optimize the performance of existing systems and improve the quality attributes of applications.

For the transformation of legacy systems, teams need to choose between greenfield and brownfield based on their own circumstances. If time and cost permit, if you want to completely abandon old technical debt and embrace a new technology stack, you can directly design a greenfield project. For scenarios where resources are limited and you hope to gradually transition to new technology stacks without affecting online business, it is more reasonable to choose the brownfield approach.


strangler mode

The Stranger Pattern is a system reconfiguration method. Its name comes from a plant called the stranger fig that Martin Fowler saw in the Australian rainforest. The plant will wrap around the host tree, absorb nutrients, and then slowly grow downward until it takes root in the soil, eventually killing the host tree and leaving it an empty shell.

In the software development industry, this became a way of rewriting a system, gradually creating a new system around the old system and letting it grow until the old system was completely replaced.

The advantage of the Strangler model is that it is a gradual process, allowing new and old systems to coexist and giving the new system time to grow. Another advantage is its ability to reduce risk. Once the new system stops working, you can quickly switch traffic back to the old system. This sounds very similar to blue-green deployment. Our team gradually transformed the single application into microservices based on the Strangler model, and smoothly migrated to the new technology stack. 

Guess you like

Origin blog.csdn.net/summer_fish/article/details/132804091