In recent years, microservices architecture has become very popular in the backend technology community and is considered the future technology direction of IT software architecture. How can we borrow ideas from back-end microservices to build a modern front-end application? Here I provide a front-end micro-service solution that can be really implemented in the product.

Comparison between the back end and back end of microservitization

Advantages of back-end microservitization:

  1. Controllable complexity: Small in size and low in complexity, each microservice can be fully controlled by a small development team, making it easy to maintain high maintainability and development efficiency.
  2. Independent deployment: Because microservices have independent running processes, each microservice can also be deployed independently.
  3. Flexible technology selection: Under the microservice architecture, technology selection is decentralized. Each team is free to choose the most appropriate technology stack based on its own service needs and industry development status.
  4. Fault tolerance: When a component fails, in the traditional single-process architecture, the failure is likely to spread throughout the process, resulting in application-wide unavailability.
  5. Scale-out: Monolithic applications can also achieve scale-out by copying the entire application to different nodes.

Advantages of front-end microservitization:

  1. Controllable complexity: Each UI business module is developed by an independent front-end team, which avoids big code, keeps high-speed compilation during development, keeps low complexity, and facilitates maintenance and development efficiency.
  2. Independent deployment: Each module can be deployed independently. The granularity can be small enough that the UI of a single component can be deployed independently without affecting other modules.
  3. Flexible technology selection: also the most attractive, the same project can use all the front-end technology stacks on the market today, including future front-end technology stacks.
  4. Fault tolerance: When an error occurs in a module, it does not affect the whole system.
  5. Scaling: Each service can scale independently to meet business scalability and unnecessary consumption of resources;

When do we need front-end microservitization?

  1. The project technology stack is too old, there are few developers with relevant skills, it is difficult to expand functions, and the cost of reconstruction and maintenance is high.
  2. The project was too large, the code compiled slowly, and the development was poor, requiring a higher-dimensional decoupling scheme.
  3. A single technology stack will not meet your business needs

The problems and challenges they face

We will soon face the following problems:

  • How do we render multiple stacks on one page?
  • How do independent modules of different technology stacks communicate with each other?
  • How do I route rendering to the correct module?
  • How should routing between different technology stacks be triggered correctly?
  • After the project code is cut, how is it merged together?
  • How do we package each module project?
  • How do we write our code after the front-end microservitization?
  • How can individual teams collaborate?

In future articles, I will answer these questions and explore the potential of front-end microservices. Jump out of the concept and actually land on your project. To be continued…