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

微前端设计与实现

by Luca Mezzalira
August 2022
Beginner to intermediate
270 pages
7h 38m
Chinese
Posts & Telecom Press
Content preview from 微前端设计与实现
141
7
案例分析:微前端自动化流水线
6
章探讨了在微前端实现自动化流水线的原则,本章将分析一个实际案例。本案例会
基于之前所讲的内容,讲解一个项目应该考虑的各个步骤。需要注意的是,并非在所有
自动化策略中都要按部就班地采用所有步骤,而是应该根据公司和项目的具体情况做具体
分析。
7.1
 场景分析
ACME
公司是一家视频流服务公司,它给予开发人员充分的权力,相信开发人员是团队中
最清楚使用哪些工具搭建微前端的人。每个团队都要负责构建一个微前端,所以公司鼓励
开发人员根据技术需求和公司定义的一些边界或围栏来选择所需的工具。
ACME
公司使用基于
Docker
容器的自定义自动化流水线
,云端团队为保障流水线的正常
运转提供必要的工具支持。该项目使用纵向拆分方式设计微前端,这种架构的微前端由
HTML
面、
JavaScript
文件和
CSS
文件组成。开发团队的技术负责人和团队负责人决定
使用单元测试、集成测试和端到端测试,以确保线上代码的质量和可靠性。
架构团队是产品和开发团队之间的桥梁,它要在流水线中引入适应度函数作为衡量指
标,以确保所交付的产物满足所期望的架构特征。架构团队还负责将业务需求转化为技术
需求。
开发团队决定使用
monorepo
策略
,这样所有微前端代码将在同一个代码库中维护。团队
采用基于主干开发的分支管理策略,通过主干直接发布产物,而非新建分支进行发布。
142
7
因为项目的动态性没有那么高,所以项目不会启用功能开关标识
1
。开发人员会在开发体验
团队创建的测试环境中进行手动测试和自动化测试。 ...
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