Micro frontend (MFE) architectures have gained significant popularity for promoting independence and modularity in development. Despite their widespread adoption, the field remains relatively unexplored, especially concerning identifying problems and documenting best practices. Drawing on both established microservice (MS) anti-patterns and the analysis of real problems faced by software development teams that adopt MFE, this paper presents a catalog of 12 MFE anti-patterns. We composed an initial version of the catalog by recognizing parallels between MS anti-patterns and recurring issues in MFE projects to map and adapt MS anti-patterns to the context of MFE. To validate the identified problems and proposed solutions, we conducted a survey with industry practitioners, collecting valuable feedback to refine the anti-patterns. Additionally, we asked participants if they had encountered these problems in practice and to rate their harmfulness on a 10-point Likert scale. The survey results revealed that participants had encountered all the proposed anti-patterns in real-world MFE architectures, with only one reported by less than 50\% of participants. They stated that the catalog can serve as a valuable guide for both new and experienced developers, with the potential to enhance MFE development quality. The collected feedback led to the development of an improved version of the anti-patterns catalog. Furthermore, we developed a web application designed to not only showcase the anti-patterns but also to actively foster collaboration and engagement within the MFE community. The proposed catalog is a valuable resource for identifying and mitigating potential pitfalls in MFE development. It empowers developers of all experience levels to create more robust, maintainable, and well-designed MFE applications.
翻译:微前端(MFE)架构因其在开发中促进独立性与模块化而广受欢迎。尽管应用广泛,该领域仍相对缺乏深入探索,尤其是在问题识别与最佳实践记录方面。本文借鉴成熟的微服务(MS)反模式,并结合对采用MFE的软件开发团队实际面临问题的分析,提出了包含12种MFE反模式的目录。我们通过识别MS反模式与MFE项目中反复出现的问题之间的相似性,将MS反模式映射并适配到MFE语境中,从而构建了目录的初始版本。为验证所识别的问题及提出的解决方案,我们对行业从业者进行了调查,收集了宝贵反馈以完善反模式。此外,我们询问参与者是否在实践中遇到过这些问题,并请他们以10点李克特量表评估其危害程度。调查结果显示,参与者在实际MFE架构中遇到过所有提出的反模式,仅有一种被少于50%的参与者报告。他们表示该目录可作为新老开发人员的实用指南,有望提升MFE开发质量。收集的反馈促成了反模式目录改进版的制定。此外,我们开发了一个网络应用,不仅用于展示反模式,还旨在积极促进MFE社区内的协作与参与。所提出的目录是识别和规避MFE开发潜在陷阱的重要资源,赋能不同经验水平的开发者构建更健壮、可维护且设计良好的MFE应用。