建筑约束在Java [英] Architectural Constraints In Java

查看:159
本文介绍了建筑约束在Java的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想确保我的项目不包含包间不必要的依赖。例如,我想,以确保该项目已层状结构。即模型下的所有内容,业务逻辑依赖于模型,查看业务逻辑和模式dependes。每个层在其自己的包的地方。

I want to be sure that my project doesn't contain unnecessary dependencies among packages. For example, I want to be sure that the project has layered structure. I.e. model is below everything, business logic depend on model, view dependes on business logic and model. Each of the layers is place in its own package.

你能不能推荐任何,preferably开源工具,让我来指定这些约束,检查它们的持续集成的一部分吗?

Could you recommend any, preferably open source tools which allow me to specify these constraint and check them as a part of continuous integration?

P.S。我知道我可以分开在不同的Maven模块项目。不幸的是,我的真实世界的情况是大于3分层系统更加复杂。如果我使用Maven的模块,我想有几个几十个相当小的模块。

P.S. I know that I can separate the project in separate maven modules. Unfortunately, my real world case is more complex than 3-layered system. If I used maven modules, I would have several dozens of quite small modules.

推荐答案

Structure101 让您直观地定义你的图层作为细胞架构图其映射到物理code和检查一致性。这些图都是在开发者的IDE可见并生成编辑时警告,如果分层规则被违反。它也可能打破/ CI在报告生成。 SonarJ 并的 Lattix 其他工具Visual依赖的控制。

Structure101 lets you define your layers visually as cells in Architecture Diagrams which map to the physical code and check conformance. These diagrams are visible in the developers' IDEs and generate edit time warnings if the layering rules are violated. It is also possible to break/report the build during CI. SonarJ and Lattix are other tools for visual dependency control.

这篇关于建筑约束在Java的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆