Skip to content

The Concept of Middleware

What is Middleware

In my understanding, middleware shares similarities with object-oriented programming concepts and the idea of containerization. It involves the unification and encapsulation of foundational resources, creating a black box that offers APIs for easy access.

Think of it as "Big Middleware" serving "Small Frontends."

A robust middleware empowers various small frontends by providing them with substantial resources, enabling rapid development on top of a solid foundation.

Classification of Middleware

Anything can be turned into middleware. The specific categories of middleware include:

  • Business Middleware: It encapsulates common business logic for various projects.
  • Technical Middleware: This prevents reinventing the wheel by offering fundamental frameworks, engines, middleware, and more.
  • Data Middleware: It handles data collection and analysis for different projects.
  • Algorithm Middleware: This provides algorithmic capabilities to various projects, such as recommendation algorithms, search algorithms, image recognition, and speech recognition.

Use Cases

  • From 0 to 1 Stage: Building middleware is unnecessary at this point. The primary focus should be on delivering the product as quickly as possible, proving its market value, and ensuring survival.
  • From 1 to N Stage: Middleware is suitable for this stage. Once the product gains market recognition, the primary goal shifts from mere survival to improvement. Leveraging the common elements of various projects by creating middleware is advisable, especially when the project's complexity is still relatively low. This approach simplifies experimentation with new projects and the iteration of old ones.
  • From N to N+1 Stage: This becomes a necessity. Short-term pain is preferable to long-term suffering. To meet long-term development needs, middleware should be established early to prevent difficulties in future maintenance.

References and Acknowledgments

  • [Comic: What is Middleware?](https://mp.weixin.qq.com/s?__biz=MzA5MzUwOTY4NQ==&mid=2247485111&idx=1&sn=1b81776a787e10542b007f9875caa300&chksm=905d87eda72a0efb8300bf7e830eb09feb3e9a04093c581a3a6270a0c452ec1e48ae5537675a&mpshare=1&scene=1&srcid=&sharer_sharetime=1570670452048&sharer_sh

Original: https://wiki-power.com/
This post is protected by CC BY-NC-SA 4.0 agreement, should be reproduced with attribution.

This post is translated using ChatGPT, please feedback if any omissions.