• 首页
  • 产品中心
    • 数式Oinone四大产品

      低代码开发平台无代码开发平台集成开发平台AI大模型开发
    • 数式Oinone体系能力

      用户与组织权限管理文件管理消息中心国际化业务审计
    • 数式Oinone核心产品特性

      低无一体面向软件公司场景无限制应用级扩容可分可合
  • 服务中心
    • 客户服务

      预约演示方案咨询私有部署找人定制
    • 开发者

      问答下载
    • Oinone学院

      社区学习

    《精讲面向软件公司的低代码平台——以Oinone为例》

  • 合作伙伴
    渠道申请伙伴名录专家库
  • 关于数式
0571-88757863

R&D Paradigm:Modular Design


Based on Oinone as the business module division of the R&D framework, it should follow the principles of high cohesion and low coupling. Combined with the modular architecture characteristics of Oinone, the following is the best practice guide:

I. Modular Architecture: The Core of High Cohesion and Low Coupling

The modular architecture of Oinone is the cornerstone of its technical system, emphasizing the design principle of "high cohesion, low coupling". Each module serves as an independent unit, encapsulating functional logic for specific domains. In business module division, this feature should be fully utilized to encapsulate different business functions in independent modules, with each module focusing on solving problems in specific business domains.

(Ⅰ) Functional Independence

Each module should have independent business functions to avoid functional overlap and redundancy. For example, sales management, procurement management, inventory management, etc., are divided into different modules. Each module contains complete business logic, data models, and user interfaces. Through Oinone's module definition files, the dependency relationships and functional characteristics of modules can be clearly declared to ensure module independence and maintainability.

(Ⅱ) Interface Design

Modules interact through well-defined interfaces rather than direct dependencies on internal implementations. Oinone complies with Java object-oriented and interface-oriented programming specifications, such as model inheritance, method overriding, RPC calls, etc. When dividing modules, public API interfaces should be designed to facilitate calling and extension by other modules. For example, a general "customer management" module can provide interfaces for creating, querying, and updating customer information for sales, service, and other modules to call, avoiding duplicate development. A simplified module directory structure is as follows:

Module
├── module-api  Module interface project
│   ├── model   Models
│   ├── api     Service interfaces
│   └── Module.java Module definition
└── module-core Module implementation project
    ├── action  Behaviors
    ├── service Service implementations
    └── init    Data initialization

(Ⅲ) Dependency Management

Reasonably manage the dependency relationships between modules to avoid circular dependencies and excessive dependencies. Oinone's module loading mechanism automatically handles dependency relationships, but when designing modules, unnecessary dependencies should be minimized to ensure module pluggability. For example, a report generation module can depend on a basic data module but should not depend on specific business process modules to improve module versatility and reusability.

(Ⅳ) Using Event Mechanisms and Hooks for Loosely Coupled Communication Between Modules

Oinone's event mechanism and Hook functions provide a loosely coupled solution for communication between modules. In business module division, through reasonable design of event trigger points, functional expansion and collaborative work between modules are realized. For example, in the order processing module, when the order status changes, corresponding events are triggered, such as the "order paid" event. The finance module can subscribe to this event to automatically generate financial vouchers, and the logistics module can also subscribe to this event to arrange product delivery.

(Ⅴ) Modular Maturity Assessment System

Assessment DimensionLevel 1Level 3Level 5
Module IndependenceCircular dependencies existUnidirectional dependenciesFully independent and deployable
Change Impact ScopeAffects multiple modulesControlled within submodulesFully closed-loop within the module
Testing EfficiencyRequires full regressionModule-level testingIndependent automated verification
Cognitive LoadRequires global understandingModule interface-level understandingFocus on a single module即可

(Ⅵ) Typical Error Patterns and Solutions

Anti-pattern 1: Transaction-driven division ✖ Taking the database transaction scope as the module boundary ✓ Adopting domain event eventual consistency to maintain business integrity

Anti-pattern 2: Technical dimension cutting ✖ Using Controller/Service/DAO layering as modules ✓ Establishing vertical business modules, each containing a complete hierarchical structure

Anti-pattern 3: Over-decoupling trap ✖ Treating each class as an independent module ✓ Following the "Common Closure Principle" to place classes that change together in the same module

III. Understanding the "Link" Module

Reference: Related documentation on this topic can be found in "Link Module".

Whenever we interact with other modules, we need to keep in mind Oinone's modular characteristics. Suppose you are working on both an expense management module and an accounting module. If we plan to sell the application to enterprise customers, some may need to transfer expense data to the accounting system for financial processing and generate corresponding accounting vouchers, while others may not.

For such use cases, a common practice is to create a "link" module. In our example, this module would depend on the expenses (expense management) module and the account (accounting) module, and contain the logic for creating accounting vouchers for reimbursement forms in expense management. In this way, the expense management module and the accounting module can be installed independently. When both modules are installed, installing the link module provides new functionality.

IV. Progressive Expansion Capability

  • The inheritance mechanism allows extending existing modules through inherit instead of directly modifying the source code.
  • The extension point mechanism allows appending pre, post, and override through Extpoint to extend specific function logic.
  • The Hook mechanism allows adding general logic to the system in a切面 way through HookBefore and HookAfter.
  • The Upstream mechanism allows combining the entries of one or more modules and centrally managing extended logic in one module.

Typical Scenarios for Progressive Expansion

StageExpansion RequirementImplementation Method
Initial stageBasic sales processEnable the native sale
module
Intermediate stageAdd contract managementInstall the third-party sale_contract
module
Later stageCustom quotation approvalDevelop the custom_approval
module inheriting from sale
Edit this page
Last Updated:1/15/26, 4:02 AM
Prev
R&D Paradigm:R&D Process
Next
R&D Paradigm:Model Design
默认页脚
Copyright © 2026 Mr.Hope