Skip to Content
微前端设计与实现
book

微前端设计与实现

by Luca Mezzalira
August 2022
Beginner to intermediate
270 pages
7h 38m
Chinese
Posts & Telecom Press
Content preview from 微前端设计与实现
构建和部署微前端
135
们可以通过这些指标了解产品质量,了解技术债务所在,在不必跟进团队进度和参与实际
项目开发的情况下就能掌控架构的关键特征。
在自动化策略中引入并维护适应度函数有利无弊,它可以帮助团队为系统架构提供快速的
反馈闭环,也可以使产品质量更上一层楼。
6.4.3
 微前端特定操作
与传统的自动化流程相比,用于微前端的自动化流程可能需要额外的步骤。首先,需要检
查每个微前端是否集成了特定的库。系统架构团队规定每个前端组件都必须引入这些特定
库。假设我们已经开发了一个设计系统,并且强制产物包含这些库的最新版本。在持续集
成流水线中,有一个步骤可以验证
package.json
件,确保设计系统的代码库包含这些库
的正确版本。如果版本不匹配,就会构建失败并通知团队。
上述方法也可以验证是否存在其他的内部库,比如与分析和监控相关的库。无论采取哪种架
构方式,考虑到微前端的模块化性质,我强烈建议加上这一步,以保证项目产物的完整性。
另一个方法是在编译时,而非用户请求页面时,实时进行服务器端渲染。此方法主要用于
纵向拆分的架构。这样做的主要原因是节省计算资源和成本,比如合并不经常修改的数据
和用户界面。另一个原因是,这样的技术方案可以提供一个高度优化并且快速加载的页
面,其中可能包含一些内联的
CSS
JavaScript
当微前端产物是以
HTML
页面为入口的单页应用时
,我们可以生成一个骨架屏,内嵌必不
可少的
CSS
HTML
展示静态页面
,从而在加载交互所需的资源时为用户提供及时反馈。
因为每个团队都有自己的“难言之隐”和需求 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Python语言及其应用(第2版)

Python语言及其应用(第2版)

Bill Lubanovic

Publisher Resources

ISBN: 9787115595089