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

微前端设计与实现

by Luca Mezzalira
August 2022
Beginner to intermediate
270 pages
7h 38m
Chinese
Posts & Telecom Press
Content preview from 微前端设计与实现
xi
译者序
在很多人眼里,微前端其实是老酒换新瓶的一个说法。
十多年前,单页应用还没有大行其道,页面划分即业务划分。那时,微架构还不为大部分
人所知。后来,当开发人员需要在同一个页面中整合不同的功能逻辑时,可选的路径大致
有两条:要么使用
iframe
进行业务隔离,要么设计一套完备的模块化开发流程。
如果不考虑体验问题,单就满足“隔离”这一硬性要求来说,第一条路径,也就是使用
iframe
,算是一种近乎完美的解决方案
。但是,由于性能、无法共享内存数据、用户界面
同步性等问题,
iframe
在绝大多数场景中满足不了业务开发人员的诉求
(但本书作者依旧
给出了对应的使用案例)。
第二条路径就是通过分而治之的模块化开发,根据自身诉求来定义沙盒环境。在诸如
Angular
React
Vu
e
等框架出现之前,这也并不是一件让人挠头的事情,因为无论业务
如何分治,在同一个宿主环境中使用统一的工具库(比如
jQuery
的开发模式,都要比处
理技术基础框架之间的冲突容易得多。
随着前端技术的不断演进,开发人员开始把精力更多地放在如何选取一个好用的业务框架
和如何提高开发效率上,同时,还要保证优秀的用户体验。因此,在绝大多数场景中,开
发人员会选择后面这条路径,但这也意味着协作成本和沟通成本的增加。
较大规模的公司都有基础技术团队来解决技术选型和架构迁移方面的问题。大家的设想都
很美好:如果同一个系统的技术栈能够统一,并且由唯一的技术决策者来进行规划,那么
开发、部署和运维将是多么完美的事情。
但现实情况往往事与愿违,原因很简单:技术要为业务服务。 ...
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