Skip to Content
Java持续交付
book

Java持续交付

by Daniel Bryant, Abraham Marín-Pérez
November 2019
Beginner to intermediate
406 pages
9h 21m
Chinese
Publishing House of Electronics Industry
Content preview from Java持续交付
自动化构建过程
67
多模块项目
虽然多模块项目是最不好被理解的(并且可能是最常被滥用的)概念,但如果正确部署,
它们可以变得很强大。当应用程序中明确定义了各个组件时,多模块构建是很有效的,
因为尽管组件之间接口定义明确、边界清晰,但它们一旦超过某些范围(例如父项目),
就无法提供更多的价值。因此,多模块项目允许你将这些组件与用户界面组件(例如
GUI
Web
应用程序)组合在一起,并且通过一个命令来构建整个系统。构建系统应该
能够确定此类应用程序的构建顺序,并且最后生成的组件和应用程序都可以使用相同的
版本标识符。
仔细权衡是否选择多模块项目
根据我们以往的经验(也在
Stack Overflow
上快速搜索了一下),多模块项目比普
通应用程序的复杂性更高。在你开始将应用程序划分为多模块之前,请先仔细权
衡一下 :使用模块化带来的好处,是否抵得过它增加的复杂性,以及必须使用指
定构建工具的潜在风险。
使用多代码库还是单代码库
无论如何组织代码,你的构建工具都应该能够构建项目。随着微服务架构的普及,人们
对使用单代码库还是多代码库来存储代码的争论越来越多。虽然这听起来类似前面对于
多模块项目的讨论,但是多模块项目总是存储在一个代码库中的,因为模块之间是有效
耦合的(以一种积极的方式)。但是,如果要创建由多个(或许多)微服务组成的应用程序,
那么就不太容易选择了。如果每个项目自己都有一个小的、版本独立的代码库,那么它
所依赖的其他代码也要这样做吗?
关于多代码库和单代码库的争论
有几个很好的在线资源,可以帮助你选择使用多代码库还是单代码库,但是在这 ...
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脚本编程指南

写给系统管理员的Python脚本编程指南

Posts & Telecom Press, Ganesh Sanjiv Naik
Python和NLTK实现自然语言处理

Python和NLTK实现自然语言处理

Posts & Telecom Press, Nitin Hardeniya
解密金融数据

解密金融数据

Justin Pauley
Python机器学习案例精解

Python机器学习案例精解

Posts & Telecom Press, Yuxi (Hayden) Liu

Publisher Resources

ISBN: 9787121374425